how to adapt old VB6 code to new XWAY com?

M

Thread Starter

matteo bosi

greetings,

i have a grant in a research institute, and i'm currently working on the automation of a machine with a PLC. we have a machine identical to the nwe one, but it is connected to the PC thru the COM port, and it uses the UNITELWAY protocol.

for this machine we have a Visual Basic application which permits to operate on the machine anche keep track of several things by means of a access database.

The new machine is connected to the PC with a ethernet port (ETY Module) and we use the XIP driver with XWAY protocol. everything works well, and the PLC code is fully functional.

the last thing to do is to "migrate" the VB code from the old machine to the new one. but here there are the problems, since i don't know how to operate with XWAY drivers on VB.

in the VB code of the old machine there were lines like the following:

Declare Function UNITEInitDriver Lib "upcwin32.dll" (ByVal Number As Integer) As Integer
Declare Function UNITECloseDriver Lib "upcwin32.dll" (ByVal Number As Integer) As Integer
Declare Function UNITEOpenConnection Lib "upcwin32.dll" (UNITE As DeviceAdd) As Integer

i suppose they refer to the DLL upcwin32.dll which i don't know how it works.

how can i modify the function call to work with the new XWAY Driver? where can i find documentation about this problem??

thank you very much,
if you can help us, you can also contact me at
[email protected]

best regards,
matteo bosi
 
R
Your best bet would to disregard trying to get hold of the xway coding and instead change coarse and migrate an OPC server. Schneider have an excellent OPC server fully migrated with the xway com. Whats most VB programming for OPC intergration is as simple as pie.
 
Top