Skip to content

ACSPL programs

Pete Bachant edited this page Dec 20, 2015 · 3 revisions

This sections contains information regarding existing and sample ACSPL+ programs. See the ACSPL+ programmer's guide for more information.

Existing programs

The table below summarizes the programs present in the Tow Tank's motion controller, and whether or not they are okay to edit:

Buffer Description Okay to edit?
0 Initialization buffer. No
1 S700 (tow axis) low level support buffer. No
2 Tow axis homing routine. No
3 Back-and-forth move on the tow axis. Yes
4 Point-to-point move on the tow axis. Yes
5 Enable jog pendant for tow axis. No
6 Turbine towing with AKD drive. No
7 Typical tow cycle with two points and two speeds. Yes
8 Initialized parameters for the AKD (turbine) axis. No
9 Jogs turbine axis for 32 seconds and returns to zero. Yes
10 Enables the jog pendant to move the z-axis. No
11 z-axis homing routine. No
12 y-axis homing routine. No
13 Enables the jog pendant to move the y-axis. No
14 Back-and-forth move on the y-axis. No

Trigger a sensor at a specified carriage position

This program turns on the digital output at the onboard electronics cabinet's BNC connector when the carriage is ahead of a certain position, and turns it off otherwise. It can be run continuously while other programs run.

REAL trigger_pos

trigger_pos = 4.0

WHILE 1
    IF RPOS(5) > trigger_pos
        OUT1.16 = 1
    ELSE
        OUT1.16 = 0
    END
END

STOP

Move y- and z-axes in a circular arc

This program moves the y- and z-axes in a clockwise cyclic circular arc motion until the variable move == 0, then moves them back to (0, 0).

GLOBAL move
move = 1

MSEG/c (0,1), 0, 0
ARC1 (0,1), 0.5, 0, 0, 0,-
ENDS (0,1)

TILL ^move

HALT(0,1)
PTP(0,1), 0, 0

STOP

Multiple velocity move

TRACK 5                 ! Create track motion on axis 5 (tow axis)
VEL(5) = 0.25
ACC(5) = 0.25
DEC(5) = 1.0

TPOS(5) = 4             ! Move to this position at slow speed
ACC(5) = 1.00           ! Set high acceleration
VEL(5) = 2.00           ! Set high speed
TILL GPHASE(5) >= 6     ! Wait until slow move is about to start decelerating
TPOS(5) = 20            ! Set new target position somewhere before the end of the tank
                        ! it will stop before here anyway. 
TILL GPHASE(5) > 3      ! Wait until carriage reaches steady velocity then halt
HALT 5
STOP                    ! Don't forget the STOP at the end of all programs