Long inputgetstate(long channel), Digital output attributes, Long outputsetstate(long channel, long state) – Rockwell Automation 2098-IPD-xxx Ultra5000 C Programming using the Motion Library User Manual
Page 89: Long inputgetstate(long channel); -49, Digital output attributes -49, Long outputsetstate(long channel, long state); -49, Inputgetstate, Outputsetstate

Publication 2098-PM001E-EN-P — July 2002
Referencing the Motion Library
2-49
long InputGetState(long channel);
Returns the state of the digital input specified by the channel
argument.
Valid channel arguments are 1 through 28 as follows.
Valid return values for each digital input are:
• 0 = input OFF
• 1 = input ON
long OutputSetState(long channel, long state);
Sets the digital output referenced by the channel argument to the state
indicated by the state argument.
Valid channel arguments are 1 through 8 as follows:
Valid set states for each digital output are:
• 0 = output OFF
• 1 = output ON
Returns 0 if successful, or -1 on an error.
Channel
Input
Description
1 – 16
IN1 – IN16
Digital inputs 1-16
17
IX
Auxiliary encoder index
18
BX
Auxiliary encoder channel B
19
AX
Auxiliary encoder channel A
20 – 22
S1 – S3
Motor hall inputs 1-3
23
IM
Motor encoder index
24
BM
Motor encoder channel B
25
AM
Motor encoder channel A
26
TS
Motor thermostat input
27
NEG_OT
Motor negative overtravel input
28
POS_OT
Motor positive overtravel input
Channel
Output
Description
1 – 8
OUT1 – Out16
Digital outputs 1-8