Setting up Brainboxes with Node-RED

Hi all,

I am currently working on a project which involves the use of Brainboxes to control equipment, either by giving them a digital signal to open / close, or using a analogue signal to adjust for instance a valve.

For my project at hand I am stuck, and therefore asking for your guidance.

I am using the Modbus function to control the Brainboxes. I have a Brainbox ED-008 for the Digital signals, and a ED-560 for Analogue signals.
The task at hand is first to use the ED-560 to send analogue signals to a valve, telling it to open anywhere from 0-100%. The second one is to receive information from a sensor located after the valve. This signal is Digital and connected to the ED-008.

What I could use your guidance for is which Modbus Nodes / other nodes to use to both regulate the valve opening as well as receiving the readings from the sensor.

What I have in mind so far is that it might be possible to use a Modbus Write node, with a basic setup like this:
image

Still struggling to find out what to do with the digital signal.

All comments / tips / tricks will be most welcome. I am open for all suggestions regarding what to use and possible improvements.

Kind regards
Alexander