Discrete Outputs

Discrete outputs (also known as coils) are single bits wired to external devices whose states are controlled by the Modbus device. They can be read from or written to, and are often controlled by the device's programmable logic.

Camel-jamod implements a polling consumer for reading the status of discrete outputs (or coils), which can be useful for third-party monitoring the device or for verifying the device's programmable logic.

Each time the device is polled, the consumer will send the resulting BitVector to the Camel route. This behavior can be modified to only send messages when one or more inputs change by specifying changesOnly=true in the URI's query string.

The BitVector contains the status of all the bits polled. Individual bit values can be retrieved using BitVector.getBit(int), where the first bit is at position 0.

Optional parameters:

PropertyDefaultDescription
changesOnlyfalseWhen true, messages will only be sent to the camel route when one or more digital outputs have changed state since the last polling.