Skip to main content

Bulk Set Output

Sets all outputs in one go.

If all output logic status are managed by an external application (for example, by a computer application), this instruction allows freedom, speed of execution and a significant time saving. Differently from setting one output at a time, the bulk set output is simplier and faster by passing this work to MBx24 it self. It is bit oriented by clustering 8 outputs in a byte where ones ('1') mean an ON state and zeros ('0') the OFF state.

Request​

012345678910111213141516171819202122232425262728293031
ID21S1S2S3S4

Request Structure​

ByteValueSizeTypeDescription
0ID1BINMBx24 address (ID)
1211BINBulk Set Output instruction code
2S11BINFirst output bank in 8-bit layout - (see remarks)
3S21BINSecond output bank in 8-bit layout - (see remarks)
4S31BINThird output bank in 8-bit layout - (see remarks)
5S41BINFourth output bank in 8-bit layout - (see remarks)

Response​

012345678910111213141516171819202122232425262728293031
ID21V

Response Structure​

ByteValueSizeTypeDescription
0ID1BINMBx24 address (ID)
1211BINBulk Set Output instruction code
2V1BIN1 for successful, 0 otherwise

Remarks​

First output bank (S1) -> Outputs from 1 to 8.

Second output bank (S2) -> Outputs from 9 to 16

Third output bank (S3) -> Outputs from 17 to 24.

Fourth output bank (S4) -> Outputs from 25 to 32.

8-Bit Bank Layout​

MSB 7654321LSB 0
O1O2O3O4O5O6O7O8
  • MSB (Most Significant Bit): The first output of the bank (O1).
  • LSB (Least Significant Bit): The last output of the bank (O8).

Each bit corresponds to an output:

  • O1: 1st output
  • O2: 2nd output
  • And so on...

Example​

Turn ON all the first and last outputs for all banks (1 and 8,9 and 16,17 and 24, 25 and 32) of the MBx24 with ID address of 55:

012345678910111213141516171819202122232425262728293031
5521129129129129

Where:

byte 055MBx24 address ID
byte 121Bulk Set Output instruction code
byte 2129Binary 1000 0001
byte 3129Binary 1000 0001
byte 4129Binary 1000 0001
byte 5129Binary 1000 0001