Ai (after input), Trippoint, N is a signed integer – Yaskawa LEGEND-MC User Manual
Page 69

59
LEGEND-MC User’s Manual
AI (After Input)
[Trippoint]
DESCRIPTION:
The AI command is used in motion programs to wait until after the specified input condition has occurred.
If n is positive, it waits for the input to go high. If n is negative, it waits for n to go low. To wait for a
transition from high to low or low to high, put two AI commands together. AI is only available for local
inputs.
ARGUMENTS: AI +/-n
where
n is a signed integer
USAGE:
RELATED COMMANDS:
EXAMPLES:
NOTE: The AI command actually halts execution until specified input is at desired logic level. Use the conditional Jump
command (JP) or input interrupt (II) if you do not want the program sequence to halt.
While Moving
Yes
Minimum Value
1
In a Program
Yes
Maximum Value
8
Command Line
Yes
Default Value
---
Can be Interrogated
No
Default Format
---
Used as an Operand
No
Distributed Control
No, Local
@IN[n]
Function to read digital input 1 through 8
"II" Input
interrupt
#ININT
Special label for input interrupt
#A
Begin Program
AI 7
Wait until input 7 is high
SP 10000
Speed is 10000 counts/sec
AC 20000
Acceleration is 20000 counts/sec2
PR 400
Specify position
BG Begin
motion
AI+ 7; AI- 7
Wait for falling edge on input 7
EN
End Program