A Node-RED custom node package for connecting to Allen-Bradley Micro800 PLCs using Node-Logix. This package provides two nodes: Micro800 (for single tag read/write) and Micro800-Array (for array tag read/write), making it easy to integrate your PLCs with Node-RED flows.
- Configure PLC connection parameters
- Read and write single tags or arrays of tags on Allen-Bradley Micro800 PLCs
- Supports both simple and advanced use cases
- Built on top of the Node-Logix library
Read or write a single tag on a Micro800 PLC.
Configuration:
- Host IP: The IP address of the PLC
- Read Tag: The tag to read
- Write Tag: The tag to write
- Write Value: The value to write (for write action)
- Action: Choose "Read" or "Write"
Input Message Format:
- To override configuration, set properties in
msg.payload
:action
: "read" or "write"tag
: Tag to use (overrides configured tag)value
: Value to write (for write action)
Examples:
{
"payload": {
"action": "read",
"tag": "MyTag"
}
}
{
"payload": {
"action": "write",
"tag": "MyTag",
"value": 123
}
}
Read or write an array tag on a Micro800 PLC.
Configuration:
- Host IP: The IP address of the PLC
- Array Tag: The name of the array tag (e.g.,
MyArrayTag
) - Data Type: The data type of the array elements (DINT, INT, REAL, BOOL, etc.)
- Array Length: Number of elements to read or write
- Action: Choose "Read" or "Write"
- Write Value: The array of values to write (for write action)
Input Message Format:
- To override configuration, set properties in
msg.payload
:action
: "read" or "write"arrayTag
: Tag to use (overrides configured tag)dataType
: Data type (overrides configured type)length
: Number of elements (overrides configured length)writeValue
: Array of values to write (for write action)
Examples: Read 5 elements from an array:
{
"payload": {
"action": "read",
"arrayTag": "MyArrayTag",
"dataType": "DINT",
"length": 5
}
}
Write an array to the PLC:
{
"payload": {
"action": "write",
"arrayTag": "MyArrayTag",
"dataType": "DINT",
"length": 3,
"writeValue": [10, 20, 30]
}
}
...
...
...
...
- Install this node in your Node-RED user directory:
npm install node-red-contrib-micro800plc
- Restart Node-RED.
- Drag the
Micro800
orMicro800-Array
node into your flow. - Configure the PLC connection and tag parameters in the node properties.
Both nodes output a message with the following structure in msg.payload
:
tag
orarrayTag
: The tag name usedvalue
: The value(s) read or writtendataType
: The data type usedstatus
: Operation status (e.g.,read-success
,write-success
)
MIT