TI

Syntax:Implicit Only
Operands:_TI0,_TI1,_TI2,_TI3,_TI4,_TI5
Burn:not burnable

Tell Inputs

Hardware: All

Full Description

The TI command returns the state of the inputs including the extended I/O configured as inputs. The value returned by this command is decimal and represents an 8 bit value (decimal value ranges from 0 to 255). Each bit represents one input where the LSB is the lowest input number and the MSB is the highest input bit.

Arguments

TIn

where
n = 0     Return Input Status for Inputs 1 through 8
n = 1     Return Input Status for Inputs 9 through 16 ( Applies only to controllers with more than 4 axes)

n = 10     Return Input Status for Inputs 81 through 88 (auxiliary encoder inputs)
n = 11     Return Input Status for Inputs 89 through 96 (auxiliary encoder inputs)

no argument will return the Input Status for Inputs 1 through 8
n = ? returns the Input Status for Inputs 1 through 8

n = 2 through 5 see note 2 (These arguments only apply when using extended I/O configured as inputs)
          where n represents the extended inputs ranging from (8*n)+1 through (8*(n+1))

Operand Usage

_TIn contains the status byte of the input block specified by 'n'. Note that the operand can be masked to return only specified bit information - see section on Bit-wise operations.

Usage

Usage and Default Details
UsageValue
While Moving (No RIO)Yes
In a ProgramYes
Command LineYes
Default ValueN/A

Related Commands

@IN - Read digital input

CO - Configure Extended I O

Examples:

:TI1             Tell input state on bank 1
:8               Bit 3 is high, others low
:TI0
:0               All inputs on bank 0 low
:Input =_TI1     Sets the variable, Input, with the TI1 value
:Input=?
:8.0000