U511 User’s Manual Programming Examples
Version 1.1 Aerotech, Inc. 9-21
9.14. Power on Subroutine/Global Subroutine File
A global subroutine file can be used to implement functions common to multiple
programs. The file name (usually called "glbsub.prg"), is specifed in the setupscreen of
the U511. Several entries are defined and are hard coded by the U511. These are:
:poweron Used to execute a sequence of commands when the U511 is first
powered up. These can include unit setup, enabling of axes, homing of
axes, etc.
(The following entry points can only execute non-synchronized commands such as
MW and OE:)
:abort This subroutine is executed when the ABORT front panel key is pushed.
:pauseon This subroutine is executed when the pause key is pushed and the U511
enters the PAUSED state.
:pauseoff executed when the pause key is pushed and the U511 exits the PAUSED
state.
:faultack executed when the FLTACK (fault acknowledge) front panel key is
pushed.
The U511 is factory shipped with a global subroutine file called "glbsub.prg." It has
several example commands in it which are commented. Global subroutines can be
executed from the MDI command window or from remote mode. From the MDI window,
enter "SUB :xxxx" to execute the subroutine. From remote mode, send "ISUB :xxxx".
"xxxx" refers to the label entry point in the subroutine file.
;********************************************************************************************
;****** EXAMPLE GOLBAL SUBROUTINE FILE SHOWING HARD**********
;******************************* CODED ENTRY POINTS *****************************
;********************************************************************************************
;; Executed on power-up
:POWERON
;EN X Y Z U
;WA ON
;DW 10
;FA
;PR IN
RETURN
;; Executed when ABORT key is pressed
:ABORT
;OE0 0
RETURN
;; Executed when PAUSE state activated
:PAUSEON
;OE0 0
RETURN
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com