|
|
| long DigitalInGet |
( |
long |
startBitNumber, |
|
|
long |
bitCount | |
|
) |
| | |
- Description:
- DigitalInGet returns the state of multiple digital input bits. It is passed a starting bit ID relative to the Node (not Segment).
- Parameters:
-
| startBitNumber | The starting digital input bit number on the node, starts from 0. |
| bitCount | The number of digital input bits to get (1 minimum, 32 maximum). |
- Returns:
- (long) State of the inputs.
- Sample Code:
- Check [numberBits] starting at [startBit] of Digital Input bits.
printf("State of the %d input bits, starting with bit %d: 0x%x.\n", startBit, numberBits,
io->DigitalInGet(startBit, numberBits));
Console.Writeline("State of the {0} input bits, starting with bit {1}: 0x{2}.", startBit,
numberBits, io.DigitalInGet(startBit, numberBits));
- Notes:
- Method will fail if startBitNumber and bitCount attempt to read more bits than exist on the I/O node. Slice I/O has multiple segments of same type (Digital/Analog In/Out) which are grouped together. The reference number for any bit of a given type can be defined as when it is encounted relative to the Slice I/O Node or an individual Slice.
- See also:
- DigitalOutSet
|