osai 10 CNC PLUS LIBRARY User Manual

10 Series CNC
PLUS LIBRARY
User Manual
Code: 45006682C Rev. 09
PUBLICATION ISSUED BY:
OSAI S.p.A. Via Torino, 14 - 10010 Barone Canavese (TO) – Italy
e-mail: sales@osai.it Web: www.osai.it
Copyright 20001-2002 by OSAI All rights reserved
Edition: July 2001
This document has been prepared in order to be used by OSAI. It describes the latest release of the product. OSAI reserves the right to modify and improve the product described by this document at any time and without prior notice. Actual application of this product is up to the user. In no event will OSAI be responsible or liable for indirect or consequential damages that may result from installation or use of the equipment described in this text.
ABC ABC

Update

10 Series CNC PLUS Library - User Manual
SUMMARY OF CHANGES
General
This publication has been issued with the software release 6.1. This issue completely replaces the previous ones (MOV.08)
PAGE TYPE OF UPDATE
INDEX updated CHAPTERS 5, 6, 9, 10, 11 updated: the various functions with maximum process number to 20
CHAPTER 7
page 16 corrected: diagrams to which the $ANAIN function refers
CHAPTER 10
page 3 inserted: parameter 9 RCM in function $GBPROVAR
CHAPTER 11
page 7 inserted: Pilot Panel management in the multi-process environment
CHAPTER 12
pages 29, 32 pages 36, 38 page 41 page 63
page 65 pages 66, 67
APPENDIX D modified: field 7 in the axes table APPENDIX G inserted: missing error messages
inserted: parameters 24 and 25 for reading Jerk information in function $AX_GET7 inserted: parameters 21 to 25 in function $AX-PUT1.
inserted: note concerning the parameter “STANDSTILL_GAIN” inserted: examples and details for the parameters for using function
$AXD_RDD inserted: new results in the description of function $AXD_WRD added: new considerations in the description of functions $AXD_RDS
and $AXD_WRS.
10 Series CNC PLUS Library - User Manual (09)
asda

Preface

10 Series CNC PLUS Library - User Manual
PREFACE
This manual contains the description of all block functions (FB) needed for the logic application projects of the 10 Series CNC.
It contains the corresponding instruction list (IL) code for each FB and a description of the input and output variables.
This manual deals specifically with functions and function blocks. For further information on PLUS, its language and its applications in the 10 Series CNC environment consult the following manuals:
10 Series CNC PLUS APPLICATION MANUAL Code 45006677Z 10 Series CNC PLUS LANGUAGE & PLUSEDIT Code 45006672 P
You can find an FB or a function more easily if you look up the Function Reference List below in this preface.
In this list the functions are ordered alphabetically and for each of them there is a short description plus the page number.
In this manual the various function blocks have been subdivided into groups depending on the type of operation they fulfil or the environment to which they belong. So if you do not know the exact name of an FB, but know the environment to which it refers, you can easily find the FB in the manual by consulting the index.
COMMON FEATURES OF FUNCTION BLOCKS:
All function blocks can be used in the Ladder Diagram / Function Block Diagram (LD/FBD) editors and in the MACRO Instruction List (MACRO-IL) editor. The function blocks discussed in Chapters 1 and 3 are base function blocks i.e. built from standard elements of the instruction list (IL). All the other function blocks are extensions which internally use a function call. These functions can also be used in the IL editor. For each FB there is an example for the calls and the necessary parameters in IL.
NOTE:
When using function calls in IL, there is no control to ensure that the number and type of parameters are correct. When using the MACRO-IL editor, the function block parameters are always checked.
10 Series CNC PLUS Library - User Manual (09) 1
Preface
10 Series CNC PLUS Library - User Manual
enable input Many of the function blocks shown in this manual have an “enable” input which enables/disables the
execution of the block.
Enable is a Boolean variable which can be inverted if necessary.
You can link all types of Boolean variables available in PLUS including the Boolean constants KB1
and KB0.
The enable signal linked to the FB P1 (pulse) or the use of FBs for controlling the program flow allows you to write faster and attain a more efficient machine code. In general it is better to try to limit the number of always enabled FB (enable always = 1) by disabling them when their function is not required, in order to increase the performance of the machine logic.
stat_wrd output (function status output word) The function status output is available on all system function blocks. After the relevant function has
been completed, this word contain a value indicating that all went well or that there was some kind of problem. When everything was ok, the status word will be zero. In case of problems the value of the status word is different from zero. Please refer to the specific function block for the meaning of the values returned in the status word. Often you're not interested in knowing the status of the functions because your program has been tested and always works well. You can then hook up only one single short variable, e.g. MW 999, to the status output of many functions.
ax_id input (physical axis identifier) The axis identifier is used for many system functions. It is a number identifying the internal resources
for one axis on an axes module. Each axes module supports 8 axes, 6 resources are reserved for physical axes (which read encoders and/or write to D/A converters) and 2 for virtual axes. A machine axis (e.g. "X") may be related to any of the available physical axis resources on any of the axes modules. There can be up to 4 axes modules in the 10 Series CNC chassis, allowing for up to 32 axes (theoretically). The axis identifier now, is a number in the range of 1 through 32. It must be assigned during the axes configuration in AMP and will also serve to define the page number of the axes table on which this axis will be managed. Even when you move the physical connections (encoder, D/A) of an axis to another axes module, its ax_id will remain unchanged and the axis data will remain available on the same page of the axes table. The function A_TO_ID converts an ASCII axis address to its physical axis identifier number.
tc_id input (transducer/converter physical identifier) The identifiers of the tansducer inputs are numbers in the range of 100Hex up to 1nnHex. On the first
servo module you will find (top to bottom) the transducers 100Hex through 105Hex, on the second 106Hex through 10BHex, on the third module 10CHex through 111, and so on. The D/A converters have a similar numbering system. On the first module you will find the converters 200Hex through 205Hex, on the second module 206Hex through 20BHex, and so on.
2 10 Series CNC PLUS Library - User Manual (09)
Preface
10 Series CNC PLUS Library - User Manual
symbolic names Symbolic names to be associated to the user subroutine (DSRB) and to the label (LBL) must be
different from those predefined in PLUS (FB names, predefined routines, etc.) and should never begin with a $. Furthermore, symbolic names should always begin with a letter and not with a number.
TYPES OF SYSTEM FUNCTION CALLS
There can be 3 different types of system function calls (system function blocks):
WAIT
A WAIT function call suspends the execution of the task that called it. This task will resume its activity after the function has been completely executed.
The suspension of a task implies the suspension of all routines that make up this task. The WAIT function is normally executed by an environment other than the I/O processor module (the system).
For this reason a WAIT function is a synchronous call: when the logic scan exits from a WAIT function block, this block has been completely executed.
NOWAIT
A NOWAIT function call does not suspend the execution of the logic task that called it. Immediately after the call has been issued, the logic task resumes execution. The function call will be executed by an environment other than the I/O processor module (system).
For this reason a NOWAIT function is an asynchronous call: when the logic scan exits from a NOWAIT function block, the function is still being executed by another environment.
The execution of many NOWAIT function calls from a logic task may cause a system overloading since the simultaneous execution of many functions is required.
When 15 NOWAIT functions are in parallel execution, the function that has generated the last call is in any case executed and it returns to the word status a warning code (1000 hexadecimal).
If you continue to call NOWAIT functions after the warning message, that is when 25 functions are in parallel execution, an unrecoverable emergency is generated ("too many requests").
INTERNAL
An INTERNAL function is similar to a WAIT function call but its execution is much faster because it's done by the same environment that calls the function (PLUS). An INTERNAL function call is in all aspects like a subroutine available to the PLUS environment. For this reason an INTERNAL function is a synchronous call: when the logic scan exits from an INTERNAL function block, this block has been completely executed.
10 Series CNC PLUS Library - User Manual (09) 3
Preface
10 Series CNC PLUS Library - User Manual
LIST OF THE BASE ELEMENTS OF THE LANGUAGE
$=N Boolean inverter..............................................................................................1-5
$<< Logically shift 16 bit word sc places left ............................................................1-9
$>> Logically shift 16 bit word sc places right ........................................................ 1-10
$ADD Add two or more floating point numbers ...........................................................1-16
$ADDW Add two or more 16 bit words .........................................................................1-11
$AND Boolean AND gate..........................................................................................1-5
$ANDW Bitwise logical AND on 16 bit words ..................................................................1-8
$BCD_BIN Convert an integer from BCD to binary .............................................................1-13
$BIN_BCD Convert an integer from binary to BCD............................................................. 1-13
$CAL Call user defined subroutine and pass parameters............................................1-20
$CTD Count Down....................................................................................................3-3
$CTR Counter Reset ................................................................................................3-3
$CTS Set Counter Accumulator = Preset Value ..........................................................3-3
$CTU Count Up........................................................................................................3-3
$DECW Decrement word............................................................................................ 1-11
$DIV Divide floating point numbers, floating point result............................................. 1-17
$DIVW Divide two shorts, short result ........................................................................ 1-12
$DLY Wait for time-out ........................................................................................... 1-25
$DSBR Define user subroutine ...................................................................................1-20
$DTSK Define PLUS routine ......................................................................................1-21
$ELSE Alternative execution of a part of the program................................................... 1-26
$ENDIF End of alternative execution part of the program............................................... 1-26
$EQ Double equal comparison (I1 = I2)...................................................................1-31
$EQW Equal comparison of two words (I1 = I2).......................................................... 1-29
$ESBR Define End of user subroutine......................................................................... 1-20
$ETSK Define end of PLUS routine............................................................................ 1-21
$GE Double greater equal comparison (I1 >= I2)...................................................... 1-32
$GEW Greater equal word comparison (I1 >= I2)....................................................... 1-30
$GOTO Conditional jump to label................................................................................ 1-22
$GT Double greater than comparison (I1 > I2)......................................................... 1-32
$GTW Greater than comparison for words (I1 > I2) ..................................................... 1-30
$IF Conditional execution of a part of the program.................................................. 1-26
$IFWAIT Semaphore state inquiry................................................................................ 1-24
$INCW Increment word............................................................................................. 1-11
$LBL Define jump label .......................................................................................... 1-22
$LE Double less or equal comparison (I1 <= I2) ......................................................1-31
$LEW Less or equal comparison for words (I1 <= I2) ................................................1-29
$LT Double less than comparison (I1 < I2)............................................................. 1-31
$LTW Less than comparison for words (I1 < I2)......................................................... 1-29
$MOD Division remainder .........................................................................................1-13
$MUL Floating point multiplication............................................................................ 1-17
$MULW Multiply two shorts, short result...................................................................... 1-12
$NE Double not equal comparison (I1 <> I2)........................................................... 1-32
$NEG Negate word (2's complement).........................................................................1-9
$NEGD Invert sign of floating point number.................................................................. 1-15
$NEW Not equal comparison for words (I1 <> I2)........................................................ 1-30
$NOT Invert a 16 bit word (1's complement)................................................................1-9
$OR Boolean OR gate............................................................................................1-5
$ORW Bitwise logical OR 16 bit words ........................................................................1-8
$P1 Impulse on rising edge of inp I1 ...................................................................... 1-33
$P2 Divide by 2 element....................................................................................... 1-33
4 10 Series CNC PLUS Library - User Manual (09)
Preface
10 Series CNC PLUS Library - User Manual
$P3 Impulses on rising and falling edges of input signal I1....................................... 1-34
$R/S RS flip flop with RESET priority ........................................................................1-6
$RES Reset a 16 bit word to 0................................................................................. 1-10
$RESD Reset a floating point variable (to 0) ................................................................ 1-15
$S/R RS flip flop with SET priority .............................................................................1-7
$SEND SEND a semaphore ...................................................................................... 1-23
$SET Set a 16 bit word to a value ............................................................................1-10
$SETD Set a floating point variable to a value.............................................................. 1-15
$STRADD Concatenation of strings ................................................................................ 1-14
$SUB Subtract floating point numbers ...................................................................... 1-16
$SUBW Subtract two or more 16 bit words .................................................................. 1-12
$TIM Timer enabled .................................................................................................3-7
$TMR Timer Reset/Preset .........................................................................................3-7
$WAIT Wait on semaphore .......................................................................................1-23
$XCH Swap low and high byte in a 16 bit word ............................................................1-9
$XOR Boolean XOR gate...........................................................................................1-6
$XORW Bitwise XOR operation on 16 bit words..............................................................1-8
10 Series CNC PLUS Library - User Manual (09) 5
Preface
10 Series CNC PLUS Library - User Manual
FUNCTION REFERENCE LIST
$232_INIT: Initialize the RS 232 interface...........................................................................7-5
$232_RESE: Reset the RS 232 interface ............................................................................7-13
$232_RXD: Receive a data buffer via the RS-232 interface.................................................. 7-10
$232_RXS: Receive an ASCII string via the RS 232 interface.............................................. 7-12
$232_STAT: Get the RS-232 interface status ..................................................................... 7-14
$232_TERM: Set termination characters used in message handling........................................7-6
$232_TXD: Transmit data buffer via the RS 232 interface.....................................................7-8
$232_TXS: Transmit an ASCII string via the RS 232 interface...............................................7-9
$A_TO_ID: Requests conversion from process axis name to axis identifier.......................... 2-31
$AABORT: Abort a point-to-point-interpolator ......................................................................8-3
$ACLOSE: Close channel for point-to-point-interpolator .......................................................8-4
$ACOS: Calculate the angle for a given cosine ...............................................................4-6
$ACTOFFS: Request activation of a tool offset .....................................................................9-5
$ACTRES: Request an active reset to be executed........................................................... 13-2
$ANAIN: Read one of the analog input channels of the I/O processor module ...................7-16
$AOPEN: Open channel for point-to-point-interpolator ........................................................8-5
$ARESET: Request to reset a point-to-point-interpolator......................................................8-6
$ASIN: Calculate the angle for a given sine value...........................................................4-5
$ATAN: Calculate the angle for a given tangent value ......................................................4-7
$ATOF: Convert an ASCII string to a floating point number..............................................2-4
$ATOI: Convert an ASCII string to an integer number (16 bit)..........................................2-2
$AUX_STAT: Read the status of a point-to-point axis and the spindle.................................... 8-18
$AX_CHAS: Change the servo mode of an axis.................................................................. 12-4
$AX_DISA: Disable the servo loop of an axis or disable its D/A converter. .............................6-3
$AX_ENAB: Enable the servo loop of an axis or enable its D/A converter................................6-2
$AX_GET1: Get axis (spindle) servo parameters..............................................................12-15
$AX_GET2: Get axis (spindle) servo parameters..............................................................12-17
$AX_GET3: Get axis (spindle) servo parameters..............................................................12-20
$AX_GET4: Get axis (spindle) servo parameters..............................................................12-22
$AX_GET5: Get axis (spindle) servo parameters..............................................................12-24
$AX_GET6: Get axis (spindle) servo parameters..............................................................12-26
$AX_GET7: Get axis (spindle) servo parameters..............................................................12-28
$AX_GET8: Get axis (spindle) servo parameters..............................................................12-33
$AX_GETS: Get axis status...........................................................................................12-46
$AX_PROB: Enable probing signal for one or more axis ...................................................... 12-5
$AX_PUT1: Set axis servo parameter.............................................................................12-35
$AX_PUT2: Set axis servo parameter.............................................................................12-42
$AX_PUT3: Set axis servo parameter.............................................................................12-44
$AX_RDPB: Read the probed positions of one or more axis................................................. 12-6
$AX_RESE: Aborts the actual operation of the addressed axis............................................ 12-8
$AX_RPOS: Resets the axis' position..............................................................................12-13
$AX_SELE: Activate axis monitor functions / gear range...................................................12-11
$AX_SETZ: It allows the activation of different functions for the specified axis .....................12-14
$AX_ZSH1: Write PLUS zero shift offset #1 ...................................................................... 12-9
$AX_ZSH2: Write PLUS zero shift offset #2 ....................................................................12-10
$AXD_PUT: It sets the enable/disable bits of a digital drive associated with a D.S.I.
axis...........................................................................................................12-68
$AXD_RDD: It reads a numerical parameter from a digital drive associated to a D.S.I.
axis...........................................................................................................12-63
$AXD_RDS: It reads a string parameter from a digital drive associated to a D.S.I. axis.........12-66
$AXD_WRD: It writes a numerical parameter to a digital drive associated to a D.S.I. axis......12-65
6 10 Series CNC PLUS Library - User Manual (09)
Preface
10 Series CNC PLUS Library - User Manual
$AXD_WRS: It writes a string parameter to a digital drive as sociated to a D.S.I. axis............12-67
$AXMANFED: It sets the feedrate override for one or more axes in manual movement ...............5-41
$AXSELEC: Select one or more axes for manual operations ................................................5-16
$AXSELFED: It selects one or more axes allowing to change feedrate override ....................... 5-40
$AXTAN_D: It disables the tangent axis algorithm .............................................................6-14
$AXTAN_E: Tangent axis algorithm enabling ..................................................................... 6-12
$COMPOFF: Compute new axes offset .................................................................................9-7
$CON_LED: It manages the leds on the OPLink operator panel .........................................11-14
$COS: Calculates the cosine of an angle.....................................................................4-3
$CTOW: Convert a character to a word ...........................................................................2-9
$CYCLE: Request cycle start for a selected process ........................................................5-3
$CYSTART: Request cycle start for a selected process ........................................................5-2
$CYSTOP: Request cycle stop for the selected process .....................................................5-4
$DE_ETH: Enables or disables communication via Ethernet ...........................................13-10
$DIVF: Division of two short operands with a double result........................................... 2-29
$ENDRESE: Logic has finished reset actions ..................................................................... 5-19
$EXP: Calculates the power of “e” raised to the power of X..........................................4-11
$FAST_RD: Reads data from a dedicated DP area .............................................................13-8
$FAST_WR: Writes data in the DP dedicated area.............................................................. 13-6
$FAX_GET: Reads in real time axis parameters ...............................................................12-61
$FAX_PUT: Real time updating of an axis' zero shift value................................................12-59
$FAX_RCON: Configures the driver for real time data communication from AXES to PLUS...... 12-57
$FAX_WCON: Configures the driver for real time data communication from PLUS to AXES......12-55
$FEED_GO: Request the interpolator to exit the feedhold status ............................................5-6
$FEEDBYOF: Restore the programmed feedrate after feedrate bypass.................................... 5-32
$FEEDBYON: Activate feedrate bypass................................................................................ 5-30
$FEEDHLD: Request the interpolator to enter the feedhold status ..........................................5-5
$FOUT: Set fast output.............................................................................................. 7-17
$FRORIDE: Set process feedrate override percentage value ................................................5-11
$FTOA: Convert a floating point number to an ASCII string..............................................2-5
$FTOI: Convert a floating point format to an integer format .............................................2-7
$GBPROVAR: Get Boolean process variable .........................................................................10-3
$GET_INTP: Reads in real time a number of interpolator data............................................... 5-35
$GET_POSD: Read the position and feed rate of a point-to-point axis interfaced with the
DAC drive via a RS-232 serial line ...................................................................8-21
$GETAXINT: Get real axis position .................................................................................... 12-3
$GETEPAR: Get part program E parameter ........................................................................10-5
$GETHFL: Reads part program H parameter flag (HF)....................................................... 10-9
$GETHPAR: Get part program H parameter ........................................................................10-7
$GETPNTR: Get block numbers of the active part program and nested
subroutines/macros.......................................................................................5-22
$GETPPNAM: Get the names of the active part programs ...................................................... 5-20
$GETSC: Get ASCII global part program variable (SC)...................................................10-11
$GETSN: Get numerical global part program variable (SN) .............................................10-13
$GETUSED: Reads double process user variables ............................................................10-15
$GJOG: Read jog value.............................................................................................. 5-14
$GSYSDATE: Get system date.............................................................................................7-2
$GSYSTIME: Get system time .............................................................................................7-3
$HISPROC: Select a process to control............................................................................ 11-2
$HOLDOFF: Exit from hold status .......................................................................................5-8
$HOLDON: Entry in hold status.........................................................................................5-7
$HPG_OFF: It-disables the hand pulse generator (HPG)...................................................... 6-11
$HPG_ON: It activates the hand pulse generator (HPG) .......................................................6-9
10 Series CNC PLUS Library - User Manual (09) 7
Preface
10 Series CNC PLUS Library - User Manual
$HUM_ABI: It enables specified softkeys........................................................................11-10
$HUM_DIS: It disables specified softkeys .......................................................................11-12
$IBS_INP: Transfer of physical inputs from the INTERBUS modules to the
MW variables ................................................................................................7-35
$IBS_OUT: Transfer of the MW variables to the physical outputs of the
INTERBUS modules...................................................................................... 7-36
$I_STR: Copies a number of words to the ASCII array................................................... 2-27
$ID_TO_A: Conversion from physical axis identifier to ASCII axis name and its
process........................................................................................................ 2-32
$ILDGD: Indexed load of double from GD variables area................................................. 2-15
$ILDGW: Indexed load of word from GW word variables area........................................... 2-11
$ILDMD: Indexed load of a double from the MD variables memory area ............................2-14
$ILDMW: Indexed load of a word from the MW variables memory area.............................. 2-12
$ILDSW: Indexed load of the word from the SW word variables memory area.................... 2-13
$INDEX: Copy a range of M variables ........................................................................... 2-25
$INDEXA: Copy a range of ASCII variables ......................................................................2-24
$INTP_ABI: Enables the driver for real time reading of interpolator parameters...................... 5-33
$INTP_CMD: Send a command to the interpolator ............................................................... 5-42
$INTP_DIS: Disables the driver for real time reading of the interpolator parameters. ...............5-34
$INWORD: Read an n bit input word from the I/O ring ........................................................7-18
$ISTGD: Indexed storage of the input double to the GD variables memory area ...............2-19
$ISTGW: Indexed storage of the input word to the GW variables memory area .................2-16
$ISTMD: Indexed storage of the input double to the MD variables memory area ...............2-18
$ISTMW: Indexed storage of the input word to the MW variables memory area................. 2-17
$ITOA: Convert an integer number to an ASCII string .....................................................2-3
$ITOF: Convert a short variable to a double variable ......................................................2-8
$LOCKTAB: Set table interlock status (inhibit third party access)........................................ 13-3
$LOG10: Calculate the base 10 logarithm ..................................................................... 4-10
$LOGE: Calculates the natural logarithm .......................................................................4-9
$MANFEED: Sets manual feedrate override percentage .........................................................5-9
$MDI_CMD: Enter part program blocks from PLUS in the MDI buffer .................................... 5-25
$MTB_OFF: Disconnect an Pilot panel from a process........................................................ 11-9
$MTB_ON: Assign an Pilot panel to a process ................................................................. 11-7
$MULF: Multiply two short operands with double result................................................. 2-28
$NAXOFF: Activate new axes offset ..................................................................................9-8
$OUTWORD: Write an n bit output word to the I/O ring......................................................... 7-19
$PALMOVE: Move a point-to-point-axis................................................................................8-7
$POW: Calculates the power of X raised to Y ..............................................................4-12
$PP_BSRC: It positions the pointer on the active Part Program by n blocks, onwards or
backwards....................................................................................................5-38
$PP_EXEC: Request part program execution up to a defined block ......................................5-24
$PP_SELE: Select a part program for execution ................................................................ 5-23
$PP_TSRC: It finds the string inside the active part program................................................ 5-37
$PPRESUME: Request process to resume part program execution after calculation stop
request ........................................................................................................ 5-27
$PREC_OFF: Disable part program block precalculation ....................................................... 5-28
$PREC_ON: Enable part program block precalculation........................................................ 5-29
$RCM_MOD: It defines how the auxiliary functions are sent to the Plus logic during the
search in memory......................................................................................... 5-39
$RD_ADA: Reads an ADARING device A/D channel......................................................... 7-24
$RD_ASCII: Read ASCII input parameters of a task (indexed store of ACCUS in ASCII
buffer) .......................................................................................................... 2-21
$RESRIF: Reset axes homed flag ....................................................................................6-6
8 10 Series CNC PLUS Library - User Manual (09)
Preface
10 Series CNC PLUS Library - User Manual
$RIO_INP: Reads remote I/O inputs................................................................................ 7-33
$RIO_OUT: Write the remote I/O outputs ..........................................................................7-34
$RQESTOP: Request process E-STOP.............................................................................. 7-20
$RQRESET: Request process RESET............................................................................... 5-17
$RTIRES: Read RTI axes and spindle monitor table......................................................... 8-17
$SBPROVAR: Set Boolean process variable......................................................................... 10-4
$SCLOSE: Close RTI channel for spindle...........................................................................8-9
$SEL_SCR: It selects a screen ........................................................................................ 7-27
$SETCUSK: Set OEM softkey status; ON/OFF type........................................................... 11-3
$SETCUSL: Set OEM softkey status; Maintained, Data Entry and Normal ........................... 11-4
$SETEPAR: Set part program E parameter........................................................................ 10-6
$SETHFL: Sets part program HF flag ............................................................................10-10
$SETHINT: Set human interface protection bits................................................................. 11-5
$SETHPAR: Set part program H parameter........................................................................ 10-8
$SETMODE: Request mode of operation for a selected process ........................................... 5-13
$SETRANG: Select spindle gear range .............................................................................. 8-10
$SETRIF: Set axes homed flag .......................................................................................6-5
$SETSC: Set global ASCII part program "SC" variable ..................................................10-12
$SETSN: Set global numerical part program "SN" parameter .........................................10-14
$SETTEST: Set tes t mode / Reset test mode......................................................................6-8
$SG96RPM: Request G96 constant surface speed spindle control ....................................... 8-11
$SG97RPM: Set spindle speed in RPM ............................................................................. 8-13
$SIN: Calculate the sine of an angle ..........................................................................4-2
$SJOG: Write incremental jog value............................................................................ 5-15
$SOFTOTL: Enable /disable software overt ravel limits...........................................................6-4
$SOPEN: Open a channel for spindle management......................................................... 8-14
$SORIENT: Request spindle orientation ............................................................................8-15
$SPEPN: Request to energize the E-STOP relay(s)........................................................ 7-21
$SPORIDE: Forces process spindle speed override percentage value .................................. 5-12
$SQRT: Calculate the square root.................................................................................4-8
$SRESET: Request to reset a spindle............................................................................. 8-16
$STR_I: Copy ASCII characters from the ASCII buffer to the M variables......................... 2-26
$STR_LEN: Calculate string length................................................................................... 2-23
$STRCMP: Compare ASCII strings..................................................................................2-22
$STTRAVEL: Set coordinated axes hardware overtravel condition............................................6-7
$T_READ: Reads the timer status .................................................................................. 3-12
$T_START: Enables/disables PLUS timer......................................................................... 3-11
$TAN: Calculates the tangent of an angle ....................................................................4-4
$TBLGETD: Read double information from a system or user table........................................ 9-10
$TBLGETW: Read short information from a system or user table ............................................9-9
$TBLPUTD: Write double information to a system or to the user table.................................. 9-12
$TBLPUTW: Write short information to a system or to the user table ....................................9-11
$TBLSRCD: Request a table lookup (floating point entry).................................................... 9-13
$TBLSRCW: It requests a table search (short format field) ................................................... 9-15
$TC_CONF: It configures the transducer ERDC for read operations ....................................12-48
$TC_READ1: It reads the physical position of the transducer ..............................................12-50
$TC_WRIT: Set D/A Converter output .............................................................................12-52
$TCPACT: Enable/disable the Tool Center Point feature.................................................... 6-15
$TCPREAD: Reads the variables associated to the Tool Center Point................................... 6-18
$TCPWRT: Writes the variables associated to the Tool Center Point ...................................6-16
$TOOL_RD: Acquisition of the identifiers of the slave tools involved in multitool T
function programming.................................................................................... 9-17
$TOOLACT: Update axis table with new tool offset ...............................................................9-2
10 Series CNC PLUS Library - User Manual (09) 9
Preface
10 Series CNC PLUS Library - User Manual
$UNLKTAB: Cancel table interlock status (enable third party access).................................. 13-5
$URLFEED: Forces rapid feedrate override percentage........................................................ 5-10
$WARN_HIS: Displays a message defined by the user and stores it in system history............ 7-26
$WARNING: Display user defined error message..................................................................7-4
$WR_ADA: Writes an ADARING device D/A channel .........................................................7-22
$WR_ASCII: Write ASCII task output parameters (indexed loading of ACCUS from
ASCII buffer)................................................................................................. 2-20
$WRI_SCR: User-defined (PLUS screen) ...........................................................................7-30
$WTOC: Convert a word to character............................................................................ 2-10
END OF PREFACE
10 10 Series CNC PLUS Library - User Manual (09)
10 Series CNC PLUS Library - User Manual

INDEX

BASIC LANGUAGE FUNCTION BLOCKS
LINE ELEMENT ........................................................................................................1-3
BOOLEAN FUNCTION BLOCKS ...............................................................................1-5
FUNCTION BLOCKS FOR WORD OPERATIONS.......................................................1-8
FUNCTION BLOCKS FOR STRING OPERATIONS.....................................................1-14
FUNCTION BLOCKS FOR FLOATING POINT OPERATIONS ......................................1-15
PROGRAM FLOW CONTROL FUNCTION BLOCKS...................................................1-18
Subroutines ....................................................................................................1-18
PLUS PRE-DEFINED ROUTINES (TASKS).................................................................1-21
JUMPS....................................................................................................................1-22
TASK SYNCHRONIZATION BLOCKS ........................................................................1-23
CONDITIONAL EXECUTION OF BLOCKS .................................................................1-26
Application Note:.............................................................................................1-27
WORD COMPARISON FUNCTION BLOCKS ..............................................................1-29
FLOATING POINT COMPARISON FUNCTION BLOCKS ............................................1-31
COMPOSED FUNCTION BLOCKS ............................................................................1-33
Index
LANGUAGE EXTENSIONS
NUMBER AND FORMAT CONVERSIONS ..................................................................2-2
$ATOI: Convert an ASCII string to an integer number (16 bit)...............................2-2
$ITOA: Convert an integer number to an ASCII string ..........................................2-3
$ATOF: Convert an ASCII string to a floating point number ..................................2-4
$FTOA: Convert a floating point number to an ASCII string ..................................2-5
$FTOI: Convert a floating point format to an integer format ...................................2-7
$ITOF: Convert a short variable to a double variable............................................2-8
$CTOW: Convert a character to a word ..............................................................2-9
$WTOC: Convert a word to character.................................................................2-10
INDIRECT LOAD AND STORE ..................................................................................2-11
$ILDGW: Indexed load of word from GW word variables area ...............................2-11
$ILDMW: Indexed load of a word from the MW variables memory area..................2-12
$ILDSW: Indexed load of the word from the SW word variables memory
area ...............................................................................................................2-13
$ILDMD: Indexed load of a double from the MD variables memory area .................2-14
$ILDGD: Indexed load of double from GD variables area ......................................2-15
10 Series CNC PLUS Library - User Manual (09) i
Index
10 Series CNC PLUS Library - User Manual
$ISTGW: Indexed storage of the input word to the GW variables
memory area..................................................................................................2-16
$ISTMW: Indexed storage of the input word to the MW variables
memory area..................................................................................................2-17
$ISTMD: Indexed storage of the input double to the MD variables
memory area..................................................................................................2-18
$ISTGD: Indexed storage of the input double to the GD variables
memory area..................................................................................................2-19
$WR_ASCII: Write ASCII task output parameters (indexed loading of
ACCUS from ASCII buffer)...............................................................................2-20
$RD_ASCII: Read ASCII input parameters of a task (indexed store of
ACCUS in ASCII buffer) ..................................................................................2-21
STRING / CHARACTER HANDLING ..........................................................................2-22
$STRCMP: Compare ASCII strings ...................................................................2-22
$STR_LEN: Calculate string length...................................................................2-23
$INDEXA: Copy a range of ASCII variables.........................................................2-24
$INDEX: Copy a range of M variables .................................................................2-25
$STR_I: Copy ASCII characters from the ASCII buffer to the M variables...............2-26
$I_STR: Copies a number of words to the ASCII array.........................................2-27
ARITHMETICAL FUNCTIONS ...................................................................................2-28
$MULF: Multiply two short operands with double result.......................................2-28
$DIVF: Division of two short operands with a double result...................................2-29
SPECIAL CONVERSIONS ........................................................................................2-31
$A_TO_ID: Requests conversion from process axis name to axis
identifier..........................................................................................................2-31
$ID_TO_A: Conversion from physical axis identifier to ASCII axis
name and its process. .....................................................................................2-32
COUNTERS AND TIMERS
COUNTERS .............................................................................................................3-2
TIMERS...................................................................................................................3-5
TIMERS AND FB PROGRAMMING............................................................................3-7
$T_START: Enables/disables PLUS timer..........................................................3-11
$T_READ: Reads the timer status ....................................................................3-12
MATH LIBRARY FUNCTIONS
$SIN: Calculate the sine of an angle ..................................................................4-2
$COS: Calculates the cosine of an angle ...........................................................4-3
$TAN: Calculates the tangent of an angle ..........................................................4-4
$ASIN: Calculate the angle for a given sine value ................................................4-5
$ACOS: Calculate the angle for a given cosine ...................................................4-6
$ATAN: Calculate the angle for a given tangent value..........................................4-7
$SQRT: Calculate the square root.....................................................................4-8
$LOGE: Calculates the natural logarithm...........................................................4-9
$LOG10: Calculate the base 10 logarithm ..........................................................4-10
$EXP: Calculates the power of “e” raised to the power of X..................................4-11
$POW: Calculates the power of X raised to Y.....................................................4-12
NC RELATED FUNCTIONS
ii 10 Series CNC PLUS Library - User Manual (09)
Index
10 Series CNC PLUS Library - User Manual
$CYSTART: Request cycle start for a selected process ......................................5-2
$CYCLE: Request cycle start for a selected process ..........................................5-3
$CYSTOP: Request cycle stop for the selected process .....................................5-4
$FEEDHLD: Request the interpolator to enter the feedhold status........................5-5
$FEED_GO: Request the interpolator to exit the feedhold status .........................5-6
$HOLDON: Entry in hold status ........................................................................5-7
$HOLDOFF: Exit from hold status .....................................................................5-8
$MANFEED: Sets manual feedrate override percentage......................................5-9
$URLFEED: Forces rapid feedrate override percentage .......................................5-10
$FRORIDE: Set process feedrate override percentage value ................................5-11
$SPORIDE: Forces process spindle speed override percentage value...................5-12
$SETMODE: Request mode of operation for a selected process..........................5-13
$GJOG: Read jog value ....................................................................................5-14
$SJOG: Write incremental jog value..................................................................5-15
$AXSELEC: Select one or more axes for manual operations ................................5-16
$RQRESET: Request process RESET ..............................................................5-17
$ENDRESE: Logic has finished reset actions ....................................................5-19
$GETPPNAM: Get the names of the active part programs ...................................5-20
$GETPNTR: Get block numbers of the active part program and
nested subroutines/macros ..............................................................................5-22
$PP_SELE: Select a part program for execution ................................................5-23
$PP_EXEC: Request part program execution up to a defined block ......................5-24
$MDI_CMD: Enter part program blocks from PLUS in the MDI buffer ....................5-25
$PPRESUME: Request process to resume part program execution
after calculation stop request ............................................................................5-27
$PREC_OFF: Disable part program block precalculation .....................................5-28
$PREC_ON: Enable part program block precalculation .......................................5-29
$FEEDBYON: Activate feedrate bypass ............................................................5-30
$FEEDBYOF: Restore the programmed feedrate after feedrate bypass.................5-32
$INTP_ABI: Enables the driver for real time reading of interpolator
parameters. ...............................................................................................5-33
$INTP_DIS: Disables the driver for real time reading of the
interpolator parameters. ...................................................................................5-34
$GET_INTP: Reads in real time a number of interpolator data ..............................5-35
$PP_TSRC: It finds the string inside the active part program................................5-36
$PP_BSRC: It positions the pointer on the active Part Program by n
blocks, onwards or backwards..........................................................................5-37
$RCM_MOD: It defines how the auxiliary functions are sent to the
Plus logic during the search in memory.............................................................5-38
$AXSELFED: It selects one or more axes allowing to change feedrate override 5-39 $AXMANFED: It sets the feedrate override for one or more axes in
manual movement ...........................................................................................5-40
$INTP_CMD: Send a command to the interpolator..............................................5-41
AXIS MOTION FUNCTIONS
$AX_ENAB: Enable the servo loop of an axis or enable its D/A
converter.........................................................................................................6-2
$AX_DISA: Disable the servo loop of an axis or disable its D/A
converter.........................................................................................................6-3
$SOFTOTL: Enable /disable software overtravel limits.........................................6-4
$SETRIF: Set axes homed flag .........................................................................6-5
10 Series CNC PLUS Library - User Manual (09) iii
Index
10 Series CNC PLUS Library - User Manual
$RESRIF: Reset axes homed flag .....................................................................6-6
$STTRAVEL: Set coordinated axes hardware overtravel condition ........................6-7
$SETTEST: Set test mode / Reset test mode....................................................6-8
$HPG_ON: It activates the hand pulse generator (HPG)......................................6-9
$HPG_OFF: It-disables the hand pulse generator (HPG).....................................6-11
$AXTAN_E: Tangent axis algorithm enabling ......................................................6-12
$AXTAN_D: It disables the tangent axis algorithm .............................................6-14
$TCPACT: Enable/disable the Tool Center Point feature ......................................6-15
$TCPWRT: Writes the variables associated to the Tool Center Point....................6-16
$TCPREAD: Reads the variables associated to the Tool Center Point ..................6-18
GENERAL PURPOSE FUNCTIONS
$GSYSDATE: Get system date........................................................................7-2
$GSYSTIME: Get system time .........................................................................7-3
$WARNING: Display user defined error message ...............................................7-4
$232_INIT: Initialize the RS 232 interface ...........................................................7-5
$232_TERM: Set termination characters used in message handling .....................7-6
$232_TXD: Transmit data buffer via the RS 232 interface.....................................7-8
$232_TXS: Transmit an ASCII string via the RS 232 interface...............................7-9
$232_RXD: Receive a data buffer via the RS-232 interface...................................7-10
$232_RXS: Receive an ASCII string via the RS 232 interface...............................7-12
$232_RESE: Reset the RS 232 interface...........................................................7-13
$232_STAT: Get the RS-232 interface status .....................................................7-14
$ANAIN: Read one of the analog input channels of the I/O processor
module...........................................................................................................7-16
$FOUT: Set fast output ....................................................................................7-18
$INWORD: Read an n bit input word from the I/O ring .........................................7-19
$OUTWORD: Write an n bit output word to the I/O ring.......................................7-20
$RQESTOP: Request process E-STOP.............................................................7-21
$SPEPN: Request to energize the E-STOP relay(s)...........................................7-22
$WR_ADA: Writes an ADARING device D/A channel..........................................7-23
$RD_ADA: Reads an ADARING device A/D channel ...........................................7-25
$WARN_HIS: Displays a message defined by the user and stores it
in system history.............................................................................................7-27
$SEL_SCR: It selects a screen ........................................................................7-28
$WRI_SCR: User-defined (PLUS screen) ...........................................................7-31
$RIO_INP: Reads remote I/O inputs..................................................................7-34
$RIO_OUT: Write the remote I/O outputs ...........................................................7-35
$IBS_INP: Transfer of physical inputs from the INTERBUS modules to
the MW variables ...........................................................................................7-36
$IBS_OUT: Transfer of the MW variables to the physical outputs of
the INTERBUS modules..................................................................................7-37
POINT-TO-POINT-AXES / SPINDLE LIBRARY
$AABORT: Abort a point-to-point-interpolator .....................................................8-3
$ACLOSE: Close channel for point-to-point-interpolator .......................................8-4
$AOPEN: Open channel for point-to-point-interpolator.........................................8-5
$ARESET: Request to reset a point-to-point-interpolator .....................................8-6
$PALMOVE: Move a point-to-point-axis .............................................................8-7
$SCLOSE: Close RTI channel for spindle...........................................................8-9
iv 10 Series CNC PLUS Library - User Manual (09)
$SETRANG: Select spindle gear range..............................................................8-10
$SG96RPM: Request G96 constant surface speed spindle control.......................8-11
$SG97RPM: Set spindle speed in RPM.............................................................8-13
$SOPEN: Open a channel for spindle management ............................................8-14
$SORIENT: Request spindle orientation.............................................................8-15
$SRESET: Request to reset a spindle ...............................................................8-16
$RTIRES: Read RTI axes and spindle monitor table ............................................8-17
$AUX_STAT: Read the status of a point-to-point axis and the spindle ...................8-18
$GET_POSD: Read the position and feed rate of a point-to-point axis
interfaced with the DAC drive via a RS-232 serial line..........................................8-21
OFFSET AND TOOLS HANDLING
$TOOLACT: Update axis table with new tool offset .............................................9-2
$ACTOFFS: Request activation of a tool offset ...................................................9-5
$COMPOFF: Compute new axes offset .............................................................9-8
$NAXOFF: Activate new axes offset ..................................................................9-9
$TBLGETW: Read short information from a system or user table.........................9-10
$TBLGETD: Read double information from a system or user table ........................9-11
$TBLPUTW: Write short information to a system or to the user table ...................9-12
$TBLPUTD: Write double information to a system or to the user table..................9-13
$TBLSRCD: Request a table lookup (floating point entry)....................................9-14
$TBLSRCW: It requests a table search (short format field) ..................................9-16
$TOOL_RD: Acquisition of the identifiers of the slave tools involved in
multitool T function programming.......................................................................9-18
Index
10 Series CNC PLUS Library - User Manual
PROCESS/SYSTEM VARIABLES HANDLING
$GBPROVAR: Get Boolean process variable.....................................................10-3
$SBPROVAR: Set Boolean process variable......................................................10-4
$GETEPAR: Get part program E parameter.......................................................10-5
$SETEPAR: Set part program E parameter........................................................10-6
$GETHPAR: Get part program H parameter.......................................................10-7
$SETHPAR: Set part program H parameter........................................................10-8
$GETHFL: Reads part program H parameter flag (HF) .........................................10-9
$SETHFL: Sets part program HF flag ................................................................10-10
$GETSC: Get ASCII global part program variable (SC) ........................................10-11
$SETSC: Set global ASCII part program "SC" variable ........................................10-12
$GETSN: Get numerical global part program variable (SN)...................................10-13
$SETSN: Set global numerical part program "SN" parameter ...............................10-14
$GETUSED: Reads double process user variables .............................................10-15
HUMAN INTERFACE
$HISPROC: Select a process to control ............................................................11-2
$SETCUSK: Set OEM softkey status; ON/OFF type..........................................11-3
$SETCUSL: Set OEM softkey status; Maintained, Data Entry and
Normal ...........................................................................................................11-4
$SETHINT: Set human interface protection bits..................................................11-5
$MTB_ON: Assign an Pilot panel to a process ...................................................11-7
$MTB_OFF: Disconnect an Pilot panel from a process .......................................11-9
10 Series CNC PLUS Library - User Manual (09) v
Index
10 Series CNC PLUS Library - User Manual
$HUM_ABI: It enables specified softkeys...........................................................11-10
$HUM_DIS: It disables specified softkeys ..........................................................11-12
$CON_LED: It manages the leds on the OPLink operator panel...........................11-14
AXES RELATED FUNCTIONS
$GETAXINT: Get real axis position ....................................................................12-3
$AX_CHAS: Change the servo mode of an axis..................................................12-4
$AX_PROB: Enable probing signal for one or more axis......................................12-5
$AX_RDPB: Read the probed positions of one or more axis.................................12-6
$AX_RESE: Aborts the actual operation of the addressed axis............................12-8
$AX_ZSH1: Write PLUS zero shift offset #1 .......................................................12-9
$AX_ZSH2: Write PLUS zero shift offset #2 .......................................................12-10
$AX_SELE: Activate axis monitor functions / gear range.....................................12-11
$AX_RPOS: Resets the axis' position ...............................................................12-13
$AX_SETZ: It allows the activation of different functions for the
specified axis ...............................................................................................12-14
$AX_GET1: Get axis (spindle) servo parameters .................................................12-15
$AX_GET2: Get axis (spindle) servo parameters .................................................12-17
$AX_GET3: Get axis (spindle) servo parameters .................................................12-20
$AX_GET4: Get axis (spindle) servo parameters .................................................12-22
$AX_GET5: Get axis (spindle) servo parameters .................................................12-24
$AX_GET6: Get axis (spindle) servo parameters .................................................12-26
$AX_GET7: Get axis (spindle) servo parameters .................................................12-28
$AX_GET8: Get axis (spindle) servo parameters .................................................12-33
$AX_PUT1: Set axis servo parameter................................................................12-35
Notes concerning the “STANDSTILL-GAIN” parameter.........................................12-41
$AX_PUT2: Set axis servo parameter................................................................12-42
$AX_PUT3: Set axis servo parameter................................................................12-44
$AX_GETS: Get axis status .............................................................................12-46
$TC_CONF: It configures the transducer ERDC for read operations ......................12-48
$TC_READ1: It reads the physical position of the transducer...............................12-50
$TC_WRIT: Set D/A Converter output ................................................................12-52
$FAX_WCON: Configures the driver for real time data communication
from PLUS to AXES.........................................................................................12-55
$FAX_RCON: Configures the driver for real time data communication
from AXES to PLUS .........................................................................................12-57
$FAX_PUT: Real time updating of an axis' zero shift value ...................................12-59
$FAX_GET: Reads in real time axis parameters .................................................12-61
$AXD_RDD: It reads a numerical parameter from a digital drive
associated to a D.S.I. axis...............................................................................12-63
$AXD_WRD: It writes a numerical parameter to a digital drive
associated to a D.S.I. axis...............................................................................12-65
$AXD_RDS: It reads a string parameter from a digital drive
associated to a D.S.I. axis...............................................................................12-66
$AXD_WRS: It writes a string parameter to a digital drive associated to a D.S.I. axis 12-67 $AXD_PUT: Sets Control Word bits of a digital drive associated with a D.S.I. axis 12-68
vi 10 Series CNC PLUS Library - User Manual (09)
SPECIAL FUNCTIONS
$ACTRES: Request an active reset to be executed ............................................13-2
$LOCKTAB: Set table interlock status (inhibit third party access) ........................13-3
$UNLKTAB: Cancel table interlock status (enable third party access)..................13-5
$FAST_WR: Writes data in the DP dedicated area .............................................13-6
$FAST_RD: Reads data from a dedicated DP area.............................................13-8
$DE_ETH: enables or disables communication via Ethernet ................................13-10
PLUS PRE-DEFINED SYMBOLS
Pre-defined logic routine names ........................................................................A-2
Pre-defined logic interface routines....................................................................A-3
Names suggested for global system variables ....................................................A-4
Names suggested for process pre-defined variables ............................................A-6
Names suggested for fields and tables ..............................................................A-9
Index
10 Series CNC PLUS Library - User Manual
NC MESSAGES
ERROR CODES DISPLAYED IN THE NC ENVIRONMENT ...........................................B-1
POINT-TO-POINT AXES / SPINDLE MESSAGES
POINT-TO-POINT AXES / SPINDLE MESSAGES .......................................................C-1
AVAILABLE TABLES
AVAILABLE TABLES ...............................................................................................D-1
Axes table......................................................................................................D-1
Tool table........................................................................................................D-2
Tool offset table ...............................................................................................D-2
User table .......................................................................................................D-2
HUMAN INTERFACE AND PLUS RELATED MESSAGES
Human Interface Related Messages .................................................................E-1
PLUS Related Messages .................................................................................E-1
ERROR MESSAGES FOR THE D.S.I. INTERFACE
Error List ........................................................................................................F-1
MESSAGES FOR POINT TO POINT AXIS CONTROLLED VIA RS­232 SERIAL LINE
Serial Driver ....................................................................................................G-1
DAC/DSC Osai Drive .......................................................................................G-2
10 Series CNC PLUS Library - User Manual (09) vii
Index
10 Series CNC PLUS Library - User Manual
END OF INDEX
viii 10 Series CNC PLUS Library - User Manual (09)
Chapter
1
BASIC LANGUAGE FUNCTION BLOCKS
The basic language function blocks are the direct equivalents of the corresponding instruction list elements. Every time you use one of these function blocks, its internal (IL) code will be inserted in your program. In this sense the basic language function block behave like macros. The function blocks discussed in this chapter do not call any functions. Each one of the sections in this chapter covers a group of function blocks which all work on the identical data format.
Those function blocks which internally use a system function call are covered in the other chapters of this manual. They are called language extensions because they expand the capabilities of the language beyond the capabilities of the single instructions.
For each of the basic language function blocks you will find a table which contains the attributes of the inputs and outputs of a function block. The columns in this table are:
NAME : Name of the connection INVERSION : Indicates whether the input or output can be logically inverted. This attribute
is only available for Boolean connections.
DUPLICATION : If this attribute shows yes, you are allowed to make one or more copies of
this connection. Each one of the copied connections will have the same attributes as the original and the connected variable will be processed just like the original variable.
FORMAT : The format of an operand to be connected to an input or an output can be
one of:
Boolean only bits allowed short 16 bit integer operand double 64 bit floating point operand char string or string constant all no check, all formats possible special for special operands NAM and LAB only
As you enter an operand for a function block, it will be checked if it matches the required format.
GROUP : The different types of operands are divided into groups. For certain function
block connections some groups will be excluded (e.g. it is not allowed to connect an input to a Boolean function block output). The letters in this column indicate which type of operand may be used:
10 Series CNC PLUS Library - User Manual (08) 1-1
Chapter 1
WARNING
Basic Language Function Blocks
M M variables (depending on the format you must select M Boolean
MW -> short MD -> double).
G global retentive G variables (depending on the format you must
select G -> Boolean, GW -> short or GD -> double).
S System flags or S variables. (again, select the S or SW
depending on the format of the connection; S -> Boolean or SW ­> short)
T Timer variables. T or TW depending on the format (T -> Boolean,
TW -> short).
C Counter variables. C or CW depending on the format (C ->
Boolean, CW short).
K Constants. KB -> Boolean, KW or KH -> short, KD -> double. X local variables. Select X -> Boolean, XW -> short or XD -> double,
depending on the format of the connection.
Y subroutine parameters. select Y -> Boolean, YW -> short or YD -
> double in accordance with the format of the connection.
A ASCII string variable. #" Text constants. NAM subroutine names, PLUS routine names LAB label names
Double constants (KD) are defined with the following format:
KD ± x.yyyyE ± zzz
The decimal part yyyy must always be written in full (4 figures).
1-2 10 Series CNC PLUS Library - User Manual (08)
Chapter 1
IMPORTANT
Basic Language Function Blocks

LINE ELEMENT

The line element can be used to "connect" a variable or a constant (left side) with one or more other variables (right side). The variables (constants) on both sides must have the same type (i.e. short). The line element is only available to connect Boolean, short and double variables and constants.
Examples:
short constant c onnected to short variable s
KH00FF
Boolean constant connect ed to boolean variables
KB1 O 24,03
Short constant connected to a timer preset word
KW100 TW 020
MW 200 MW 201
G 010,00
.
Of course you cannot connect inputs and/or constants to the right side of a line element. For an explanation of how to insert a line element please refer to the Plusedit manual.
When you design a logic program using Function Blocks please consider some rules related to “broken” Line Elements. We will explain this using an example:
GD 00 I 00,00
SE TD I1 En
O1
GD 01
The use of a 'broken' line element in this example forces the PLUS development package to assign an automatic variable (MD 151) for this line. This variable will always be assigned to the destination variable GD 1, independent of the status of I 00,00. The translation of the block shows clearly why:
rec. word instr. operand symbol comment
00001 ; Assignment with broken line 00005 L I 00,00 00006 AND( 00007 LD GD 00 00008 = MD 151 00009 )
00002 00010 L MD 151 00015 = GD 01
10 Series CNC PLUS Library - User Manual (08) 1-3
Chapter 1
Basic Language Function Blocks
As you can see, the assignment of MD 115 to GD 01 is not conditioned by the input I 00,00 of the Function Block SETD.
To avoid this probably undesired behaviour you should connect the destination variable GD 01 using a straight line:
G D 00 I 0 0,0 0
S E T D I1 E n
G D 0 1
Using this straight connection, the translation in IL does not require an automatic variable:
rec. word instr. operand symbol comment
00000 ; Assignment with straight line 00000 L I 00,00 00001 AND( 00002 LD GD 00 00003 = GD 01 00004 )
Please keep in mind these considerations when using FB programming:
The use of 'broken' line elements as explained above can cause 'abnormal' behaviour of your logic
program. Problems due to an unwanted assignment as in above example
Broken' line elements use automatic variables and generate extra code which requires more
memory and more execution time.
Avoid to use 'broken' line elements to keep your logic as fast as possible.
1-4 10 Series CNC PLUS Library - User Manual (08)
Basic Language Function Blocks

BOOLEAN FUNCTION BLOCKS

$=N BOOLEAN INVERTER
=N
I1 O1
name inversion duplication format group
I1 YES NO Boolean I O M G S X Y T C K
O1 YES YES Boolean O M G S X Y
$AND BOOLEAN AND GATE TRUTH TABLE
AND I1
I20
AND
O1
I20I1
0 0
1
0
Chapter 1
O1
0
0
1
0 1 1
Connection attributes:
name inversion duplication format group
I1 YES NO Boolean I O M G S X Y T C K I2 YES YES Boolean I O M G S X Y T C K
O1 YES NO Boolean O M G S X Y
The output O1 will be true when Boolean input I1 and I20 are true.
$OR BOOLEAN OR GATE TRUTH TABLE
OR I1
I20
O1
OR
I20I1
0 0 0
1
0 1 1
0 1
O1
0
1
1
1 1
10 Series CNC PLUS Library - User Manual (08) 1-5
Chapter 1
Basic Language Function Blocks
Connection attributes:
name inversion duplication format group
I1 YES NO Boolean I O M G S X Y T C K I2 YES YES Boolean I O M G S X Y T C K
O1 YES NO Boolean O M G S X Y
The output O1 will be true when either Boolean input I1 or I20 or both are true.
$XOR BOOLEAN XOR GATE TRUTH TABLE
XOR XO R I1I2O1
0 0 0
1
0 1 1
I2I1
O1
0
1
1
1
0
name inversion duplication format group
I1 YES NO Boolean I O M G S X Y T C K I2 NO NO Boolean I O M G S X Y T C K
O1 NO NO Boolean O M G S X Y
The output O1 will be true when either Boolean input I1 or Boolean input I2 is true.
$R/S RS FLIP FLOP WITH RESET PRIORITY TRUTH TABLE
R S Q
R/S
R S
Q
R/S
0 0
1
0 1 1
NC = No Change
N C
0
0
1
Connection attributes:
name inversion duplication format group
1 0
R YES NO Boolean I O M G S X Y T C S YES NO Boolean I O M G S X Y T C Q NO NO Boolean O M G S X Y
1-6 10 Series CNC PLUS Library - User Manual (08)
Basic Language Function Blocks
$S/R RS FLIP FLOP WITH SET PRIORITY TRUTH TABLE
Chapter 1
S/R
S Q R
Connection attributes:
name inversion duplication format group
R YES NO Boolean I O M G S X Y T C S YES NO Boolean I O M G S X Y T C Q NO NO Boolean O M G S X Y
S/R
0 0
1
1 1
NC = No Change
RS Q
001
1
NC
0 1
10 Series CNC PLUS Library - User Manual (08) 1-7
Chapter 1
Basic Language Function Blocks

FUNCTION BLOCKS FOR WORD OPERATIONS

$ORW BITWISE LOGICAL OR 16 BIT WORDS
O R W I1
I20
O 1
E X A M P L E : I1 0 0 1 1 0 1 0 1 1 0 1 0 0 1 1 1 ( 1 3 7 3 5 ) I20 0 1 0 0 0 1 1 0 0 0 1 0 1 0 0 1 (17 9 6 1 ) O 1 0 1 1 1 0 1 1 1 1 0 1 0 1 1 1 1 ( 3 0 6 3 9 )
Connection attributes:
name inversion duplication format group
I1 NO NO short M G S X Y T C K I20 NO YES short M G S X Y T C K O1 NO NO short M G S X Y T C
$ANDW BITWISE LOGICAL AND ON 16 BIT WORDS
ANDW I1
I20
O1
E X A M P L E : I1
I20 O1
0011 0101 1010 0111 0100 0110 0010 1001 0000 0100 0010 0001
Connection attributes:
name inversion duplication format group
(13735) (17961) (1057)
I1 NO NO short M G S X Y T C K I20 NO YES short M G S X Y T C K O1 NO NO short M G S X Y T C
$XORW BITWISE XOR OPERATION ON 16 BIT WORDS
X O RW I1
I2
O 1
E X A M P L E : I1 0 0 1 1 010 1 101 0 01 1 1 (13 7 3 5 ) I2 0 1 0 0 011 0 001 0 10 0 1 (17 9 6 1 ) O 1 0 1 1 1 001 1 100 0 11 1 0 (2 9 5 8 2 )
Connection attributes:
name inversion duplication format group
I1 NO NO short M G S X Y T C K
I2 NO NO short M G S X Y T C K O1 NO NO short M G S X Y T C
1-8 10 Series CNC PLUS Library - User Manual (08)
Loading...
+ 369 hidden pages