|
|
| long SegmentAnalogInGet |
( |
long |
segmentNumber, |
|
|
long |
analogChannel | |
|
) |
| | |
- Description:
- SegmentAnalogInGet returns the value of a segment's analog input. It is passed a starting channel ID relative to the Segment (not Node).
- Parameters:
-
| segmentNumber | The segment's (slice) number on the node, starts from 0. |
| analogChannel | The analog input number on the node, starts from 0. |
- Returns:
- (long) Value of the analog input.
- Sample Code:
- On Segment [segNum], get the value of the Analog Input [channel].
printf("Analog Input channel %d on segment %d has value: %x.\n", channel, segNum,
io->SegmentAnalogInGet(segNum, channel));
Console.Writeline("Analog Input channel {0} on segment {1} has value: {2}.", channel,
segNum, io.SegmentAnalogInGet(segNum, channel));
- Notes:
- Slice I/O has multiple segments of same type (Digital/Analog In/Out) which are grouped together. The reference number for any channel of a given type can be defined as when it is encounted relative to the Slice I/O Node or an individual Slice.
- Examples:
-
SliceIO.cs.
|