If you can get details of the DDE source(s) in the server, you could use DDE to transfer directly into your VB (tho' I use VB6, not VB.net, so I'm not 100% sure that VB.net supports DDE).
Alternatively, use Excel as an intermediary, and interface your VB to the spreadsheet to get the data.
Another way would be to write your own driver. I did this for Allen Bradley DF1 protocol (to avoid paying a huge licence fee every time I produce an app with comms to an AB PLC) - but I warn you it's not easy, and would only be possible with the spec of the interface protocol.
__________________
"Love justice, you who rule the world" - Dante Alighieri
I can probably help with the VB - but to use their DDE driver you'll need details like the application name, link topic(s) and link item(s), and what kind of data you can expect to get. Do you have a contact at your equipment supplier who may be able to help you with these? Alternatively, they may be given in the documentation of the server.
__________________
"Love justice, you who rule the world" - Dante Alighieri
Do
Err.Clear
AppActivate "application_title", True
DoEvents
Loop While ((Err.Number = 5) And (Timer - loadtime) < 10) ' give it 10 seconds to start up
On Error GoTo 0
dummy2 = Timer - loadtime
If Err.Number = 5 And ((Timer - StartTime) >= 10) Then
MsgBox "Error - timeout trying to start driver", vbOKOnly
End
End If
On Error GoTo 0
'Try to link to driver
With frmInterface.lblPLCStatus
.LinkMode = vbLinkNone
.LinkTopic = "application_name|status_topic_name"
.LinkItem = "status_item_name"
On Error Resume Next
.LinkMode = vbLinkAutomatic
On Error GoTo 0
If .LinkMode <> vbLinkAutomatic Then
MsgBox$ "No link to driver"
End
End If
End With
' If the code above worked, lblPLCStatus will be continuously updated with whatever the driver puts in "status_item_name"
' The next bit of code illustrates how to send data to the PLC (via the driver)
With frmInterface.lblPLCCommand
.LinkMode = vbLinkNone
.LinkTopic = "application_name|command_topic_name"
Hope this helps. The formatting in the CR4 editor doesn't make it easy to read - lots of the leading whitespace is lost so there's no indenting. Also, our internet connection died for a while when I was editing it, so I lost the plot a bit! If you're really stuck, pm me with your e-mail address and I'll try sending you stuff as a text file.
Probably won't be able to get back on line today - I've just had a call-out for a job. Let me know how you get on - I'll be around over the weekend.
Good luck,
John.
__________________
"Love justice, you who rule the world" - Dante Alighieri
i really havent checked your code..but want to thank you for the effort you put in for my interests...thanks a lot..will let u know once the code is checked..
"Almost" Good Answers: