1.0.10 • Published 3 years ago

node-red-contrib-redplc-unipi11 v1.0.10

Weekly downloads
11
License
Apache-2.0
Repository
github
Last release
3 years ago

node-red-contrib-redplc-unipi11

Node-Red node for Unipi 1.1

Node Features

  • 12 x 5-24V Digital Inputs
  • 8 x Relays
  • 2 x Analog Inputs (0..10V)
  • Each analog input can be selected 12bit-18bit or Disabled
  • 12bit conversion time 5ms/channel
  • 14bit conversion time 25ms/channel
  • 16bit conversion time 100ms/channel
  • 18bit conversion time 300ms/channel
  • Analog input value in mV
  • Scaling with factor and offset

Install

For using with Ladder-Logic install redPlc nodes

For using with other nodes, install module nodes

Install with Node-Red Palette Manager or npm command:

cd ~/.node-red
npm install node-red-contrib-redplc-unipi11

Usage

Update is triggered by redPlc cpu node or module-update node This node reads/writes from/to Node-Red global variables This node works only on Raspberry Pi with Raspberry Pi OS. Enable I2C with raspi-config.

I/O Mapping

Digital Input (Variable I):

BitFunction
0I01
1I02
2I03
3I04
4I05
5I06
6I07
7I08
8I09
9I10
10I11
11I12

Digital Output (Variable Q):

BitFunction
0Relay 1
1Relay 2
2Relay 3
3Relay 4
4Relay 5
5Relay 6
6Relay 7
7Relay 8

Analog Input (Variable IA):

Array-IndexInput
0AI1
1AI2

Scaling with Factor and Offset:

Formula:

Factor = (OH - OL) / (IH - IL)
Offset = OL - (IL * Factor)

Output = Input * Factor + Offset

Where:

IL = Input Low (mV), IH = Input High (mV) 
OL = Output Low, OH = Output High

Example:

Input: 0mV .. 10000mV, IL = 0, IH = 10000 Output: -20°C .. 60°C, OL = -20, OH = 60 Factor = (60 - (-20)) / (10000 - 0) = 0.008 Offset = (-20) - (0 * 0.008) = -20

Input = 4000mV Output = 4000 * 0.008 + (-20) = 12°C

Donate

If you like my work please support it with donate:

Donate