LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Exchange data between Omron CPM1 and Labview using IA OPC Server

Hi,
 
I have connected an Omron CPM1 PLC to my PC using the serial port and managed to setup a server using the IA OPC Server.  I find that the IA Server does not provide access to the I/O channels.  My objective is to have my logic running in Labview on my PC and I am simply using the PLC to control the physical hardware.  So I need to turn on a motor, I should just need to write a logic 1 to the appropritate output channel via the OPC server.  Can anyone guide\help???
 
~Zulfi~
0 Kudos
Message 1 of 5
(5,738 Views)

Once you configure an object on your IA OPC Server and then add data members and associated aliases, you should be able to access all published variables using the LabVIEW DSC Module or DataSocket. What specifically do you mean when you say that the IO server does not provide access to your channels? Does this mean that IA OPC Server will not display the data member range that your I/O channel falls in? Or, are you simply having problems viewing the IA OPC Server data within LabVIEW? With some additional information, I would be glad to help you work through this issue and get your system up and running.

Regards,

Casey Weltzin
Applications Engineer
National Instruments

 

0 Kudos
Message 2 of 5
(5,725 Views)
The data members that I view are all part of the memory space of the PLC and not the I/O channels.  I tried reading and writing bit data members described as "auxillary range" and "I/O range" using the IA OPC interface; when I write, I receive a success message but when I read back I get "bad values" message.  If this does not help in understanding my problem then I will post a screen shot of the data members that are available in my object.
 
Zulfi
0 Kudos
Message 3 of 5
(5,575 Views)

No worries now. I managed to work it out.  The point I missed was that the I/O address space is memory mapped and so was trying to write to a memory address in the PLC and then using ladder logic (on the PLC)  to turn ON/OFF the output.  I configured the data members (in IR address space) and tried accessing them from Labview and it worked like a charm! I forgot to check but instead I will post it here; does the PLC have to be in RUN mode to control the I/O states?

By the way, thanks Casey for your advice otherwise I would have still  been trying something 'clever'.

~Zulfi~

0 Kudos
Message 4 of 5
(5,393 Views)

I am really glad that you were able to get your program up and running! Regarding your question about the PLC being in "run mode", I think this may depend on the specific PLC that you are using. It would probably be fastest to simply attempt communication with the PLC in and out of "run mode" to determine the answer to this question.

Regards,

Casey Weltzin
Applications Engineer
National Instruments

0 Kudos
Message 5 of 5
(5,197 Views)