LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to control and monitor omron plc from labview

Solved!
Go to solution

Hi,

i am able to make the plc communicate with labview 2009 using NI OPC Server and DSC Module via ethernet but i do not now to control and monitor plc boolean data from labview.

 

the plc i am using is Omron CJ1M CPU11 with CJ1W-ETN21. I am still very new to labview and i hope somebody can help me out with this and give me some advices on how to proceed. it should also be noted that i cannot change the status of the tags directly from NI OPC Server itself. 

 

Below is the simple circuit i would like to use as a starting point for controlling and monitoring plc data from labview:

 

22443iF884278442062D80

Thanks in advance for the help. 

 

0 Kudos
Message 1 of 10
(10,295 Views)

1. You need to set up OPC server to CJ1M communication following the step in  Start>>All Programs>>National Instruments>>NI OPC Servers>>NI OPC Servers Help>>Omron FINS Ethernet>>Launch Driver Help.

2. Configure I/O Server binding to NI OPC Server.

3. Creating shared variable binding to NI OPC Server tags, and use these variables inside LabVIEW program to communicate with CJ1M.

#2 and #3, please follow http://zone.ni.com/devzone/cda/tut/p/id/7450

0 Kudos
Message 2 of 10
(10,275 Views)

Yes, i have configured the communication between plc, opc and labview with the dsc module like the tutorial. i can also monitor the change in values of the opc tags when i change the states of the switched in cx programmer. 

 

however, i do not know how to write data to the plc from labview. by writing data, i just mean to change the status of the control switches of the ladder diagram (force on, off) hence manipulating the output of the ladder diagram.  

 

 

 

 

0 Kudos
Message 3 of 10
(10,268 Views)

1. Drag shared variable you create in LabVIEW project to block diagram.

2. Right click on it>>Change it to write.

3. Wire the value you wish to write to a shared variable.

0 Kudos
Message 4 of 10
(10,261 Views)

i tried doing a simple write before but it still does not work. is there a tutorial/ sample vi that i can learn from?

0 Kudos
Message 5 of 10
(10,253 Views)

Please attach the whole project include opf file (OPC server configuration)

0 Kudos
Message 6 of 10
(10,242 Views)

ok i have included the project files and the opc file as well. 

0 Kudos
Message 7 of 10
(10,226 Views)
Solution
Accepted by topic author jacintha

You can read only from the input, cannot write.

For output, you can either write or read.

However, if you've a ladder controlling that output line.

It'll have a conflict.

0 Kudos
Message 8 of 10
(10,167 Views)

thanks KateB. i finally can see it for myself. can write/read to output tags but can only read to input tags using datasockets. i just wondered why is it like that? could you explain it to me? 

0 Kudos
Message 9 of 10
(10,098 Views)

I had a similar problem with a Koyo DL06-DR PLC.

 

The solution was to build a ladder input multiplexer: the mux control bit is an internal flag. This flag gets cleared during the PLCs first scan and can be set/reset by the PC to steer where the PLC inputs would come from (either direct inputs or from PC control bits).

 

The outputs can be read/written anytime by the PLC or PC, so the PLC code is written using stage programming techniques, with set/reset instructions being placed only where needed.

0 Kudos
Message 10 of 10
(9,546 Views)