User guide

Chapter 3. Basic Operation Setup
115
Once you set up the jog functions and move profile, you can attach a switch to the designated
jog inputs and perform jogging. (Jog motion will not occur unless Jog Mode is enabled with
the JOG command.) The example below shows you how to define a program to set up jogging.
Example
Step 1
Define program for jog setup:
DEF prog1 ; Begin definition of program prog1
SCALE0 ; Disable scaling
JOGA25 ; Set jog acceleration to 25
JOGAD25 ; Set jog deceleration to 25
JOGVL.5 ; Sets low-speed jog velocity to 0.5
JOGVH5 ; Sets high-speed jog velocity to 5
INFEN1 ; Enable input functions
INFNC1-1J ; Sets input 1 as a positive-direction jog input
INFNC2-1K ; Sets input 2 as a negative-direction jog input
INFNC3-1L ; Sets input 3 as a speed-select input
JOG1 ; Enable Jog function for axis 1
END ; End program definition
Step 2
Download and run the prog1 program.
Step 3
Activate input 1 to move the load in the positive direction at a velocity of 0.5 units/sec (until
input 1 is released).
Step 4
Activate input 2 to move the load in the negative direction at a velocity of 0.5 units/sec (until
input 2 is released).
Step 5
Activate input 3 to switch to high-speed jogging.
Step 6
Repeat steps 3 and 4 to perform high-speed jogging at the JOGVH value (5 rps).
One-to-One
Program Select
(INFNCi-iP)
Inputs can be defined as One-to-One Program Select inputs (INFNCi-iP). This allows
programs defined by the DEF command to be executed by activating an input. Different from
BCD Program Select inputs, One-to-One Program Select inputs correspond directly to a
specific program number. The program number is determined by the order in which the
program was downloaded to the controller. The program number can be obtained with the
TDIR command—the number noted before the program name is to be used in the second
variable of the INFNCi-iP definition (see programming example below).
To execute programs using the program select lines, enable one-to-one program selection
(INSELP2). Once enabled, the controller will continuously scan the input lines and execute
the program selected by the active program select line. To disable scanning of the program
select lines, enter !INSELPØ, or place INSELPØ in a program that can be selected.
Example
RESET ; Return controller to power-up default conditions
DEF proga ; Begin definition of program proga
TFB ; Transfer position of feedback devices
END ; End program
DEF progb ; Begin definition of program progb
TREV ; Transfer software revision
END ; End program
DEF progc ; Begin definition of program progc
TSTAT ; Transfer statistics
END ; End program
TDIR ; Response should show: *1 - PROGA USES 36 BYTES
; *2 - PROGB USES 70 BYTES
; *3 - PROGC USES 133 BYTES
INFNC4-1P ; Input 4 will select proga
INFNC5-2P ; Input 5 will select progb
INFNC6-3P ; Input 6 will select progc
INFEN1 ; Enable input functions
INSELP2,50 ; Enable scanning of inputs with a strobe time of 50 ms
You can now execute programs by making a contact closure from an input to ground to
activate the input:
Activate input #4 to execute program #1 (proga)
Activate input #5 to execute program #2 (progb)
Activate input #6 to execute program #3 (progc)