Class OutputBits
All of the Maple HMI panels receive the same output bits. This keeps them synchronized. Output is sent in "broadcast" mode to Station Address 0. All HMI's receive the output. Output is sent at the end of each polling cycle, whether or not anything has changed. That way, if an HMI panel is plugged in, it will be up-to-date within one polling cycle. Serial systems with unique output bits for each node keep their output array in each node. That code has been moved to this utility class for Maple Systems because all nodes share the same output bits. Coil bits within Maple Systems HMI's are divided into input (1-1000) and output (1001-9000), so input bits are read starting from HMI address 1, and output bits are written starting at HMI address 1001.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateOutPacket(int startBitNum, int endBitNum) Create a Transmit packet (SerialMessage).static intbooleangetOutputBit(int bitNumber) Get the current state of an output bit.static intstatic voidsetNumOutputBits(int n) voidsetOutputBit(int bitNumber, boolean state) Set an output bit.static voidsetSendDelay(int n)
-
Field Details
-
outputArray
-
-
Constructor Details
-
OutputBits
-
-
Method Details
-
setNumOutputBits
-
getNumOutputBits
-
setSendDelay
-
getSendDelay
-
setOutputBit
Set an output bit.Note: state = 'true' for 0, 'false' for 1. Bits are numbered from 1 (not 0)
- Parameters:
bitNumber- bit index number starting from 1.state- true for 0, false for 1.
-
getOutputBit
Get the current state of an output bit.Bits are numbered from 1 (not 0).
- Parameters:
bitNumber- bit number to check, index starts at 1.- Returns:
- 'true' for 0, 'false' for 1
-
createOutPacket
Create a Transmit packet (SerialMessage).- Parameters:
startBitNum- start bit number.endBitNum- end bit number.- Returns:
- serial message.
-