This is a Node-RED node module to directly interface with OMRON PLCs over FINS Ethernet protocol. Tested on CV, CP, CS, CJ, NJ and NX PLCs (the ones with FINS support)
Example flows have been included to help you get started. In the node-red editor, click the hamburger menu, select import then examples (or press ctrl+i)
This release (and possibly future releases up to V1.0.0) has breaking changes.
Where possible, I make every attempt to keep things compatible, but as node-red improves (typedInput widgets for example) I too improve this node to make things easier or better. And sometimes, it becomes plain obvious a wrong decision was made that needs to be rectified before it becomes too late to change - it happens :)
Semantic Versioning 2.0.0 will be followed after V1 however for now, where you see V0.x.y
...
x
= major / minor changey
= patch / bugfixCredit to Patrick Servello (patrick--) for his original implementation of FINS
The simplest method is to install via the pallet manager in node red. Simply search for node-red-contrib-omron-fins then click install
Run the following command in the root directory of your Node-RED install (usually ~/.node-red
or %userprofile%\.node-red
)
npm install node-red-contrib-omron-fins
Or, install direct from github
npm install steve-mcl/node-red-contrib-omron-fins
Or clone to a local folder and install using NPM
git clone https://github.com/Steve-Mcl/node-red-contrib-omron-fins.git
npm install /source-path/node-red-contrib-omron-fins
Setting | Value |
---|---|
IP | 192.168.4.88 |
MASK | 255.255.255.0 |
Node | 88 |
UDP | 9600 |
Setting | Value |
---|---|
IP | 192.168.4.179 |
MASK | 255.255.255.0 |
Option | Value |
---|---|
Host | 192.168.4.88 |
Port | 9600 |
MODE | NJ/NX |
ICF | 0x80 |
DNA | 0 |
DA1 | 88 |
DA2 | 0 |
SNA | 0 |
SA1 | 179 |
SA2 | 0 |
AT
property. E.G. If you want to read and write 40 WDs from E0_9000 ~ E0_9039 then you need to add a TAG like this TAG_NAME ARRAY[0..39] Of WORD %E0_9000
As I use multiple PLCs and didn't want to write boolean / 32bit / float / double functionality into each node (it's best to keep things atomic and good at what they do) so I wrote a separate second node for handling data conversions.
This node "node-red-contrib-buffer-parser" https://flows.nodered.org/node/node-red-contrib-buffer-parser is capable of pretty much anything you will need for this or any PLC that returns 16bit data or a NodeJS Buffer.
In essence, you pull a bunch of data from the plc in one go & convert it all in the buffer-parser node to almost any format you could wish for (bits, floats, 32bit signed / unsigned, byteswapping etc etc). It can do 1 or many conversions all at once. It can send a grouped item (object) or individual items with a topic
ready for pushing your data directly from the PLC to MQTT.