I am using node-red-omronplc to communicate RS485 to an Omron PLC. I'm able to read and write information from the controller using static information in the nodes, but I cannot find a way to set the information from outside the node.
Are there examples to go with this code?

Try replacing your highlighted info with {{msg.payload}} and then feed the information from another node, function, inject, etc. as msg.payload = "1234000056780000" or something similar.


Thanks for the recommendation.
It did not work.

Anything put in for the data is placed directly on the output. It does not get interpreted. This then causes an error.

Then it sounds like you need to take this up with the author of that node

What PLC is it? Is there no option of an Ethernet connection?

Thanks Gunner.
I know this is the link for the software.
How do I send the author a message?

Hi Steve-Mcl,
This is an Omron CP1H it has an RS485 port that I can send and receive information, but I am unable to change any hardcoded addresses and values in the node.
It does not have an Ethernet port or I would be using the FINS communication nodes that work well with the Omron.

Hmm, no git-hub link, just one to npm... sorry, I have no idea. Looks like a random contrib with no support option.

Try searching for alternate nodes?

Thanks Gunner,
I appreciate the information.

Try. npm ls owner (package name)

C:\Users\gclsh>npm ls owner node-red-omronplc
`-- (empty)

Thanks for the suggestion.It looks like this was not filled out by the programmer.

Do any of the alternative nodes work for you?

Try leaving the field blank and set the incoming msg...


msg.numberOfWord = 2;
return msg

Or use a change node

Ps, can you screenshot the built in help from the sidebar.

Nevermind, I had a look at the src, its 100% hard coded.

Also, tried searching the noremal places for the creator wijdanAriff and the project (on github, gitlab, google etc) - nowhere to be found.

Luckily, it is licensed as ICS so if I get a chance later today or later this week, I will look at the feasibility of publishing a dynamic version of it.

1 Like

sorry I had the command above backwards

npm owner ls node-red-omronplc
wijdanariff <>

So you could try email.

Hi Steve-Mcl,
Thanks for looking into this. That would be great to have a dynamic version. Other than the hard coding on the omron-command node, the program works well.
Here are the 4 variables that need to be dynamic.
Host Number - Two ASCII digits - 00 to 31 - This represents the controller to communicate.
Header Code - Two ASCII digits - This represents the function that is required to either read or write to the controller.
Beginning Word - four ASCII digits - This is the starting memory location to read or write.
Number of Word - This can be the number of words when reading (4 ASCII digits) or up to 240 ASCII words for the information to write.
Here is the manual for reference if you have any questions.

I appreciate the help.
Thanks again,

Thank you dceejay.
I will send the owner an email.

No bother, I am fairly up to speed on all things OMRON (I wrote the omron-fins nodes)

Great job on the Omron FINS node!
The Omron Host Link or C-command modes will work with the current CP1 series. It will also work with the older 'K' series, C200H, C2000 , C20, etc. These two protocols cover the Omron line.

Here is what I would like to do with this modified node.
I have a blog that teaches how to program PLCs.
Here is the series on the CP1H.
Recently I started to post about Node-RED and how to use this to communicate to PLCs (Modbus TCP / RTU), create a dashboard, and store information in a SQL database. (SQLite)

I thought that I would show how to communicate to the CP1H controller using Node-RED after a question was asked.

1 Like