Need Help on connecting OMRON PLC CP1E with Node-Red

already done it.My problem now is how can node-red read the data from the PLC?because right now i only establish connection with the plc but node-red still cant receive the data

Are you still getting an error? If not then what is happening and what should be happening?

so the chances are that the settings in the serial node don’t match the settings of the device.

You can either use the other programme and write them down or use google to see the devices requirements

What are you trying to do?

If you want to read/write data from/to the plc, you should know the protocol and the communications commands. Generally the plc communication is based on a master/slave method, that means you have to send a command from node-red to the plc and read the answer.

Have a look a the omron documentation:
https://assets.omron.eu/downloads/manual/en/v1/w342_cs_cj_cp_nsj_communications_commands_reference_manual_en.pdf

Can you show me an example?Im trying to read the data in my plc and display it in node-red.Im not very familiar with the master/slave method.

As I previously suggested, possibly one of the modbus nodes will do what you want.

Not so easy to do, read the documentation and you'll realise what it meas.
Search for omron protocol maybe you'll find a node.js example.

1 Like

No, modbus (Modicon protocol) doesn't work. Almost every plc manufacture has an own protocol.

Hi

Buildin RS485 on that plc support • Modbus-RTU Easy Master and/or No protocol mode (RS485)
U can connect on both
Try to use node-red-contrib-modbus and your node-red need to be configured as slave coz plc can act only as master
PS
Search after "node-red modbus plc"
/IQAPPS

Today,i manage to fetch data from the plc using Node Red.But i dont know what data is been received from PLC.Here i attach the picture of program in PLC and node-red debug message

Hi Mate.

Install this set of modules. https://flows.nodered.org/node/node-red-contrib-modbus

It will work more seamlessly. Soon as you install the nodes and open them up you will soon figure it out.
Basic settings like.
Unit ID
Function codes
Address
Quantity
Poll Rate

Looking at your picture you have got a connection to your device.

Download that pack, it will work

Now i managed to get data from PLC.But right now i want to fetch data in one complete set.Can someone teach me?

Try experimenting with different settings for your serial node.

already done it..but the result is still the same

I think @ukmoose meant to experiment with the split character/buffer size/timeout settings.

Sorry for my late reply..im right now outside from my country attending training.I will experiment with the split character/buffer/timeout settings after i finish my training on 2nd of December.

Please, Can you inform me how did you manage to fetch data ? and wich configuration do you use in cx programmer and node-red serial port ?

1 Like

Please, Can you inform me how did you manage to fetch data ? and wich configuration do you use in cx programmer and node-red serial port ?


You may use C-mode command node for this. The snip above is the PLC type and what type of task node red wants to do from the PLC. In this case, I have read the PLC data memory from Cx programmer, and able to display it to node red.

For more detailed discussion, you can look up into this :

It is a solved discussion on interfacing Omron CP2E Plc to Node Red using RS485