0.5.0 • Published 2 years ago

node-red-contrib-omron-fins v0.5.0

Weekly downloads
35
License
MIT
Repository
-
Last release
2 years ago

node-red-contrib-omron-fins

Overview

This is a Node-RED node module to directly interface with OMRON PLCs over FINS Ethernet protocol. For now it only supports READ and WRITE operations over FINS UDP. Works with CV, CS, CJ, NJ and NX PLCs (the ones with FINS support)

Version Update Notes

This release (and possibly future releases upto 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 descision was made - it happens :) Semantic Versioning 2.0.0 will be followed after V1 however for now, where you see V0.x.y...

  • x = major / minor change
  • y = patch / bugfix

Prerequisites

  • node.js
  • Node-RED
  • git (optional) (Used for repository cloning/downloads)

Credits

Credit to Patrick Servello (patrick--) for his original implementation of FINS

Install

Pallet Manager...

The simplest method is to install via the pallet manager in node red. Simply search for node-red-contrib-omron-fins then click install

Terminal...

Run the following command in the root directory of your Node-RED install (usually ~/.node-red or %userprofile%\.node-red)

npm 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

A working example...

PLC Setup

SettingValue
IP192.168.4.88
MASK255.255.255.0
Node88
UDP9600

Node-red Setup

SettingValue
IP192.168.4.179
MASK255.255.255.0

FINS Connection Node Settings

OptionValue
Host192.168.4.88
Port9600
MODENJ/NX
ICF0x80
DNA0
DA188
DA20
SNA0
SA1179
SA20

image

Other notes:

  • If the subnet mask is bigger than /24 (e.g. is bigger than 255.255.255.0) you might need to enter the IP and NODE number (of the node-red server) into the FINS IP address table so that the PLC understands which IP to respond to when responding to the SA1 NODE number
  • FINS works with PLC Addresses. NJ and NX PLCs do NOT have direct addresses to addresses like DM or E0, E1.
    • In order to communicate to a variable in N Series PLCs via FINS you must create a Global TAG and set its 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 image

Data formats and conversion

NOTE: This node returns a buffer, 16bit signed or 16bit unsigned data only. While that may seem restrictive, it was a deliberate design decision to keep the node mean and lean.

Read on...

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.

1.0.0-beta-1

2 years ago

1.0.0-beta-0

2 years ago

0.5.0

3 years ago

0.5.0-beta.4

3 years ago

0.5.0-beta.3

3 years ago

0.5.0-beta.2

3 years ago

0.5.0-beta.1

3 years ago

0.5.0-beta.0

3 years ago

0.4.1

3 years ago

0.4.0

3 years ago

0.4.0-beta.1

3 years ago

0.4.0-beta.0

3 years ago

0.3.1

3 years ago

0.3.0

4 years ago

0.3.0-beta.2

4 years ago

0.3.0-beta.1

4 years ago

0.3.0-beta.0

4 years ago

0.1.3

4 years ago