
In Node-RED msg are messages which are passed between nodes containing any data we choose. Once we have successfully set up 8 write nodes, addressed to 8 separate digital outputs we need a node to generate a msg.payload with specified On and Off values to alter the state of these digital outputs. Setting up a toggle button for a Digital Output To save time you can CTRL+C and CTRL+V the first node we set up:

So therefore address 1 will be used to address digital output 1 and so on: The first write node we created used address 0, meaning that it is addressing digital output 0. We can use the same settings as above to create our following 7 Modbus-write nodes, however for each node you will need to change the address by increments of 1. Controlling All Digital Outputs from Node-RED

We currently have one write node set up and configured to address digital output 0, we now need to create more. Then you know you have successfully created a Modbus TCP connection to your ED device. Once you have selected deploy, please navigate back to your ED device web page where you will see this banner: Selecting this deploys the nodes to the Node-RED server, essentially executing the code.

Once you have done this, click the deploy button in the top right corner of the screen:

Help on finding the IP address of your Brainboxes device can be found here: How do I connect to a Remote IO device? To do this please navigate to your device’s web configuration page, which can be accessed by entering in your device’s IP address into your web browser. However, this guide will work for any ED device.īefore you get started you need to make sure that your ED device is set up correctly, here we are using Modbus TCP to control and read IO lines, so you need to make sure your device is set to the correct protocol.Īll Brainboxes devices are shipped from the factory in the ASCII protocol, so this step is important for this example to work. In this example we will be using a Brainboxes ED-588 which has 8 dedicated input channels and 8 dedicated output channels. Configuring your Brainboxes Remote IO Device
#Using modbus server Pc#
Node-RED can be used on a PC or alternatively you can access a Node-RED instance on your BB-400. This FAQ will explain how Modbus TCP can be used with Node-RED to control the IO lines.
