Program listing, Appendixes program listing – Rockwell Automation 1398-PDM-xxx IQ Master Version 3.2.4 for IA-2000 and IQ-5000 Positioning Drive Modules, IQ-55 User Manual

Page 370

Advertising
background image

348

System Programs • System Program 25 - Home

Publication 1398-PM601A-EN-P — October 2000

APPENDIXES

Program Listing

;Source File Name: HOME_STD.QPS

;Version: 3.00

;Tested with IQMaster Version: 3.00

;Tested with IQ firmware Version: 3.00

;------------------------------ Description ------------------------------

;This is the default ’Home’ program.

;This program is saved as System Program #25 in standard personality modules.

;The source is NOT saved in standard personality modules.

;

; This home program will home to a home switch, or an index or

; both. If limit switches are enabled and a limit switch is hit before the

; home switch is seen, the axis will change direction and continue looking

; for the home switch. Once the home switch is seen, the axis will slowly

; look for the (-) edge of the home switch (the edge of the switch that

; will be seen first when moving forward and coming on to the switch). If

; the index is not enabled, this edge position will be the reference position

; for the offset move. If the index is enabled the axis will continue to

; move into the switch and look for the next index. Once the index is seen,

; the index position will be reference position for the offset move. Hitting

; a limit switch during the offset move is not allowed and will cause a fault.

;

;v2.10 5/24/94 Changed S3 CONT and S5 CONT to ON commands so that no

;

overlapping of scanned events would happen.

;

Removed some unused labels.

;v3.00 2/13/96 Added compiler options statements

;

;------------------- V variables used --------------------

TITLE "Home_std"

PGMTYPE = MAINPGM ;Set compiler options

DEBUG = OFF

ASSIGN origJacc V1 ;holds original Jog accel

ASSIGN origJdec V2 ;holds original Jog decel

ASSIGN creep V3 ;Slow speed into index

ASSIGN HomeVel V4 ;HomeVel (changed during program execution)

ASSIGN limcnt v5 ;how many limit switches has it seen so far?

ASSIGN temp V6 ;temp for calculations

ASSIGN state V7 ;State variable for Home program

;initial 0 ;Initial state

;FL & RL Hit 1 ;both forward and reverse limits hit at same time

;FLHit 2 ;Forward limit hit state

;RLHit 3 ;Reverse limit hit state

;HS edge ON 4 ;Home switch edge on

;HS edge OFF 8

;IOn 16 ;Index hit

;---------- No G variables, F or B flags used ------------

;

;------------------------ Inputs -------------------------

;Input 01 ;if limit switches are enabled, this is the reverse limit

;Input 02 ;if limit switches are enabled, this is the forward limit

;Input 05 ;if home switch is enabled, this is it

;Input 06 ;if home input is enabled,

; this input can start the home program

;

;------------------------ Outputs ------------------------

;Output 06

;if Home Sequence complete output is enabled, this

; output will come on after the axis has successfully

; homed

;------ Optional Accessories Required/Supported ----------

;Operator Terminal - SUPPORTED for reporting errors

Advertising