Sd - set direction, Command details, Parameter details – Applied Motion RS-232 User Manual
Page 196: Examples

196
920-0002 Rev. I
2/2013
Host Command Reference
SD - Set Direction
Compatibility: Integrated Steppers with Flex I/O
Affects:
All input and output commands
See Also:
AI, AO, BO, DL, MO and SI
The Flex I/O feature allows the user to specify the direction of each I/O point. That is, to configure each as either
an input or output. SD may be used as a query if issued without a parameter. The drive will then report the
direction of each I/O point.
WARNING: The SD command allows dynamic changes to I/O behavior of the drive, and may cause
unintended interactions with other machine components if not implemented properly. Extreme caution
should be used. The SD command is documented here only for completeness; Applied Motion Products
strongly recommends that the Configurator software be used to make changes to drive I/O behavior.
Command Details:
Structure
SD{Parameter #1}{Parameter #2}
Type
BUFFERED
Usage
READ/WRITE
Non-Volatile
Yes
Register Access
None
Parameter Details:
Parameter #1
I/O point to configure
- units
Integer
- range
1 - 4
Parameter #2
Direction (input or output)
- units
Single character
- range
‘I’ or ‘O’ (letter ‘O’, not zero)
NOTE: This command requires either the letter ‘I’ (input) or ‘O’ (output) as Parameter #2. The drive’s response
however, is composed of the numbers 1 (one = input) or 0 (zero = output).
Examples:
Command
Drive sends
Notes
SD2O
-
Set I/O point 2 as an Output
SD4I
-
Set I/O point 4 as an Input
SD
SD=00000111
Drive reports that I/O points 1, 2 and 3 are inputs, 4 is an output. (Note:
on the STM24, I/O points 5-8 are unused)