@industrial-shields/node-red-librpiplc 3.0.1

Industrial Shields librpiplc bindings for Node-RED

npm install @industrial-shields/node-red-librpiplc

by Industrial Shields

node-red-librpiplc provides a Node-RED wrapper for the librpiplc C library, enabling applications to interface with the GPIOs of Raspberry Pi based Industrial Shields PLCs:

  • Analog reads and write
  • Digital reads and writes
  • Relay controlling

Licensing

This library is licensed under the LGPL-3.0-or-later. The test programs are licensed under the GPL-3.0-or-later.

Prerequisites

One of our PLCs: https://www.industrialshields.com/

Installing librpiplc

You must first install the librpiplc, as this library depends on it.

Installing

To install the stable version use the Node-RED Menu -> Manage palette -> Install option, and search for @industrial-shields/node-red-librpiplc. Or you can also run the following command in your Node-RED user directory, typically ~/.node-red:

npm install @industrial-shields/librpiplc@<tagname>

Where <tagname> is the version you wish to download. Before this unification, you had to choose between versions 1.X.X (for V3 PLCs) or 2.X.X (for V4 PLCs). As of 3.X.X this library is compatible with our PLCs regardless of it's version. You can check the available versions in here: https://github.com/Industrial-Shields/node-red-librpiplc/tags

Usage

Provides four nodes:

  1. Analog Read: Gets the value of an analog input.
  2. Analog Write: Sets a value of an analog output.
  3. Digital read: Gets the value of a digital input.
  4. Digital write: Sets a value of a digital output.
  5. Available PLC versions
  6. Available PLC models

Analog Read

Reads the value from the specified analog pin. You have to provide both the version and the model of the Raspberry PLC you are using. Then select an input pin.

analog-read

Analog Write

Writes an analog value (a PWM wave) in the specified analog pin. You have to provide both the version and the model of the Raspberry PLC you are using. Then select an output pin and specify a value between 0 and 4095 (0-10V).

analog-write

Digital Read

Reads the value from a specified digital pin, either HIGH or LOW. You have to provide both the version and the model of the Raspberry PLC you are using. Then select the input pin that will be read.

digital-read

Digital Write

Writes a value to a specified digital pin. You have to provide both the version and the model of the Raspberry PLC you are using. Then select the input pin that will be written, and a value (either HIGH or LOW).

digital-write

RPIPLC set configuration

Before the update that introduced this node, you had to specify for every node which version and model you were using in order to get the correct mapping. Now you can mark a rpiplc-config node as "Custom", and change it's version and model injecting a message to this node with the ".version" and ".model" fields. You can check which versions and models are available in the following sections.

Available PLC versions

RPIPLC_V3 (deprecated)
RPIPLC_V4
RPIPLC_V5

Available PLC models

RPIPLC_19R
RPIPLC_21
RPIPLC_38AR
RPIPLC_38R
RPIPLC_42
RPIPLC_50RRA
RPIPLC_53ARR
RPIPLC_54ARA
RPIPLC_57AAR
RPIPLC_57R
RPIPLC_58

Node Info

Version: 3.0.1
Updated 4 days ago
License: LGPL-3.0-or-later
Rating: not yet rated

Actions

Rate:

Downloads

54 in the last week

Nodes

  • rpiplc-config
  • rpiplc-set-config
  • rpiplc-analog-read
  • rpiplc-analog-write
  • rpiplc-digital-read
  • rpiplc-digital-write

Keywords

  • node-red
  • node-red-librpiplc
  • industrial
  • Industrial Shields
  • raspberry
  • Raspberry Pi

Maintainers