Example - turn on output after move, Digital inputs, Example – Yaskawa LEGEND-MC User Manual

Page 328

Advertising
background image

318

LEGEND-MC User’s Manual

Example - Turn ON Output After Move

Digital Inputs

The LEGEND-MC has eight digital inputs for controlling motion by local switches. The @IN[n] function
returns the logic level of the specified input 1 through 8. For example, a Jump on Condition instruction
can be used to execute a sequence if a high condition is noted on an input 3. To halt program execution,
the After Input (AI) instruction waits until the specified input has occurred.

Example:

#OUTPUT

Label

PR 2000

Position Command

BG

Begin

AM

After move

SB1

Set Output 1

WT 1000

Wait 1000 msec

CB1

Clear Output 1

EN

End

JP #A,@IN[1]=0

Jump to A if input 1 is low

JP #B,@IN[2]=1

Jump to B if input 2 is high

AI 7

Wait until input 7 is high

AI -6

Wait until input 6 is low

Advertising