LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I use activex to communicate over com1 with a plc in labwindows 7.0?

I have third party ActiveX controls from Parijat Controlware that are designed for use with Visual Basic and the particular plc I am using (Automation Direct DL405). I have loaded the ActiveX Controller using Tools>>Create ActiveX Controller and selecting to use the controls "As Automation Server Objects"

I am using the Labwindows/CVI 7.0 evaluation version. The ActiveX control has been registered as well as licensed, and the company's demo program works in Visual Basic, so I know the comm port works and the configuration settings work (COM1, 9600 baud, odd parity, 1-8 data bits, 1 stop bit).

My Problem: Every time I call a control object, it returns the same error: 8000FFFF, which seems
to be a tough error description to track down. Therefore, I cannot communicate with the plc.

My Question: Is this a problem with my code (I haven't initialized something or set up ActiveX communications correctly) or a problem with the ActiveX control? I have attached my main.c to peruse.

Thank you in advance for your help and your time!!
Sincerely,
Brian Thoma

Controls Engineer
PVI Vacuum System Technology
0 Kudos
Message 1 of 3
(3,281 Views)
Hello Brian,

Have you considered using OPC for your system instead? If you have an OPC server configured for your DL 405, you can then use DataSocket in CVI as an OPC client. National Instruments has an OPC server called Industrial Automation OPC Servers for several third party devices . These servers do include support for the DL405 object. For a complete listing of supported devices visit this link.

If you have any further questions, please post a reply.

Regards,

Kristi H
Applications Engineer
National Instruments
0 Kudos
Message 2 of 3
(3,281 Views)
Hi Kristi,

I tried out OPC yesterday to give my brain a rest and had it up an running within an hour! I'm using the DataSocket library coupled with DirectSoft's Data Server, and I must say that I am increasingly amazed by the ease of use and power of Labwindows. Thank you very much for your time and effort in supporting an incredible product!

Sincerely,
Brian Thoma
PVI Vacuum System Technology
0 Kudos
Message 3 of 3
(3,281 Views)