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.
Changed LIMITSW function
Changed description of A_TO_ID function
Changed description of ID_TO_A function
Changed description of ANAIN function
Changed description of ENCODER function
Changed description of PARK_SP function
Changed description of GET_SP function
Changed GETUSED function
Added new function PUTUSED
Added new function GETUSEC
Added new function PUTUSEC
Changed description of AX_SETZ function
Changed description and NOTE of AX_GET8 function
Added NOTE
Added NOTE
Changed description and NOTES of TC_CONF function
Changed description of TC_READ1 function
Changed description and NOTES of TC_WRIT function
Changed AXD_CMD function
Added new function AX_MECS
Added new function AX_MECR
Added new function AX_MECW
Added new function AX_RTFBCK
CHAP. 10
APPENDIX H
10 Series CNC WINPLUS Library- User Manual (04)
Added new charter “CANOPEN-HILSCHER MANAGEMENT FUNCTIONS”
Added new appendix “TABLE OF MAIN RESOURCES OF AXIS BOARDS”
Preface
10 Series CNC WinPLUS 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 Structured Text (ST) 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
WinPLUS, its language and its applications in the 10 Series CNC environment consult the following
manuals:
10 Series CNC WinPLUS APPLICATION MANUALCode 45006926D
10 Series CNC WinPLUS development toolCode 45006877B
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 the Structured Text (ST). All the other function blocks are extensions which internally use a
function call. These functions can also be used in the ST editor. For each FB there is an example
for the calls and the necessary parameters in ST.
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.
10 Series CNC WinPLUS Library - User Manual (04) 1
Preface
10 Series CNC WinPLUS Library - User Manual
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. For non OS-Wire systems , 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.
OS-Wire systems are not subjected to any hardware limitation and therefore the number of
physical axes may range from 1 to 32, and the same applies to the total number of transducers and
converters.
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.
For non OS-Wire systems , 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.
In OS-Wire systems, the identifiers mapped on the bus use code 1nntHex, where ‘nn’ is the
address (from 0 to 3DHex) of the device and ‘t’ is the transducer number from 1 to 3. On the OS3
drive you can fit (as an option) only one incremental transducer, on the Bridge you can have up to
3 transducers. D/A converters use a similar system of codes (this applies only to Bridge devices):
2nncHex, where ‘nn’ is the address of the device (from 0 to 3DHex) and ‘c’ is the converter number
from 1 to 3.
In OS-Wire systems fitted with local transducers and converters (i.e., not mapped on a digital bus
but present on the board connector), the identifier codes are the same as are used in non OS-Wire
systems.
210 Series CNC WinPLUS Library - User Manual (04)
Preface
10 Series CNCWinPLUS Library - User Manual
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 (WinPLUS). An INTERNAL function call is
in all aspects like a subroutine available to the WinPLUS 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 WinPLUS Library - User Manual (04)3
Preface
10 Series CNC WinPLUS Library - User Manual
LIST OF THE BASE ELEMENTS OF THE LANGUAGE
AABORT: Abort a point-to-point-interpolator................................................................ 4-5
TABLE OF MAIN RESOURCES OF AXIS BOARDS:........................................... H-1
10 Series CNC WinPLUS Library - User Manual (04)vii
Index
10 Series CNC WinPLUS Library - User Manual
END OF INDEX
viii10 Series CNC WinPLUS Library - User Manual (04)
Chapter 1
NC RELATED FUNCTIONS
The NC system function calls allow the WinPLUS logic program to communicate with the system
and to request the execution of typical CNC related functions (operator functions, part program
related functions). All functions can be used as a function block or can be called as a function in
the Structured Text. This chapter gives the type and sequence of parameters for the Structured
Text call. Where necessary, the function and its conditions are explained.
Each function has a return value (parameter 'stat_wrd') which can be found in Appendix B
("Messages relative to NC) or a zero value if the execution was completed without errors.
REQUEST CYCLE START FOR A SELECTED PROCESS.......................................
REQUEST CYCLE FOR A SELECTED PROCESS....................................................
REQUEST CYCLE STOP FOR THE SELECTED PROCESS ....................................
REQUEST THE INTERPOLATOR TO ENTER IN FEEDHOLD STATUS ..................
REQUEST THE INTERPOLATOR TO EXIT FROM FEEDHOLD...............................
ENTER IN HOLD .........................................................................................................
EXIT FROM HOLD.......................................................................................................
SET MANUAL FEEDRATE OVERRIDE......................................................................
SET RAPID FEEDRATE OVERRIDE ..........................................................................
SET FEEDRATE OVERRIDE ......................................................................................
SET SPEED OVERRIDE .............................................................................................
REQUEST MODE OF OPERATION FOR A SELECTED PROCESS.........................
GET JOG INCREMENT...............................................................................................
SET JOG INCREMENT ...............................................................................................
SELECT ONE OR MORE AXES FOR MANUAL MOVEMENT...................................
REQUEST RESET OF NC ..........................................................................................
NOTIFY END OF RESET FROM WINPLUS ...............................................................
GET INFORMATION FROM SELECTED PART PROGRAM .....................................
REQUEST INFORMATION ABOUT PP EXECUTION ................................................
SELECT A PART PROGRAM FOR EXECUTION.......................................................
SELECT A BLOCK FROM PART PROGRAM FOR EXECUTION..............................
EXECUTE A BLOCK IN MDI .......................................................................................
EXECUTES PROGRAM BLOCKS FROM WINPLUS IN MDI MODE .........................
RESUME PART PROGRAM EXECUTION AFTER M06 ............................................
DISABLE PART PROGRAM BLOCK PRECALCULATION ........................................
ENABLE PART PROGRAM BLOCK PRECALCULATION .........................................
10 Series CNC WinPLUS Library - User Manual (03)1-1
Chapter 1
NC Related Functions
REQUEST THE INTERPOLATOR TO ENTER IN FEEDHOLD STATUS AT END
OF MOVEMENT..........................................................................................................
PART PROGRAM EXECUTION MONITORING MANAGEMENT…………………….
MASTER/SLAVE AXES MANAGEMENT………………………………………………..
FEEDHEM
PPRUNINFO
XDA_COMD
1-210 Series CNC WinPLUS Library - User Manual (03)
Chapter 1
NC Related Functions
CYSTART: Request cycle start for a selected process
Type: No Wait
LD/FBD:
stat_wrd
ST:
stat_wrd := CYSTART(proc_num) ;
INPUT VARIABLE:process number (1..20)(int)
OUTPUT VARIABLE:status word(int)
Description:
This function is used to simulate the front panel's cycle start button in WinPLUS
NOTE:
The CYCLE has the same functionalities as CYSTART but it is a WAIT function.
10 Series CNC WinPLUS Library - User Manual (03)1-3
Chapter 1
NC Related Functions
CYCLE: Request cycle for a selected process
Type: Wait
LD/FBD:
stat_wrd
ST:
stat_wrd := CYCLE(proc_num);
INPUT VARIABLE:process number (1..20)(int)
OUTPUT VARIABLE:status word(int)
Description:
This function is utilized to simulate pressing of the command module's cycle start button from
WinPLUS
The WAIT CYCLE function allows synchronization with the NC module and always receives an
acknowledge from the process.
On exit from the CYCLE call two situations can take place, according to the process' status:
• Process in "IDLE" status:
• Process in "RUN" status:
NOTE:
This function can be used, when the logic sends the blocks MDI (MDI_CMD) to execution.
In presence of a CYCLE command, the logic can synchronise with the NC environment as follows:
• execution of a block in MDI with actual axes movements using the routines CONMOV and
ENDMOV
• execution of a block in MDI without moving the axes by testing the process signal status IDLE
and RUN.
The command that has been sent in execution following the
CYCLE call is being executed; you must wait for the process
to enter "IDLE" status so that the command can be executed
The command sent in execution following the CYCLE call
has already been executed.
The function CYSTART has the same features as the function CYCLE, but as it is a NOWAIT, it
does not allow a proper synchronisation between the logic and the NC environment, if the block
sent to execution does not contain an actual axis move.
1-410 Series CNC WinPLUS Library - User Manual (03)
CYSTOP: Request cycle stop for the selected process
LD/FBD:
stat_wrd
ST:
stat_wrd := CYSTOP(proc_num,ax_id);
Chapter 1
NC Related Functions
Type: No Wait
INPUT VARIABLES:process number (1..20)(int)
axes identifier of axis to be stopped(int)
OUTPUT VARIABLE:status word(int)
Description:
This function stops the axis' motion (ax_id) relative to the process specified by the user
("proc_num").
The "ax_id" parameter is insignificant, in fact the axis in motion can be stopped without the "ax_id"
axis identify;
Despite this we advise to give the identifier of the axis to be stopped to the "ax_id" parameter for
reasons of future developments compatibility.
10 Series CNC WinPLUS Library - User Manual (03)1-5
Chapter 1
NC Related Functions
FEEDHLD: Request the interpolator to enter the feedhold status
Type: No Wait
LD/FBD:
stat_wrd
ST:
stat_wrd := FEEDHLD(proc_num);
INPUT VARIABLE:process number (1..20)(int)
OUTPUT VARIABLE:status word(int)
Description:
This function simply sets the feedrate to a zero value. Any on-going interpolating axes motion in
the selected process is suspended. The motion can be resumed with FEED_GO.
NOTES:
• This function is not executed when the control is working in G33 (thread cutting) or G84
(tapping). The stat_wrd variable contains a corresponding error code.
• The feedhold state is not cancelled by a RESET.
• Flag S_nFEEDH (S 20_15) informs the logic about the actual state of the control.
1-610 Series CNC WinPLUS Library - User Manual (03)
Chapter 1
NC Related Functions
FEED_GO: Request the interpolator to exit the feedhold status
Type: No Wait
LD/FBD:
stat_wrd
ST:
stat_wrd := FEED_GO(proc_num);
INPUT VARIABLE:process number 1-20(int)
OUTPUT VARIABLE:status word(int)
Description:
This function makes the interpolator exit the feedhold state requested by the function FEEDHLD.
The feedrate with the value previous to the entry in feedhold state is restored. The motion of the
axes resumes.
If you call this function when the interpolator is not in feedhold state, nothing happens.
See also:
FEEDHLDrequest feedhold system function call
System flags:
S_nFEEDH(S 20_15) process in feedhold status.
10 Series CNC WinPLUS Library - User Manual (03)1-7
Chapter 1
NC Related Functions
FEEDHEM: request to interpolator to enter in feedhold at end of movement
Type: No Wait
LD/FBD:
stat_wrd
ST:
stat_wrd := FEEDHEM(proc_num);
INPUT VARIABLE :number of process 1-20(int)
OUTPUT VARIABILE :status word(int)
Description:
With this function the final point of the movement (program block) currently executed is reached at
zero speed. At this point feedrate is set on zero as is done with the FEEDHLD function. The
movement can be resumed with FEED_GO.
NOTES:
• This function applies continuous motions, as reaching the final point at zero speed is an intrinsic
characteristic in all other types of movement and hence the function in question is an integral part
of the movement. However, at the end of all types of movement, feedrate is set on zero.
• Stopping at the final point of a movement is not ensured if the stop request is executed at a
distance from the final point of the movement which is not sufficient to stop the movement
(compatibly with the acceleration values configured on the axes); in this case, the stop will occur
on the subsequent movement(s), as in a regular feedHold.
• If the stop at final point has been correctly requested, stop coordinates may differ from the final
point of the movement by a distance of the order of 0.01 mm.
• This function is not performed when the control is working in G33 mode (threading) or G84
(tapping). The stat_wrd variable contains the corresponding error code.
• Feedhold status is not deleted by a RESET.
• The S_nFEEDH (S 20_15) flag informs the logic as to the current control status.
1-810 Series CNC WinPLUS Library - User Manual (03)
Chapter 1
NC Related Functions
HOLDON: Enter in hold
Type: No Wait
LD/FBD:
stat_wrd
ST:
stat_wrd := HOLDON(proc_num);
INPUT VARIABLE:process number 1-20(int)
OUTPUT VARIABLE:function status output word(int)
Description:
This function stops the interpolator of the requested process. In this status of the NC, it is possible
to execute manual motion, to execute MDI motion and to invoke multi-block-retrace.
See also:
HOLDOFFExit from HOLD status function call.
System flags:
S_nHOLDA(S 20_02) process in HOLD status.
10 Series CNC WinPLUS Library - User Manual (03)1-9
Chapter 1
NC Related Functions
HOLDOFF: Exit from hold
Type: No Wait
LD/FBD:
stat_wrd
ST:
stat_wrd := HOLDOFF(proc_num);
INPUT VARIABLE:process number (1..20)(int)
OUTPUT VARIABLE:function status output word(int)
Description:
This function makes the interpolator exit from HOLD status function call.
See also:
HOLDONrequest to enter in HOLD status.
System flag:
S_nHOLDA(S 20_2) process in HOLD status.
1-1010 Series CNC WinPLUS Library - User Manual (03)
10 Series CNC WinPLUS Library - User Manual (03)1-11
Chapter 1
NC Related Functions
URLFEED: Set rapid feedrate override
Type: Wait
LD/FBD:
stat_wrd
ST:
stat_wrd := URLFEED(proc_num, url_percent);
INPUT VARIABLES:process number (1-20)(int)
rapid feed percentage ( x 100)(int)
OUTPUT VARIABLE:status word(int)
Description:
Forces the rapid feedrate with a value equal to the percentage of the configured maximal rapid
feedrate. This function only effects the rapid feedrate when the override rapid is enabled (Boolean
process variable URL=1. This variable can be set by the operator in the part program set up menu
or by WinPLUS ).
The url_percent variable can have values between 0 and 10000, where:
00000 = rapid at 0% (feed hold)
10000 = 100% rapid feedrate
You cannot override the rapid feedrate to a value higher than the configured rapid feedrate (100 %).
See also:
SBPROVARSet Boolean process variable (URL)
GBPROVARGet Boolean process variable (URL)
1-1210 Series CNC WinPLUS Library - User Manual (03)
Chapter 1
NC Related Functions
FRORIDE: Set feedrate override
Type: Wait
LD/FBD:
stat_wrd
ST:
stat_wrd := FRORIDE(proc_num, fro_percent);
INPUT VARIABLES:process number (1-20)(int)
FRO % value (expressed in % * 100)(int)
OUTPUT VARIABLE:status word(int)
Description:
This function used to control the feedrate of the axes when not in G00. The feedrate is limited by
the system to the configured rapid feedrate for every axis. The true feedrate percentage must be
multiplied with 100 to obtain the controls internal resolution:
S_nFRO(SW 36) actual feedrate override percentage.
10 Series CNC WinPLUS Library - User Manual (03)1-13
Chapter 1
NC Related Functions
SPORIDE: Set speed override
Type: Wait
LD/FBD:
stat_wrd
ST:
stat_wrd := SPORIDE(proc_num, sso_percent);
INPUT VARIABLES:process number 1-20(int)
SSO % value (expressed in % * 100)(int)
OUTPUT VARIABLE:status word(int)
Description:
Value of sso_percent%Comment
00 %of the programmed spindle speed
1001 %
100010 %
10000100 %
20000200 %
ecc.
This function is used to force the spindle speed override value in the systems process display.
WinPLUS uses the SSO value to control the spindle RPM in G97 or the tool cutting speed in G96.
The theoretical maximum limit of the spindle speed override is 327.67 %.
See also:
S_nSSO(SW 37) actual spindle speed override percentage value.
1-1410 Series CNC WinPLUS Library - User Manual (03)
Chapter 1
NC Related Functions
SETMODE: Request mode of operation for a selected process
Type: Wait
LD/FBD:
stat_wrd
ST:
stat_wrd := SETMODE(proc_num, mode);
INPUT VARIABLES:process number 1-20(int)
mode select(int)
OUTPUT VARIABLE:function status output word(int)
Description:
The mode select parameter can have following values:
00001 = MDI
00002 = auto
00003 = semi auto
00004 = continuous JOG
00005 = incremental JOG
00006 = return to contour
00007 = home
00008 = hand pulse generator
See also:
S_nPROMOD(SW 31) active process mode of operation.
10 Series CNC WinPLUS Library - User Manual (03)1-15
Chapter 1
NC Related Functions
GJOG: Get jog increment
LD/FBD:
ST:
stat_wrd := GJOG (proc_num, jog_val);
Type: Wait
stat_wrd
INPUT VARIABLE:process number 1-20(int)
OUTPUT VARIABLES:jog value(lreal)
status word(int)
Description:
This function returns the current of the incremental JOG (manual axis movements).
The value is written in the jog_val variable in a lreal format.
1-1610 Series CNC WinPLUS Library - User Manual (03)
SJOG: Set jog incremen
LD/FBD:
ST:
stat_wrd := SJOG(proc_num, jog_val);
Chapter 1
NC Related Functions
Type: Wait
stat_wrd
INPUT VARIABLES :process number 1-20(int)
increment for manual jog(lreal)
OUTPUT VARIABLE :function status output word(int)
Description:
This function allows to force the incremental manual jog value on the declared process.
10 Series CNC WinPLUS Library - User Manual (03)1-17
Chapter 1
NC Related Functions
AXSELEC: Select one or more axes for manual movement
LD/FBD:
stat_wrd
* L'ingresso “ax_id” puo' essere duplicato.
ST:
stat_wrd := AXSELEC(proc_num, ax_id, …);
Type: Wait
INPUT VARIABLES:process number (1..20)(int)
first axis physical identifier(int)
…..
last axis physical identifier(int)
OUTPUT VARIABLE:function output status word(int)
Description:
This function is used to select one or more axes for manual operations. The axes managed by Win
PLUS (motion control by logic) cannot be selected (the status word will contain a non-zero value).
The contemporary selection of different axes is useful only for the homing cycle execution.
Up to 9 axes can be selected. The input variable ax_id must be duplicated for each one of the
axes to be selected. Using the function block you must duplicate the ax_id.
Parameter ax_id must be 1 since it is currently only possible to manually move one axis at a time.
See also:
S_nAXSEL(SW 29) ID of axis actually selected. If more than one axis are selected,
SW29 contains the ax_id of the first axis.
1-1810 Series CNC WinPLUS Library - User Manual (03)
Chapter 1
NC Related Functions
RQRESET: Request reset of NC
Type: No Wait
LD/FBD:
stat_wrd
ST:
stat_wrd := RQRESET(proc_num);
INPUT VARIABLE:process number 1-20(int)
OUTPUT VARIABLE:status word(int)
Description:
A system reset causes:
• all axes motion (except point to point) to stop
• the part program buffer to be cleared
• the part program pointer to be set to the first block of the active program
• the G92 work register presets to be cancelled
• all origin shifts to be cleared
• the cycle stop button to be released
• the power turn on G-codes to be activated
• certain three-letter codes to be reset
All other actions required for a reset must be started in the WinPLUS program. These actions can
be different according to the type of applications. Some examples of what may be necessary to
execute from WinPLUS:
• stop the spindle and the coolant
• abort all point-to-point-axis motion
• reset specific M codes to their default state
• activate a default screen display
• initialize certain machine related conditions and variables
10 Series CNC WinPLUS Library - User Manual (03)1-19
Chapter 1
NC Related Functions
The sequence of RQRESET usage in a WinPLUS routine should be:
• call RQRESET
• check S_nRESE (S 20_07) to go true
• execute the action required for RESET (in P.L.U.S)
• call ENDRESE
See also:
S_nRESE(S 20_07) process is being reset.
ENDRESELogic has finished reset actions
Manual10 Series CNC WinPLUS Application Manual - chapter 8
1-2010 Series CNC WinPLUS Library - User Manual (03)
Chapter 1
NC Related Functions
ENDRESE: Notify end of reset from WinPLUS
Type: Wait
LD/FBD:
stat_wrd
ST:
stat_wrd := ENDRESE(proc_num);
INPUT VARIABLE:process number (1..20)(int)
OUTPUT VARIABLE:status word(int)
Description:
This system function call must be used to tell the system that WinPLUS has finished all the action
required for a RESET.
The system will not go into IDLE state before it receives this call from the logic. If you omit to call
this function after reset, the system will "hang".
See also:
S_nRESE(S 20_07) system reset on-going
Manual10 Series CNC WinPLUS Application Manual - chapter 8
10 Series CNC WinPLUS Library - User Manual (03)1-21
Chapter 1
NC Related Functions
GETPPNAM: Get information from selected part program
INPUT VARIABLE:process number (1..20)(int)
OUTPUT VARIABLES:name of the active main program(string)
name of the active subroutine(string)
level of the active part program(int)
status word(int)
Description:
The GETPPNAM function returns the name of the active main part program, subroutine name in
execution, if any and if present, and nesting level of the active part program.
The "pp_num" parameter shows if a part program is active and at what nesting level the subroutine
in execution is.
NOTE:
The parameters "name_sub" and "name_main" act on the first 4000 characters of the ASCII array.
1-2210 Series CNC WinPLUS Library - User Manual (03)
Chapter 1
NC Related Functions
The "pp_num" parameter can have the following values:
ValueMeaning
0no active part program is present
1main part program is active
2subroutine at level 2 is in execution
3subroutine at level 3 is in execution
4subroutine at level 4 is in execution
5subroutine at level 5 is in execution
If no part program is active (pp_num =0), the output parameters "name_main" and "name_sub"
become insignificant.
If the main part program (pp_num=1) is in execution, its name is shown in the output parameter
"name_main" while the "name_sub" parameter is insignificant.
If a subroutine (2<pp_num<=5) is in execution, the "name_main" parameter will contain the name
of the main part program while the "name_sub" parameter will contain the name of the subroutine
in execution.
Part program names can be long up to 48 characters.
See also:
S_nGMACRO(SW 21) active parameter G Code
10 Series CNC WinPLUS Library - User Manual (03)1-23
Chapter 1
NC Related Functions
GETPNTR: Request information about part program execution
INPUT VARIABLE:process number (1..20)(int)
OUTPUT VARIABLES:block number main(lreal)
block number nesting level1(lreal)
block number nesting level2(lreal)
block number nesting level3(lreal)
block number nesting level4(lreal)
function status output(int)
Description:
This function returns the active part program block sequence numbers of the main program and
nested subroutines. Block sequence numbers are integer numbers and can have up to six
significant digits. This WinPLUS library routine presents the sequence numbers in a lreal format.
If no block numbers are used in the active part program or in any of the subroutines, a 0 will be
returned.
1-2410 Series CNC WinPLUS Library - User Manual (03)
PP_SELE: Select a part program for execution
LD/FBD:
stat_wrd
ST:
stat_wrd := PP_SELE(proc_num, mode, pp_name);
Chapter 1
NC Related Functions
Type:Wait
INPUT VARIABLES:process number (1..20)(int)
mode of activation, with or w/o analysis(int)
name of the part program to be activated(string)
OUTPUT VARIABLE:status word(int)
Description:
This function is used to select a part program for execution. The activation can be done in
combination with a part program pre-analysis (mode=0) or without pre-analysis (mode=1).
When you enter an empty string (0 characters) as the part program name, the current active part
program will be de-selected (in this case, the function is equivalent to the "deactivate" softkey).
NOTE:
The parameter "pp_name" acts on the first 4000 characters of the ASCII array.
10 Series CNC WinPLUS Library - User Manual (03)1-25
Chapter 1
NC Related Functions
PP_EXEC: Select a block from part program for execution
LD/FBD:
stat_wrd
ST:
stat_wrd := PP_EXEC(proc_num, block_num);
Type: Wait
INPUT VARIABLES:process number (1..20)(int)
number of last block to be executed(lreal)
OUTPUT VARIABLE:status word(int)
Description:
The block number is entered for the active program. The program must be started with the cycle
start push button or with the equivalent WinPLUS function.
If the block number specified in "block_num" is not present in the active program, the function
returns 0 in the "stat_wrd" (function executed correctly) and the part program will be entirely
executed.
The PP_EXEC command is cancelled in the following cases:
• when the part program positions itself on the indicated block
• when the system is reset
1-2610 Series CNC WinPLUS Library - User Manual (03)
MDI_CMD: Execute a block in MDI
LD/FBD:
ST:
stat_wrd := MDI_CMD(proc_num, cmd_string);
Chapter 1
NC Related Functions
Type: Wait
stat_wrd
INPUT VARIABLES:process number 1-20(int)
block to be executed (ASCII string)(string)
OUTPUT VARIABLE:status word(int)
Description:
Its string handling capabilities allow WinPLUS to transfer part program blocks from its ASCII
memory area to the NC ambient. This function will just copy a string from the I/O processor's ASCII
buffer (or a string constant) to the MDI buffer in the addressed process. These part program blocks
can then be executed with a cycle start (system function call CYSTART or CYCLE).
Part program blocks from WinPLUS can only be executed under following conditions:
• the process mode must be MDI
• the process status must be IDLE or MAS
• the string you copy to the MDI buffer must be a legal part program block
10 Series CNC WinPLUS Library - User Manual (03)1-27
Chapter 1
NC Related Functions
NOTES:
• We recommend disabling the MDI softkey (SETHINT) during the execution of part program
blocks by WinPLUS.
• A MDI_CMD block cannot be executed using the front panel's cycle start push button. You
MUST use the system function call CYSTART
See also:
S_nMAS(S 20_13)Process in calculation stop (transfer inhibit)
S_nIDLE(S 20_00) Process status is idle
S_nMDI(S 31_00) Manual Data Input mode active
CYSTARTSystem function call cycle start from WinPLUS NO WAIT Type
CYCLESystem function call cycle start from WinPLUS WAIT Type
1-2810 Series CNC WinPLUS Library - User Manual (03)
Chapter 1
NC Related Functions
MDI_EXEC: Executes program blocks from WinPLUS in MDI mode
Type: Wait
LD/FBD:
stat_wrd
ST:
stat_wrd := MDI_EXEC(proc_num, cmd_string);
INPUT VARIABLES:process number 1-20(int)
block to be executed (ASCII string)(string)
OUTPUT VARIABLE:status word(int)
Description:
This function makes it possible to execute a Part Program block in MDI mode.
The block to be executed must be entered in string form in variable “cmd_string” and the relative
process in variable “proc_num”.
This function causes the immediate execution of the block without having to force a cycle start,
since this is already executed by the function itself.
The function can be activated only if:
• The process is in MDI;
• The process is in IDLE or MAS status
• The string that is copied onto the MDI buffer must be a valid part program block.
The block specified as input in “cmd_string” must be a valid Part Program block.
NOTE:
• We recommend disabling the MDI softkey (SETHINT) during the execution of Part Program
blocks from WinPLUS.
See also:
S_nMAS(S 20_13) Process in calculation stop
S_nIDLE(S 20_00) Process status is IDLE
S_nMDI(S 31_00) Manual Data Input mode active
10 Series CNC WinPLUS Library - User Manual (03)1-29
Chapter 1
NC Related Functions
PPRESUME: Resume part program execution after M06
Type: Wait
LD/FBD:
stat_wrd
ST:
stat_wrd := PPRESUME(proc_num);
INPUT VARIABLE:process number (1..20)(int)
OUTPUT VARIABLE:status word(int)
Description:
This function is used to exit the hold state of the NC which was forced by a M function (M06 tool
change for example).
1-3010 Series CNC WinPLUS Library - User Manual (03)
Chapter 1
NC Related Functions
PREC_OFF: Disable part program block precalculation
Type: Wait
LD/FBD:
stat_wrd
ST:
stat_wrd := PREC_OFF(proc_num);
INPUT VARIABLE:process number 1-20(int)
OUTPUT VARIABLE:status word(int)
Description:
This function disables the part program block precalculation. Before analysing another block, the
system asks for consent with the EOB" part program interface task. A "NACK" programmed in the
task forces the system to "MAS + IDLE" status.
If the nEOB routine is enabled with PREC_OFF it will also be activated when you put the "#"
synchronization character in front of a part program block.
See also:
PREC_ON
10 Series CNC WinPLUS Library - User Manual (03)1-31
Chapter 1
NC Related Functions
PREC_ON: Enable part program block precalculation
Type: Wait
LD/FBD:
stat_wrd
ST:
stat_wrd := PREC_ON(proc_num);
INPUT VARIABLE:process number (1..20)(int)
OUTPUT VARIABLE:status word(int)
Description:
This function restores the system's normal functioning. Consensus to analyse the following block
will not be requested to the interface at the end-of-block (part program block precalculation
enabled).
See also:
PREC_OFF
1-3210 Series CNC WinPLUS Library - User Manual (03)
FEEDBYON: Activate feedrate bypass
LD/FBD:
ST:
stat_wrd := FEEDBYON(proc_num, velocity);
Chapter 1
NC Related Functions
Type: No Wait
stat_wrd
INPUT VARIABLE:process number 1-20(int)
velocity expressed in configured units(lreal)
OUTPUT VARIABLE:function status output word(int)
Description:
Feedrate bypass is a feature which allows you to instantaneously change the feedrate to any
desired value within the limits of the axes. This function can be used for fast approach to the work
piece ("gap elimination").
You must express the desired feedrate in configured units, i.e. if your machine was configured in
inches, the velocity parameter has to be a feedrate expressed in inches per minute. If the feedrate
velocity is higher than the configured rapid feedrate of the axes involved, the system will limit the
resulting feedrate to the rapid of the slowest axis involved.
This function can be activated during the linear point-to-point interpolation (G01 with G29) with G94
or G95 feedrate coding. In all other interpolation modes the active feedrate bypass mode will be
aborted or the request with FEEDBYON will be ignored. An ignored request will not be memorised.
Changing the process status will also lead to the cancellation of feedrate bypass; i.e. when the
process goes IDLE, the feed bypass will be switched off automatically.
The process flag S_nFRB will always reflect the active state of the feedrate bypass.
During feedrate bypass, you can still use the feedrate override selector to fine tune the bypass
speed. You must use the FEEDBYOF system function call to restore the original feedrate as
programmed in the part program.
10 Series CNC WinPLUS Library - User Manual (03)1-33
Chapter 1
NC Related Functions
NOTE:
The effect of the feedrate bypass call is instantaneous. There is no synchronization with the part
program blocks or the motion.
See also:
FEEDBYOFrestore programmed feedrate
S_nFRB(S 30_15) feedrate bypass active flag
1-3410 Series CNC WinPLUS Library - User Manual (03)
Chapter 1
NC Related Functions
FEEDBYOF: Restore programmed feedrate after feedrate bypass
Type: No Wait
LD/FBD:
stat_wrd
ST:
stat_wrd := FEEDBYOF(proc_num);
INPUT VARIABLE:process number 1-20(int)
OUTPUT VARIABLE:status word(int)
Description:
This function will instantaneously restore the programmed feedrate when feedrate bypass is in
effect. You normally use this system function call to finish the quick approach to the workpiece.
Calling this function when feedrate bypass is not active has no other effect than a waste of time in
executing the call.
See also:
FEEDBYONactivate feedrate bypass
S_nFRB(S 30_15) feedrate bypass is active
10 Series CNC WinPLUS Library - User Manual (03)1-35
Chapter 1
NC Related Functions
INTP_ABI: Enable driver for real time reading of interpolator parameters.
Type: Internal
LD/FBD:
stat_wrd
ST:
stat_wrd := INTP_ABI(proc_num);
INPUT VARIABLE :process number (1..4)(int)
OUTPUT VARIABLE: status word(int)
Description:
The function activates the driver utilized for real time reading of a number of data relative to
process axes interpolator.
The driver can be enabled at any moment but if this is done during the execution of a movement
block (one or more part program blocks), data relative to the interpolator will be available only
starting from the beginning of following block.
The output STAT_WRD can have the following values:
ValueMeaning
0OK
402Process number out of range
404Driver Already Active
See also:
GET_INTP
INTP_DIS
1-3610 Series CNC WinPLUS Library - User Manual (03)
Chapter 1
NC Related Functions
INTP_DIS: Disable driver for real time reading of the interpolator parameters.
Type: Internal
LD/FBD:
stat_wrd
ST:
stat_wrd := INTP_DIS(proc_num);
INPUT VARIABLE:process number (1..4)(int)
OUTPUT VARIABLE:status word(int)
Description:
The function disables the driver for real time reading of data relative to the process axes
interpolator.
The driver can be enabled at any moment but if this is done during the execution of a movement
block (one or more part program blocks), the driver will be actually stopped only at the end of the
block.
The output STAT_WRD can have the following values:
ValueMeaning
0OK
402Process number out of range
405Driver already disabled
See also:
INTP_ABI
GET_INTP
10 Series CNC WinPLUS Library - User Manual (03)1-37
Chapter 1
NC Related Functions
GET_INTP: Reads in real time a number of interpolator data
The function reads in real time a number of values relative to the specified process interpolator: it
can be called only after enabling the driver for real time communication between WinPLUS and
interpolator (via INTP_ABI).
The parameter to be read is selected through the para_num variable, which can have the following
values:
1 for current feed on profile.
2 distance to go, on the profile, in order to finish the movement
The parameter specified by para_num will be written in the "value" variable and will be expressed
in accordance with the configured measurement unit.
The output STAT_WRD can have the following values:
ValueMeaning
0OK
403para_num out of range
402process number out of range
405driver disabled
See also:
NTP_ABI
INTP_DIS
1-3810 Series CNC WinPLUS Library - User Manual (03)
PP_TSRC: Finds a string inside the active part program
string to find(string)
search direction (0 onwards, 1 backwards)(int)
OUTPUT VARIABLES:status word(int)
Description:
This function searches for the string specified as an input in the "aString" parameter inside the
selected part program and in the direction specified in the "direction" parameter.
At the next Part Program block to be executed, the pointer will be positioned on the block where
the string has been found.
If the string is not found, the function returns to the output variable "stat_wrd" the beginning or end
of file, according to the selected search direction.
The function returns an error if no Part Program is selected.
NOTE:
The parameter "string" acts on the first 4000 characters of the ASCII array.
10 Series CNC WinPLUS Library - User Manual (03)1-39
Chapter 1
NC Related Functions
PP_BSRC: Position the active Part Program on the selected block
block number (int)
search direction (0 onward, 1 backwards)(int)
OUTPUT VARIABLES:status word (int)
Direction:
This function positions the pointer on the next PP block to be executed, "block number" blocks
onwards or backwards with respect to the current position.
If a number of blocks higher than those left at the end or at the beginning of the Part Program are
requested to be moved, the function returns to the output variable "stat_wrd" the beginning or end
of file warning, according to the selected search direction.
The function returns an error if a Part Program has not been selected.
1-4010 Series CNC WinPLUS Library - User Manual (03)
RCM_MOD: Define the mode for the search in memory.
LD/FBD:
stat_wrd
ST:
stat_wrd := RCM_MOD(proc_num, mode);
Chapter 1
NC Related Functions
Type: Wait
INPUT VARIABLES:process number 1-4(int)
mode(int)
OUTPUT VARIABLE:status word(int)
Description:
If the search in memory is active, this function allows to define how the auxiliary functions have to
be managed; that is if they have to be memorized and sent to the Plus logic only once at the end of
the search or whenever they are found in the part program.
The modality to be used can be selected through the "mode" parameter that can have the following
values:
bitmeaning
0M function passed to WinPlus during the search
1T function passed to WinPlus during the search
2S function passed to WinPlus during the search
3axes function passed to WinPlus during the search
If the "mod" parameter is equal to 0 the auxiliary functions are memorized and sent to the logic
only at the end of the search.
10 Series CNC WinPLUS Library - User Manual (03)1-41
Chapter 1
NC Related Functions
AXSELFED: Selects axes allowing to change feedrate override
Type: Wait
LD/FBD:
stat_wrd
ST:
stat_wrd := AXSELFED(proc_num, ax_feed, …);
* The parameter ax_feed can be copied.
INPUT VARIABLES:process number (1...20)(int)
first “ax_feed” structure(Ax_feed)
...
last “ax_feed” structure(Ax_feed)
OUTPUT VARIABLE:status word(int)
“Ax_feed” is a data structure composed of:
ax_id: (int)physical axis identifier (1…32)
feed: (int)feed percentage of the axis (0……10000)
Description:
This function is used to select one or more axes to be moved manually and to define for each of
them the feedrate override percentage. The axes handled by WinPLUS (movements controlled by
the logic) cannot be selected. You can select up to 9 axes. The value of feed is expressed in
percent * 100 i.e. to have 10% you have to input 1000.
The axis speed will result according to the following formula:
Va = Vc ∗ Sf ∗ Sa
Where:
Va = speed axis;
Vc = configured speed in AMP in the field “manual feed”;
Sf = percentage value of the selector of either feed manual or softkey set value or forded by PLUS;
Sa = set value in the feed field of the function AXSELFED or AXMANFED.
1-4210 Series CNC WinPLUS Library - User Manual (03)
NC Related Functions
NOTE:
Execution of the function with wrong values can cause errors.
The selection of a new axis through the buttons “↓” or “↑” cancels the set speed variation.
ESEMPIO:
Chapter 1
10 Series CNC WinPLUS Library - User Manual (03)1-43
Chapter 1
NC Related Functions
AXMANFED: Set feedrate override of axes in manual movement
Type: Wait
LD/FBD:
stat_wrd
ST:
stat_wrd := AXMANFED(proc_num, ax_feed);
* The parameter ax_feed can be copied.
INPUT VARIABLES:process number (1...20)(int)
First “ax_feed” structure(Ax_feed)
...
Last “ax_feed” structure(Ax_feed)
OUTPUT VARIABLE:status word(int)
Description:
This function is used to set the feedrate override for the axes moved manually. The axes handled
by WinPLUS (movements controlled by the logic) cannot be selected. You can select up to 9 axes.
The value of feed is expressed in percent * 100 i.e. to have 10% you have to input 1000.
The axis speed will result according to the following formula:
Va = Vc ∗ Sf ∗ Sa
Where:
Va = speed axis;
Vc = configured speed in AMP in the field “manual feed”;
Sf = percentage value of the selector of either feed manual or softkey set value or forded by PLUS;
Sa = set value in the feed field of the function AXSELFED or AXMANFED.
1-4410 Series CNC WinPLUS Library - User Manual (03)
NC Related Functions
NOTE:
Execution of the function with wrong values can cause errors.
The selection of a new axis through the buttons “↓” or “↑” cancels the set speed variation.
ESEMPIO:
Chapter 1
10 Series CNC WinPLUS Library - User Manual (03)1-45
Chapter 1
NC Related Functions
INTP_CMD: Send a command to the interpolator
LD/FBD:
stat_wrd
ST:
stat_wrd := INTP_CMD(proc_num, code_cmd);
Type: No Wait
INPUT VARIABLES:process number(int)
code of the command to be enabled(int)
OUTPUT VARIABLES:status word(int)
Description:
With this call you can send asynchronous commands to the interpolator.
At the moment only the function for aborting the tapping cycle is available which sets the input
variable ”code_cmd” to 1 (other values cause the error 160). The command is only accepted during
the actual tapping cycle (and ignored during the rapid approach to the drill point and during the
rapid return).
The output variable STAT_WRD can have the following values:
ValueMeaning
0 OK
160 Invalid command (the CODE value is invalid)
1-4610 Series CNC WinPLUS Library - User Manual (03)
PPRUNINFO: Part Program execution monitoring management
Number of process to be monitored(int)
Index of MD area to contain the information(int)
Index of MW area to contain the information(int)
OUTPUT VARIABLES :status word(int)
Description:
The PPRUNINFO function makes it possible to monitor the execution of a part program, by
providing the machine logic with information on the movements performed at that moment, whether
movements contained in a part program or movements executed in a different mode (manual,
MDI,...). During movements in Manual mode or in non continuous Run mode, this function only
supplies the information regarding the movement underway; in the case of continuous run mode,
the function supplies information on the movement underway (or the first movement to be
performed) and the next movement.
The system will make available the information from the time the movement enable function is
activated to the end of movement function. The information will be notified within the MW and MD
variables starting with the index notified by the function itself; 400 MW and 320 MD variables will
be used. The data will be supplied within the MW and the MD variables only upon an explicit read
request by the logic, and hence the read request will have to be entered whenever it proves
necessary to process information of this type.
The system will start the collection of monitoring data only upon an explicit request from the logic
and, similarly, will stop it based on an explicit request. The request has to be entered before
starting a movement (Cycle); activation requests entered when the movement has started will not
be managed. Requests entered when a movement has already started (i.e., after the cycle) will be
activated at the next start.
10 Series CNC WinPLUS Library - User Manual (03)1-47
Chapter 1
NC Related Functions
MW mapping
The information stored in the Mw variables regards the axes moved (5 MW’s per axis) and the
movements executed in each process (10 MW’s per process). The information regarding the axes
is organised and accessed on the basis of the axis ID; process-related information is organised by
process number. The following scheme applies:
initial MW
initial MW + 5
MW for axis with ID 1
MW for axis with ID 2
………………
initial MW + 155
initial MW + 160
initial MW + 170
MW for axis with ID 32
MW for movement on process 1
MW for movement on process 2
……………….
initial MW + 390
MW for movement on process 24
The information notified for each axis will include the following elements:
Status Word
Variable containing the following elements (as bits):
bit 0 : Axis moved explicitly in the current movement. The
coordinates are given in the axis MD’s
bit 1 : Axis moved in an indirect manner, i.e., moved by
virtualisations or TCP without its having been explicitly
programmed
bit 4 : Axis moved explicitly in the next movement. The coordinates
are given in the axis MD’s
bit 5 : Axis moved in an indirect manner, i.e., moved by
virtualisations or TCP without its having been explicitly
programmed in the next movement
AxID and Process
Contains the axis ID and the number of the process controlling the
motion of the axis. The information breaks down into
High byte: axis ID
Low byte: controlling process
Free
3 free MW’s for future implementation
1-4810 Series CNC WinPLUS Library - User Manual (03)
The information notified for each process contains the following elements
Chapter 1
NC Related Functions
Status Word
BlkNbr 1
BlkNbr 2
Type 1
Variables containing the following elements (as bits):
bit 0 : Data present, regarding the current movement (this applies
to the process MD’s too)
bit 4 : Data present, regarding the next movement (this applies to
the process MD’s too)
bit 13 : Information that has not changed since the earlier reading; in
actual practice, the data have not been altered
bit 14 : Monitoring activity started
bit 15 : Current process
Block number (N), if any, programmed in the current block
Block number (N), if any, programmed in the next block
Contains the current type of movement, and can be:
1 - Linear movement
2 - Circular movement
3 - Threading
4 - Tapping without transducer
5 - Tapping with transducer
6 - Probing
7 - Boring
9 - Probing (approaching)
15 - HSM
21 - Manual movement
22 - Zero micro
Type 2
Free
Contains the next type of movement, and can be:
1 - Linear movement
2 - Circular movement
3 - Threading
4 - Tapping without transducer
5 - Tapping with transducer
6 - Probing
7 - Boring
9 - Probing (approaching)
5 free MW’s for future implementation
10 Series CNC WinPLUS Library - User Manual (03)1-49
Chapter 1
NC Related Functions
MD mapping
The information stored in the MD variables regards the axes moved (4 MD’s per axis) and the
movements executed in each process (8 MD’s per process). The information regarding the axes is
organised and accessed on the basis of the axis ID; process-related information is organised by
process number. The following scheme applies:
initial MD
initial MD + 4
MD for axis with ID 1
MD for axis with ID 2
………………
initial MW + 124
initial MW + 128
initial MW + 136
MD for axis with ID 32
MD for movement on process 1
MD for movement on process 2
……………….
initial MW + 312
MD for movement on process 24
The following elements are notified for each axis:
Final point 1
Final (absolute) position to be assumed by the axis at the end of the
current movement
Final point 2
Final (absolute) position to be assumed by the axis at the end of the
next movement
Free
2 free MD’s for future implementation
The following elements are notified for each process:
Feedrate 1
Feedrate 2
Radius 1
Feedrate programmed on the current block in unit/min
Feedrate programmed on the next block in unit/min
Radius of the circumference being executed on the current block. Its
direction is defined by the sign: clockwise (G2) if the sign is
negative, counterclockwise (G3) if the sign is positive.
Radius 2
Radius of the circumference being executed on the next block. Its
direction is defined by the sign: clockwise (G2) if the sign is
negative, counterclockwise (G3) if the sign is positive.
Free
4 free MD’s for future implementation.
1-5010 Series CNC WinPLUS Library - User Manual (03)
Chapter 1
NC Related Functions
Activating the monitoring stage
To start the monitoring stage, call the PPRUNINFO function with the func_num = 1 parameter.
The proc_num parameter will indicate the process to be monitored; if this parameter is set on 0, the
monitoring request will apply to all the current processes. The other two parameters are
meaningless.
The STAT_WRD output variable may assume the following values:
ValueMeaning
0OK
2Process number wrong
3Process not present
Deactivating the monitoring stage
To end the monitoring stage, call the PPRUNINFO function with the func_num = 2 parameter. The
proc_num parameter will indicate the process to be monitored; if this parameter is set on 0, the
deactivation request will apply to all the current processes. The other two parameters are
meaningless.
The STAT_WRD output variable may assume the following values:
ValueMeaning
0OK
2Process number wrong
3Process not present
Data reading
To read the monitoring data (i.e., to load the MW and MD variables) call the PPRUNINFO function
with the func_num = 3 parameter. The proc_num parameter will indicate the process whose data
have to be read; if this parameter is set on 0 the read request will be about the data of all the
current processes. The MW_index and MD_index parameters specify the MW and MD into which
the data must be downloaded.
The STAT_WRD output variables may assume the following values:
ValueMeaning
0OK
2Process number wrong
3Process not present
4Monitoring function not activated
6MD index wrong, or does not make it possible to save the 320 variables
needed for monitoring
7MW index wrong, or does not make it possible to save the 400 variables
needed for monitoring
10 Series CNC WinPLUS Library - User Manual (03)1-51
Chapter 1
NC Related Functions
Checking monitoring activities
To determine whether or not the monitoring activity is on, call the PPRUNINFO function with the
func_num = 4 parameter. The proc_num parameter will indicate the process whose monitoring
status has to be checked. The other two parameters are meaningless.
The STAT_WRD output variable may assume the following values:
ValueMeaning
0Monitoring NOT activated
1Monitoring ON
2Process number wrong
Other functions
All the calls made to the PPRUNINFO function with a func_num parameter other than specified
above will generate an error message.
The STAT_WRD output variable may assume the following values:
ValueMeaning
5Function not envisaged
1-5210 Series CNC WinPLUS Library - User Manual (03)
Process number 1-20(int)
Following mode(int)
Folowing ratio(lreal)
synchronisation distance(lreal)
MD index for monitoring values(int)
MW index for monitoring values(int)
name of master axis(int)
name of slave axis(int)
…..
OUTPUT VARIABLE:status word(int)
Description:
Through a series of functions associated with Function XDA_COMD it is possible to interact with
the programming of Master/Slave axes from a process (see part program command XDA).
This function has a set of parameters whose meaning and use depends on the specific function
requested.
10 Series CNC WinPLUS Library - User Manual (03)1-53
Chapter 1
NC Related Functions
Master/Slave association
This function requests the association between a master axis and (up to 8) slave axes. This
instruction DOES NOT activate the following function, which is activated by a specific
command. This means that after this instruction a movement of the master does not bring about a
movement of the slave(s). The command is accepted only if the process is in Idle.
Parameters needed
FuncNum1
ProcNumNumber of process for which the association is requested
ModeDefines the following method of the master by the slave and can be
0 The slave follows the master point by point
1 The slave follows the master in terms of speed
2 The slave follows the master in terms of position
3 The slave follows the master in terms of position, and the
synchronisation distance is taken up
FollRateThis is the master following ratio specified for the slave(s). It must be viewed as a
multiplication factor for the feedrate of the master or the distance covered by it. If
the value of this ratio is 1.0, the motion of the master is reproduced exactly by the
slave; if it is smaller than 1.0, feedrate/distance are reduced, if it is greater than 1.0
they are increased. This value can be preceded by a sign
SpaceThis is the distance to be covered by the slave to synchronise with the motion of
the master.
MastNamThis is the name of the master axis and it is denoted with a single ASCII character
SlavNamThese are the names of the slave axes (each denoted with a single ASCII
character). You can program up to 8 slaves.
The master axis can identify either an axis present in the process in which the command is
activated or an axis which is not present; in the latter case, a “virtual” axis, having the name
specified, will be created; this axis will have the dynamic characteristics inherited from the slave
axes (the lowest values of feedrate, accelerations and jerk). This axis may be part of a
virtualisation (UPR, UDA,…) and also of a TCP. The master axis Homing operation cannot be
performed.
At least one slave axis must be present in the process in which the command is activated; it can be
a SHARED axis, i.e. an axis shared with the machine logic environment. In this connection, the
axis may continue to be moved by the machine logic even after the association with the master,
however it cannot be moved while it is following the master. It cannot be part of any virtualisation or
TCP.
1-5410 Series CNC WinPLUS Library - User Manual (03)
Chapter 1
r
A
r
A
NC Related Functions
Mode 0
In this mode, the slave axis follows the master proportionately to the value of the ratio (if the ratio =
1, the slave reproduces the movement of the master axis exactly), synchronisation is
instantaneous and the variation in the feedrate of the slave is “in steps”. Slave position and
feedrate values are calculated, instant by instant, according to the following formulas:
If the speed specified for the slave axis exceeds the maximum admissible value for this axis, the
system will reduce the feedrate requested accordingly and will give out an emergency (servo error)
message, in that the slave is unable to follow the required position.
Mode 1
In this mode, the slave follows the feedrate of the master proportionately to the value of the ratio (if
the ratio = 1, the slave copies the movement of the master axis exactly); the synchronisation
depends on the dynamic characteristics of the slave axis and/or the Space parameter which
defines the synchronisation distance.
If the distance = 0, the slave will synchronise with the master based on its maximum acceleration
and using linear ramps only.
V
V maste
Synchronisatio
t 0
ctivation
t 1
V slave
t
10 Series CNC WinPLUS Library - User Manual (03)1-55
Chapter 1
r
A
NC Related Functions
If the value is not 0, the slave will synchronise with the master based on an acceleration calculated
as a function of the synchronisation distance and using linear ramps only. The acceleration will be
calculated again with each sampling process based on the following formula :
where the value of the distance is gradually reduced based on the distance covered during the
synchronisation stage. No check is made on the ensuing acceleration value, and therefore servo
errors may arise if the acceleration exceeds the maximum value that can be withstood by the axis.
V maste
Synchronisatio
V slave
ctivation
t 0
t 1
Space
t
Once the synchronisation with the master has taken place, the slave will move according to this
formula:
Vslave = Vmaster * FollowRate
The feedrate (Vslave) determined in this manner is “theoretical”, since it is necessary to determine
whether this request is compatible with the dynamic characteristics of the axis (maximum feedrate
and maximum acceleration). The moment the feedrate of the master varies, the slave will follow
this variation based on its own acceleration value. If the feedrate requested of the slave exceeds its
maximum admissible feedrate, the system will reduce the feedrate requested accordingly. Hence,
the feedrate and acceleration values with which the slave has to be moved, Vslave i and Aslave i,
will be determined instant by instant. The position of the slave will therefore be calculated on the
basis of these values:
PosSlave
= PosSlave
tn+1
+ Vslave i + Aslave
tn
i
1-5610 Series CNC WinPLUS Library - User Manual (03)
Chapter 1
r
r
A
NC Related Functions
Mode 2
In this mode, the slave follows the position of the master proportionately to the value of the ratio (if
the ratio = 1 the slave reproduces exactly the movement of the master); synchronisation depends
on the dynamic characteristics of the slave axis and/or the Space parameter which defines the
synchronisation distance.
If the distance is 0, the slave will synchronise with the master based on its maximum acceleration
and using linear ramps only.
V
V maste
Synchronisation
Activation
t 0
t 1
V slave
t
If the distance is not 0, the slave axis will synchronise with the master axis based on an
acceleration calculated as a function of the synchronisation distance and using linear ramps only.
The acceleration value will be calculated again with each sampling step according to this formula
2
Aslave = ((Vmaster * FollowRate)
+ Vslave 2 ) / 2 * Space
where the value of the distance is gradually reduced based on the distance covered during the
synchronisation stage. No check is made on the ensuing acceleration value and therefore servo
error messages may be generated the moment the acceleration exceeds the maximum value that
the axis can withstand.
V maste
Synchronisation
ctivation
t 0
t 1
V slave
Space
t
10 Series CNC WinPLUS Library - User Manual (03)1-57
Chapter 1
r
A
r
NC Related Functions
Once the synchronisation with the master axis has occurred, the slave will move according to the
following formulas:
PosSlave = PosSlavet1 + (PosMaster – PosMaster
) * FollowRate
t1
Vslave = Vmaster * FollowRate
The position, PosSlave, and the feedrate, Vslave, determined in this manner should be rated as
“theoretical” values, since it is necessary to determine whether the values requested are
compatible with the dynamic characteristics of the axis (Maximum feedrate and maximum
acceleration). The moment the feedrate of the master varies, the slave will follow this variation
according to its own acceleration value. If the feedrate requested for the slave exceeds the
maximum value admissible for this axis, the system will reduce the feedrate accordingly. To this
end, the two values with which to move the slave, Vslave
and Aslave i will be calculated instant
i
by instant. The actual position of the slave axis will therefore be calculated on the basis of these
values:
PosSlave
= PosSlave
tn+1
+ Vslave i + Aslave
tn
i
The difference between the actual and the theoretical position of the axis is taken up by the slave
during its motion (even when the master has stopped moving) by moving, to the extent feasible, at
a rate higher than the theoretical Vslave.
Mode 3
In this mode, the slave follows the position and feedrate of the master proportionately to the value
of the ratio (if the ratio = 1, the slave reproduces exactly the movement of the master);
synchronisation depends on the dynamic characteristics of the slave.
V maste
ctivation =
Synchronisatio
t 0
V slave
Space recovered afte
synchronisation with
Master
Space lost during
acceleration stage
t
During the entire movement of the slave (i.e. both during and after the synchronisation stage), the
motion of the axis is according to the following formulas (always using linear ramps):
PosSlave = PosSlaveto + (PosMaster – PosMaster
) * FollowRate
t0
Vslave = Vmaster * FollowRate
The position (PosSlave) and the feedrate (Vslave) determined in this manner should be rated as
“theoretical” values, in that it is necessary to determine whether these requests are compatible with
the dynamic characteristics of the axis (max admissible feedrate and max admissible acceleration).
The moment the feedrate of the master varies, the slave follows the variation according to its own
1-5810 Series CNC WinPLUS Library - User Manual (03)
Chapter 1
NC Related Functions
acceleration value. If the feedrate requested of the slave is higher than its maximum admissible
feedrate, the system reduces the feedrate requested accordingly. To this end, the two values with
which the axis is to be moved (Vslave i and Aslave i) will be calculated instant by instant. The
actual position of the slave will therefore be calculated on the basis of these values:
PosSlave
= PosSlave
tn+1
+ Vslave i + Aslave
tn
i
The difference between the actual and the theoretical position of the axis is taken up by the slave
during its motion (even when the master has stopped moving) by moving, to the extent feasible, at
a rate higher than the theoretical Vslave.
Deactivating the Master/Slave Association
This instruction removes the master/slave association. This command can be accepted only if the
process is in Idle.
Parameters needed
FuncNum0
Definition/Variation of Following Ratio
This instruction defines/varies the parameter determining the master axis following ratio by the
slave(s) specified.
Parameters needed
FuncNum2
FollRateThis is the master following ratio specified for the slave(s). It must be viewed as a
multiplication factor for the feedrate of the master or the distance covered by it. If
the value of this ratio is 1.0, the motion of the master is reproduced exactly by the
slave; if the ratio is smaller than 1.0, it is reduced, if the ratio is greater than 1.0 it is
increased. This value can be preceded by a sign.
SlavNamThese are the names of the slaves (each of them denoted with a single ASCII
character). You can program up to 8 slaves.
This command can be entered either when a slave is already following the master (in this case, the
slave is released from the master and a new synchronisation stage gets underway based on the
new following parameter) or when a slave is not in the following stage (then the following value to
be adopted in the next movement is activated).
Activating the Following function
The following of the master by the slave is immediately activated. The following mode is defined by
means of the “mode” parameter contained in the master/slave association command.
10 Series CNC WinPLUS Library - User Manual (03)1-59
Chapter 1
NC Related Functions
Parameters needed
FuncNum3
SlavNamThese are the names of the slave axes (each of them denoted with a single ASCII
character). You can program up to 8 slaves.
This command can be entered at any time (provided that the master/slave association has already
been activated). The outcome of the command will tell whether the following command has been
entered correctly and the request has been received by the axis movement function; the actual
activation of the command must be monitored by the appropriate monitoring function.
Deactivating the following function
The following of the master by the slave is deactivated immediately. The release mode is defined
by means of the “mode” parameter defined in the master/slave association command.
Parameters needed
FuncNum4
SlavNamThese are the names of the slave axes (each of them denoted with a single ASCII
character). You can program up to 8 slaves.
The slave remains associated with the master, but does not follow it any more. Depending on the
“mode” parameter defined in the master/slave association command we will get:
0 The slave switches immediately from the current feedrate to nil feedrate.
others The slave comes to a halt according to its deceleration ramp.
The command can be entered at any time (provided that the master/slave association has already
been activated). The outcome of the command will tell whether the following deactivation command
has been entered correctly and the request has been received by the axis movement function; the
actual activation of the command will have to be monitored by means of the appropriate
monitoring function.
Monitoring the following function
The MD and MW variables now contain some data needed for monitoring the axis following status.
More precisely, the MD’s supply the discrepancy between the position of the slave and the position
followed by the master (which takes into account the following ratio); the MW’s define the status of
the slave.
1-6010 Series CNC WinPLUS Library - User Manual (03)
Chapter 1
NC Related Functions
Parameters needed
FuncNum5
MD_IndexMD to contain the error in the master following function by the slaves specified.
MW_IndexMW to contain the status of the slaves specified.
SlavNamThese are the names of the slave axes (each of them denoted with a single ASCII
character). It is possible to program up to 8 slaves.
The status of the slave axes is defined in a Word consisting of bits whose meanings are:
bit 0The slave in the master following stage; in this case the following bits are meaningful
and, if they are all 0, they indicated that the slave is stationary.
bit 1The slave is moving in synchronisation with the master phase.
bit 2The slave is moving in synchro with the master.
bit 3The slave is moving but is ending the master following stage.
The STAT_WRD output variable may assume the following values:
ValueMeaning
1Function not envisaged
2Slave number wrong
3Mode parameter wrong
4MD index wrong
5MW index wrong
OthersProcess errors
10 Series CNC WinPLUS Library - User Manual (03)1-61
Chapter 1
NC Related Functions
END OF CHAPTER
1-6210 Series CNC WinPLUS Library - User Manual (03)
Chapter 2
AXIS MOTION FUNCTIONS
The system function calls in this chapter communicate with the servo processor(s). The chapter
contains a set of basic function calls intended for use with all standard applications. Chapter 8
contains other (more specialized) axes related functions.
ENABLE SERVOLOOP OF AN AXIS OR ENABLE ITS D/A CONVERTER...............
DISABLE SERVOLOOP OF AN AXIS OR DISABLE ITS D/A CONVERTER.............
10 Series CNC WinPLUS Library - User Manual (04)2-1
Chapter 2
Axis Motion Functions
AX_ENAB: Enable servo loop of an axis or enable its D/A converter.
Type: No Wait
LD/FBD:
stat_wrd
ST :
stat_wrd := AX_ENAB(ax_id, res) ;
INPUT VARIABLES:axis identifier(int)
resource to be enabled(int)
OUTPUT VARIABLE:function status output word(int)
Description:
Type of resource can have 3 values:
0 = Axis with feedback but without output on D/A converter (not to be used for D.S.I.)
1 = Axis with feedback and output on D/A Converter
2 = D.S.I. driver movement enabled (driver ON + ENABLE).
For axis connected to drive OS3: transmits drive enable command (DRIVE ON).
3 = Axis with feedback and output on D\A converter maintaining the theoretical point
(work position) on the enabled command.
If the resource 0 (axis) is selected the axis position will be monitored and compared with the
commanded position only. There will be no output to the D/A converter. If the axis position exceeds
the tolerance of the stand-still following error, the control will go in an emergency state.
If resource 1 or 3 is selected, the axis will be in complete closed loop. Possible deviations from the
commanded position will be corrected by putting out an analog voltage to the axis drive.
If the resource 2 is selected, the functions becomes a WAIT.
Resource 3 can be used when the axis is disabled and enabled again with TCP active.
NOTE:
It is possible to configure a delay for reading the "broken wire" (AX_PUT1 parameter 1.5).
2-210 Series CNC WinPLUS Library - User Manual (04)
Axis Motion Functions
AX_DISA: Disable servo loop of an axis or disable its D/A converter.
Type: No Wait
LD/FBD:
stat_wrd
ST:
stat_wrd := AX_DISA(ax_id, res);
Type: No Wait
Chapter 2
INPUT VARIABLES:axis identifier(int)
type of resource to be disabled(int)
OUTPUT VARIABLE:function status output word(int)
Description:
Type of resource can have 3 values:
0 = Disable complete axis
1 = Disable D/A converter only (not to be used for D.S.I.)
2 = For D.S.I. axis: driver disabled (driver OFF + DISABLE). For axis connected to drive
OS3: transmits drive disable command (DRIVE OFF).
If 0 (axis) is selected as a resource, there will be no servo loop action at all. The axis position will
not be monitored, and there will be no output to the D/A converter.
If 1 (D/A converter) is selected, the position monitor of the servo loop will stay active and only the
output to the D/A converter will be disabled. The servo error will be checked against the active
error tolerance.
If the resource 2 is selected, the functions becomes a “WAIT”.
10 Series CNC WinPLUS Library - User Manual (04)2-3
otl_state = 3Positive and negative software overtravel limit switches not active
The ax_id parameter is a short variable which contains the physical axis identifier.
NOTE:
This system function call can only be used when the process is idle
2-410 Series CNC WinPLUS Library - User Manual (04)
Chapter 2
Axis Motion Functions
SETRIF: Set axis homed flag
Type: Wait
LD/FBD:
stat_wrd
ST:
stat_wrd := SETRIF(ax_id);
INPUT VARIABLE:physical axis identifier(int)
OUTPUT VARIABLE:function status output word(int)
Description:
This function can override the need to home an axis before you can execute automatic motion with
it. The axes indicated with the ax_id input variable will be treated as if it was homed normally.
See also:
RESRIF
10 Series CNC WinPLUS Library - User Manual (04)2-5
Chapter 2
Axis Motion Functions
RESRIF: Reset axis homed flag
Type: Wait
LD/FBD:
stat_wrd
ST:
stat_wrd := RESRIF(ax_id);
INPUT VARIABLE:physical axes identifier(int)
OUTPUT VARIABLE:function status output word(int)
Description:
This function forces an axes to be homed before you can execute automatic motion with it. The
axis indicated in the ax_id variable will be treated as if it was never homed before.
2-610 Series CNC WinPLUS Library - User Manual (04)
overtravel limit direction 1=positive, 0=negative(int)
state of the limit switch 0 = activated, 1 = free(int)
OUTPUT VARIABLE:function status output word(int)
Description:
Any coordinated axis can be equipped with two hardware overtravel limit switches to signal the end
of stroke conditions in both directions. When an axis hits the switch, you use this function to advise
the system of this error status. The system will execute following action:
• stop the interpolation of the all axes of the process (ramped stop)
• send a message "AXIS HW OVERTRAVEL LIMIT REACHED" to the screen
The process is now in stand-by an will only allow the axis on the overtravel limit switch to be
moved in manual mode and in the opposite direction (away from the overtravel limit switch).
To enable normal operation of the axis, you have to use the same function with a 1 state in the
parameter otl_state. From this moment, it will possible to execute motions again and in all
operating modes and in both directions.
Refer to Chapter 8 in the 10 Series CNC WinPLUS Application Manual.
10 Series CNC WinPLUS Library - User Manual (04)2-7
Chapter 2
Axis Motion Functions
SETTEST: Set axes to test mode
LD/FBD:
* ax_id può essere duplicato
ST:
stat_wrd := SETTEST(state, ax_id, …) ;
Type: Wait
stat_wrd
INPUT VARIABLES:Axis status (0-1)(int)
identifier of 1st axis(int)
....
identifier of the axes(int)
OUTPUT VARIABLE:status word(int)
Description:
When an axis is put in test mode, it will not physically move. The axis is kept in closed loop at the
position it was in when the test mode was activated. In the display, the axis positions are updated
as if the axis was moving. All CNC functionality can be applied to an axis in test mode. After return
from test mode, all registers and flags concerning that axes are restored to the state they were in
before the axis was put into test mode.
State = 1active
State = 0non-active
This function can only be activated/de-activated when the process is IDLE (S 20_00).
2-810 Series CNC WinPLUS Library - User Manual (04)
INPUT VARIABLES:identifier of axis to be driven by HPG(int)
identifier of transducer channel used by HPG (int)
scale factor expressed as mm or inches/revolution(lreal)
pitch = number of pulses for 1 HPG revolution(lreal)
OUTPUT VARIABLE:function status output word(int)
Description:
With this function the hand pulse generator is activated and you can select the axis associated with
it. The parameter axis_id must contain the physical axis identifier of the axis to be driven. The
parameter transducer is the physical identifier of the encoder input used by the hand pulse
generator. It is a number in the range as shown in the table below.
This function can only be called when the process is IDLE (S 20_00).
If an axis has been homed previous to its assignment to the hand pulse generator, the software
overtravel limits of that axis will also be valid when moving it with a hand pulse generator.
The STAT_WRD variable can have the following values:
ValueMeaning
0OK
-1wrong or not configured ax_id
1the handwheel's transducer and the associated axis are not on the
same board
2virtual axis or the handwheel is already active on an axis different from
the input one (axis_id)
3the handwheel transducer is already engaged by another axis
4Out of range software overtravel limits
5Maximum number of transducers
6Invalid id of OSWire transducer
7OSWire transducers exhausted (max. number exceeded)
8OSWire transducer resource could not be allocated for timeout.
10 Series CNC WinPLUS Library - User Manual (04)2-9
Chapter 2
Axis Motion Functions
NOTE FOR NON OSWIRE SYSTEMS:
The axis' converter and transducer and the hand pulse generator's transducer must all reside on
the same axes board.
The transducers' identifiers are as follows:
1° boardfrom 0x100 to 0x105
2° boardfrom 0x106 to 0x10B
3° boardfrom 0x10C to 0x111
4° boardfrom 0x112 to 0x117
If the board is not a 6-axis or various different boards are present (i.e. 5.3 and 6 axes), the above
table is valid only for present transducers.
NOTE FOR NON OSWIRE SYSTEMS:
Version 10/510 systems when integrated with OS 8510/3 board only have available transducers
0x104 and 0x105.
Example:
3 boards of 5.3 and 6 axis with 5.3 and 6 linked transducers respectively, are present.
The identifiers are as follows:
Transd.1Transd.2Trasnd.3Transd.4Transd.5Transd.6
1° Board
2° Board
3° Board
0x1000x1010x1020x1030x104
0x1060x1070x108
0x10C0x10D0x10E0x10F0x1100x111
NOTE FOR OSWIRE SYSTEMS:
For OSWire systems transducer identifiers are coded as 1nntHex, where ‘nn’ is the address (from
0 to 3Dhex) of the device and ‘t’ is the transducer number, from 1 to 3. On drive OS3 we may have
(as an option) a single incremental transducer, and on the Bridge up to 3 transducers.
Example:
To identify the second transducer of a Bridge device with 1b (hexadecimal) address, write 11b2
(hexadecimal).
To identify the only external transducer of a drive OS3 address 2 (hexadecimal), write 1021
(hexadecimal).
2-1010 Series CNC WinPLUS Library - User Manual (04)
HPG_OFF: Disables hand pulse generator (HPG)
LD/FBD:
stat_wrd
ST:
stat_wrd := HPG_OFF(ax_id, transducer);
Chapter 2
Axis Motion Functions
Type: Wait
INPUT VARIABLES:identifier of axis to be driven by HPG(int)
identifier of transducer channel used by HPG(int)
OUTPUT VARIABLE:function status output word(int)
Description:
With this system function call you can de-activate the hand pulse generator.
The parameter axis_id is the physical axis identifier of the axis currently driven by the hand pulse
generator HPG. The parameter transducer is the physical identifier of the encoder input used by
the Hand Pulse Generator (see HPG_ON function).
The STAT_WRD variable can have the following values:
ValueMeaning
0OK
-1wrong or not configured ax_id
1the handwheel's transducer and the associated axis are not on the
same board
2virtual axis or the handwheel is already active on an axis different from
the input one (ax_id)
6Invalid id of OSWire transducer
8OSWire transducer resource could not be allocated for timeout.
10 Series CNC WinPLUS Library - User Manual (04)2-11
process axes number(int)
logic id abscissa axis(int)
logic id ordinate axis(int)
logic id rollover tangent axis(int)
offset with respect to trigonometric zero(lreal)
trigonometric sign convention(lreal)
OUTPUT VARIABLE:status word(int)
Description:
The AXTAN_E parameter allows to keep the axis (rollover tangent axis configured as a rotary
rollover) tangent to the profile being machined. It can be enabled on one process at a time.
If you request from Part Program the movement of the tangent axis while virtualization in process,
the command is ignored (from part program).
2-1210 Series CNC WinPLUS Library - User Manual (04)
Chapter 2
Axis Motion Functions
To move the axis from Part Program it is necessary to deactivate virtualization (AXTAN_D).
The conditions necessary for activations are the following:
• the system must be in IDLE status
• the axes involved must be enabled
The "ax_num" parameter shows the number of axes present in the process specified in the
"proc_num" parameter.
The "sign" parameter is the trigonometric sign convention: values allowed are 1 (positive sign:
value included between 0° and 360° ) and -1 (negative sign: values included between 360° and 0°).
NOTE:
The same feature is available from Part Program by programming the block (TCP,4).
See also:
AXTAN_D
10 Series CNC WinPLUS Library - User Manual (04)2-13
Chapter 2
Axis Motion Functions
AXTAN_D: Disables tangent axis algorithm
Type: Wait
LD/FBD:
stat_wrd
ST:
stat_wrd := AXTAN_D(proc_num);
INPUT VARIABLE:process number (1...20)(int)
OUTPUT VARIABLE:status word(int)
Description:
The AXTAN_D function disables the algorithm for the tangent axis management enabled through
the AXTAN_E function.
See also:
AXTAN_E
2-1410 Series CNC WinPLUS Library - User Manual (04)
Chapter 2
Axis Motion Functions
TCPACT: Enable/disable the Tool Center Point feature
Type: Wait
LD/FBD:
stat_wrd
ST:
stat_wrd := TCPACT(proc_num, atype) ;
INPUT VARIABLES:process number(int)
type of Tool Center Point function(int)
OUTPUT VARIABLE:status word(int)
Description:
TCPACT permits to enable/disable the Tool Center Point function. The meaning of the "type"
parameter may be as follows:
typemeaning
0disables TCP
1enables TCP in mode 1
2enables TCP in mode 2
3enables TCP in mode 3
4enables TCP in mode 4
5enables TCP in mode 5
The "proc_num" parameter must be 1. If it has any other value the status word will be 404 (illegal
process number).
If the function is performed correctly, the "stat_wrd" variable returns to 0. If not, it will have a value
other than 0 (refer to appendix B).
10 Series CNC WinPLUS Library - User Manual (04)2-15
Chapter 2
Axis Motion Functions
TCPWRT: Write associated variables to Tool Center Point
mask (int)
(reserved) (lreal)
tool length variation (lreal)
horizontal rotary axis position (lreal)
vertical rotary axis position (lreal)
tool radius variation (lreal)
part contact point angle variation (lreal)
edge radius (lreal)
edge angle variation (lreal)
OUTPUT VARIABLE:status word (int)
Description:
The TCPWRT function puts the interpolator into communication with WinPLUS: this allows to alter
in real time some of the Tool Center Point variables.
This FB permits to alter the tool length, the tool radius and the angle, which are available on
records 386, 399 and 400 of the User Table (refer to the Programming Manual). If the TCP mode is
active, the system will automatically assume as new tool length, tool radius and angle the values
read from the User Table plus the specified alteration. If the TCP mode is not active yet, the
system will assume the new values once TCP is enabled.
In addition, TCPWRT permits to alter the rotary axes positions used for identifying the tool direction
when TCP is enabled in mode 5 (refer to the Programming Manual. These positions will be taken
into consideration by the system when (TCP,5) is enabled but only if the rotary axes are not
homed. You must make sure that no alterations are accepted if they are given when TCP is active
or the rotary axes are still homed.
2-1610 Series CNC WinPLUS Library - User Manual (04)
Chapter 2
Axis Motion Functions
The "proc_num" parameter must be 1: If you accept other values the function will not be executed
are will return the 402 value in the "stat_wrd" output variable. If the relevant bit from the "mask"
parameter is to 1, the TCPWRT writes the value associated to the input parameter. The
bit/parameter relationship is shown in the table below:
bitassociated variable
0reserved
1length - tool length variation
2hor_pos - horizontal rotary axis position
3ver_ pos - vertical rotary axis position
4radius - tool radius variation
5angle - part contact point angle variation
6edge radius
7
edge angle variation (α)
See also:
TCPACT
TCPREAD
10 Series CNC WinPLUS Library - User Manual (04)2-17
Chapter 2
Axis Motion Functions
TCPREAD: Read associated variables to Tool Center Point