According to the Amazon comments, basic operation just requires a single byte.
As a simple test, you could try using the serial port file system endpoints built-into Windows.
E.G. open a command prompt, type in
echo W > COM1
and see if seven of the relays turn on (replace COM1 with the serial port identifier of your device)
To control each relay individually, you'd likely want to use a plugin or inline function, given that 255 is not a simple ASCII character. There is no such plugin (or inline function) that I'm personally aware of.
You'll also need to either keep track of which relays are on already, as the interface is stateless (meaning, if you send a command to turn on only one relay, it'll turn all the other ones off), or check whether the board you're using supports retrieving the current state (especially useful between sessions/after power cycling).
A basic(-ish) inline function could look something like
using System.IO.Ports;
using System.Collections;
public class VAInline
{
public void main()
{
VA.SetBoolean("relay0On", !VA.GetBoolean("relay0On") ?? false); // Toggles the first relay each time the inline function executes
byte[] serialBytes = {0};
BitArray dataBits = new BitArray(serialBytes);
for (int i = 0; i < 8 ; i++)
{
bool relayState = VA.GetBoolean("relay" + i + "On") ?? false;
{
dataBits.Set(i, relayState);
}
}
dataBits.CopyTo(serialBytes, 0);
SerialPort port = new SerialPort("COM9");
port.Open();
port.Write(serialBytes, 0, serialBytes.Length);
VA.WriteToLog("sent " + serialBytes[0]); // Writes the decimal value of the byte to the log
port.Close();
}
}
If you set a series of Boolean variables, named "relay0On" to "Relay7On" to either True or False, the corresponding relays should energize or de-energize accordingly when you execute the inline function.
Relay 0 (I.E. the first relay) is toggled each time the inline function executes, and a decimal representation of the byte is written to the log, for testing. Neither are required for normal operation.