Sensoray 2600 User Manual
Page 46

2600 Family Instruction Manual
41
Chapter 7 : Model 2610 Digital I/O Module
are meaningful only if the specified channel is
configured for the PWM operating mode.
Only channels 0 through 23 can operate in the
PWM output mode. The CERR status flag will
be set if an illegal channel number is specified.
Two values are returned: OnTime and
OffTime
. Each of these values specifies a time
interval, expressed in 2 millisecond increments,
that are currently in effect. These values will be
the values programmed by the most recent
SetPwmRatio
action, or the default values if
no SetPwmRatio action has executed since the
channel’s operating mode was switched to PWM.
7.6.5 GetInputs
Function
Returns the debounced, physical channel states of
all DIO channels.
Opcode
0x04
Command
none
Response
(S<7:0>),(S<15:8>),(S<23:16>),
(S<31:24>),(S<39:32>),(S<47:40>)
Notes
The returned state values represent the
debounced, physical states of all DIO channels.
Because the inputs are sampled every 2
milliseconds, and the debounce period is 10
milliseconds, the returned state values will all
have an age ranging from 10 to 12 milliseconds,
plus any network communication latency.
Note that the physical states of all DIO channels
are returned, regardless of their respective
operating modes.
7.6.6 GetOutputs
Function
Returns the programmed output driver states of
all DIO channels. Note that the programmed
output driver states may not correspond exactly
to the physical channel states (that would be
returned by GetInputs) as some channels may
be driven by external signal sources. In the case
of channels that have been configured for the
PWM mode, this function returns indeterminate
state values.
Opcode
0x05
Command none
Response
(S<7:0>),(S<15:8>),(S<23:16>),
(S<31:24>),(S<39:32>),(S<47:40>)
7.6.7 SetOutputs
Function
Programs the output driver states of all DIO
channels that are configured for the Standard
operating mode.
Opcode
0x06
Command (S<7:0>),(S<15:8>),(S<23:16>),
(S<31:24>),(S<39:32>),(S<47:40>)
Response
none
Notes
SetOutputs
programs the output driver states
of channels that are configured for the Standard
operating mode; it has no effect on channels that
are configured for the PWM operating mode.
In order to optimize the network response time,
SetOutputs
invokes a deferred processing
function on the DIO module. When the
SetOutputs
action executes, it immediately
generates a response to acknowledge receipt of
the action, but the physical driver states may not
change immediately. Instead, the output drivers
will change to their target values within two
milliseconds of executing this action.
Parameter
Function
S[]
Byte array containing 48 bit flags that
represent the debounced, physical
states of all DIO channels. Each bit is
associated with one DIO channel. For
example, bit 17 is associated with DIO
channel 17. Any bit set to one indicates
the associated channel is set to the
active state; any bit set to zero indicates
the channel is set to the inactive state.
Parameter
Function
S[]
Byte array containing 48 bit flags that
represent the programmed output driver
states of all DIO channels. Each bit is
associated with one DIO channel. For
example, bit 17 is associated with DIO
channel 17. Any bit set to one indicates
the associated channel is set to the
active state; any bit set to zero indicates
the channel is set to the inactive state.
Parameter
Function
S[]
Byte array containing 48 bit flags.
Each flag represents the target output
state for one DIO channel. For
example, bit 17 is associated with DIO
channel 17. Set a bit to one to program
the associated channel to the active
state, or to zero to program the channel
to the inactive state.