Additional functions
13.1 Axis functions (AXNAME, AX, SPI, AXTOSPI, ISAXIS, AXSTRING)
Job planning
13-2 Programming Manual, 03/2006 Edition, 6FC5398-2BP10-1BA0
Parameter
AXNAME Converts an input string into axis identifiers; the input
string must contain a valid axis name.
AX Variable axis identifier
SPI Converts the spindle number into an axis identifier; the
transfer parameter must contain a valid spindle number.
n Spindle number
AXTOSPI Converts an axis identifier into an integer spindle index.
AXTOSPI corresponds to the reverse function to SPI.
X, Y, Z Axis identifier of AXIS type as variable or constant
AXSTRING The string is output with the associated spindle number.
ISAXIS Checks whether the specified geometry axis exists.
SPI extensions
The axis function SPI(n) can now also be used for reading and writing frame components,
for example, for writing frames with syntax $P_PFRAME[SPI(1),TR]=2.22. The additional
programming of the axis position using the address AX[SPI(1)] = <axis position>
can be used to traverse an axis.
AXTOSPI extension
AXTOSPI can be used to convert an axis identifier into a spindle number. If the axis identifier
cannot be converted into a spindle number, an alarm message is triggered.
Troubleshooting for AXSTRING[ SPI(n) ]
For the programming with AXSTRING[ SPI(n) ], the axis index of the axis to which the
spindle is assigned will no longer be output as spindle number, but rather the string "Sn"
will be output.
Example:
AXSTRING[ SPI(2) ] returns string "S2"
Example
Move the axis defined as a facing axis.
OVRA[AXNAME("Transverse axis")]=10 ;Transverse axis
AX[AXNAME("Transverse axis")]=50.2 ;Final position for transverse axis
OVRA[SPI(1)]=70 ;Override for spindle 1
IF ISAXIS(1) == FALSE GOTOF CONTINUE ;Does abscissa exist?
AX[$P_AXN1]=100 ;Move abscissa
CONTINUE: