User Manual

PD-x-1670 TMCL
Firmware Manual Firmware Version V2.0 | Document Revision V1.0 2018-Oct-29
31 / 82
3.6.14 GIO (Get Input)
With this command the status of the available general purpose outputs of the module can be read. The
function reads a digital or an analog input port. Digital lines will read as 0 or 1, while the ADC channels
deliver their bit result in the range of 0. . . . In standalone mode the requested value is copied to the
accumulator register for further processing purposes such as conditional jumps. In direct mode the value
is only output in the value eld of the reply, without aecting the accumulator. The actual status of a digital
output line can also be read.
Internal function:
The state of the i/o line specied by the type parameter and the bank parameter is read.
Related commands: SIO.
Mnemonic: GIO <port number>, <bank number>
Binary Representation
Instruction Type Motor/Bank Value
15 <port number> <bank number> (0/1/2) 0 (dont care)
Reply in Direct Mode
Status Value
100 - OK status of the port
Example
Get the value of ADC channel 0.
Mnemonic: GIO 0, 1.
Binary Form of GIO 0, 1
Field Value
Target address 01
h
Instruction number 0F
h
Type 00
h
Motor/Bank 01
h
Value (Byte 3) 00
h
Value (Byte 2) 00
h
Value (Byte 1) 00
h
Value (Byte 0) 00
h
Checksum 11
h
©2018 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany
Terms of delivery and rights to technical change reserved.
Download newest version at www.trinamic.com