User manual

PDx-113-57/60-SE / TMCM-113-57/60-SE Firmware Manual (V1.10 / 2009-OCT-28) 51
Copyright © 2009, TRINAMIC Motion Control GmbH & Co. KG
6.7.14 SIO (set output)
This command sets the status of the general digital output either to low (0) or to high (1).
Internal function: The passed value is transferred to the specified output line.
Related commands: GIO, WAIT
Mnemonic: SIO <port number>, <bank number>, <value>
Binary representation:
INSTRUCTION NO.
TYPE
MOT/BANK
VALUE
14
<port number>
<bank number>
<value>
Reply structure:
STATUS
VALUE
100 OK
(don't care)
Example:
Set OUT_1 to high (bank 2, output 1; general purpose output)
Mnemonic: SIO 1, 2, 1
Binary:
Byte Index
0
1
2
3
4
5
6
7
8
Function
Target-
address
Instruction
Number
Type
Motor/
Bank
Operand
Byte3
Operand
Byte2
Operand
Byte1
Operand
Byte0
Checksum
Value (hex)
$01
$0e
$07
$02
$00
$00
$00
$01
$19
Available I/O ports of PDx-113-57/60-SE:
Addressing both output lines with one SIO command:
Set the type parameter to 255 and the bank parameter to 2.
The value parameter must then be set to a value between 0…255, where every bit represents one
output line.
Furthermore, the value can also be set to -1. In this special case, the contents of the lower 8 bits of
the accumulator are copied to the output pins.
Example:
Set both output pins high.
Mnemonic: SIO 255, 2, 3
The following program will show the states of the input lines on the output lines:
Loop: GIO 255, 0
SIO 255, 2,-1
JA Loop
18
Pin
I/O port
Command
Range
5
OUT_0
SIO 0, 2, <n>, (n=0/1)
1/0
6
OUT_1
SIO 1, 2, <n>, (n=0/1)
1/0