osai 10 CNC User Manual

10 Series CNC
WinPLUS LIBRARY
User Manual
Code: 45006867F Rev. 04
PUBLICATION ISSUED BY:
OSAI S.p.A. Via Torino, 14 - 10010 Barone Canavese (TO) – Italy
Phone: +39-0119899711
Web: www.osai.it
e-mail: sales@osai.it
service@osai.it
Copyright 2001-2005 by OSAI All rights reserved
Edition: October 2005
IMPORTANT USER INFORMATION
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

UPDATES TO THE PRESENT EDITION

General
This issue completely replaces the previous ones.
PAGES UPDATES
Update
10 Series CNC WINPLUS Library- User Manual
Preface
Page 2
INDEX
CHAP. 2
Page 20 Page 21 Page 22
CHAP. 3
Page 15 Page 47
CHAP. 4
Page 30 Page 31
CHAP. 6
Page 15 Page 16 Page 17 Page 18
CHAP. 8
Page 14 Page 39 Page 45 Page 46 Page 60 Page 62 Page 63 Page 76 Page 88 Page 90 Page 91 Page 92
Updated Changed description
Updated
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 MANUAL Code 45006926D
10 Series CNC WinPLUS development tool Code 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.
tc_id input (transducer/converter physical identifier)
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.
2 10 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
ACK_STRB: Send acknowlegde signal............................................................................ 3-37
ACLOSE: Close channel for point-to-point-interpolator ............................................... 4-6
ACTOFFS: Request activation of a tool offset................................................................ 5-5
ACTRES: Active reset request ..................................................................................... 9-2
ANAIN: Read analog input........................................................................................ 3-15
AOPEN: Open channel for point-to-point-interpolator................................................ 4-7
ARESET: Request to reset a point-to-point-interpolator.............................................. 4-8
AUX_STAT: Read point-to-point axis or spindle status ...................................................4-20
AX_CHAS: Change the servo mode of an axis.............................................................. 8-4
AX_DISA: Disable servo loop of an axis or disable its D/A converter. ......................... 2-3
AX_ENAB: Enable servo loop of an axis or enable its D/A converter............................ 2-2
AX_FWR: Read OS3 axes drive parameter ……………………………………………….8-86 AX_FWW: Write OS3 axes drive parameter………………………………………………..8_85
AX_GET1: Get axis (spindle) servo parameters............................................................ 8-15
AX_GET2: Get axis (spindle) servo parameters............................................................ 8-17
AX_GET2B: Get axis (spindle) servo parameters……………………………………………8-20
AX_GET3: Get axis (spindle) servo parameters............................................................ 8-23
AX_GET4: Get axis (spindle) servo parameters............................................................ 8-25
AX_GET5: Get axis (spindle) servo parameters............................................................ 8-27
AX_GET6: Get axis (spindle) servo parameters............................................................ 8-29
AX_GET7: Get axis (spindle) servo parameters............................................................ 8-34
AX_GET8: Get axis (spindle) servo parameters............................................................ 8-39
AX_GETS: Get axis status ............................................................................................. 8-58
AX_MECR: Read the parameters of a Mechatrolink drive ............................................. 8-90
AX_MECS: Read the status of a Mechatrolink drive ...................................................... 8-88
AX_MECW: Write the parameters of a Mechatrolink drive.............................................. 8-91
AX_PROB: Enable probing signal for one or more axis................................................. 8-5
AX_PUT1: Set axis servo parameter............................................................................. 8-41
AX_PUT2: Set axis servo parameter............................................................................. 8-48
AX_PUT2B: Set axis servo parameter………………………………………………………..8-50
AX_PUT3: Set axis servo parameter............................................................................. 8-52
AX_PUT4: Set axis servo parameter............................................................................. 8-54
AX_RESE: Abort the actual operation of the addressed axis ........................................8-8
AX_RPAR: Read AMP parameter from axis…………………………………………………8-84
AX_RTFBCK: Read OS-WIRE variables in real time .........................................................8-92
AX_RPOS: Resets the axis' position .............................................................................. 8-13
AX_SELE: Activate axis monitor functions / gear range................................................ 8-11
AX_SETZ: Allows the activation of different functions for the specified axis................. 8-14
AX_ZSH1: Write zero shift offset #1 .............................................................................. 8-9
AX_ZSH2: Write zero shift offset #2 .............................................................................. 8-10
AXD_CMD: Send a command to a digital drive .............................................................. 8-76
AX_WPAR: Write AMP axis parameter ……………………………………………………. 8-78
AXD_PUT: Set the enable/disable bits for a digital drive ............................................... 8-75
AXD_RDD: Read a numerical parameter from a digital drive ........................................ 8-70
AXD_RDS: Read a string parameter from a digital drive ............................................... 8-73
AXD_WRD: Write a numerical parameter to a digital drive ............................................. 8-72
AXD_WRS: Write a string parameter to a digital drive.................................................... 8-74
AXMANFED: Set feedrate override of axes in manual movement.................................... 1-44
AXSELEC: Select one or more axes for manual movement.......................................... 1-18
AXSELFED: Selects axes allowing to change feedrate override..................................... 1-42
AXTAN_D: Disables tangent axis algorithm................................................................... 2-14
AXTAN_E: Enable tangent axis algorithm .....................................................................2-12
4 10 Series CNC WinPLUS Library - User Manual (04)
Preface
10 Series CNCWinPLUS Library - User Manual
CAN_BOARD_CMD: Send commands to Hilscher master board ................................................. 10-15
CAN_INIT: CANopen parameters initialisation.............................................................. 10-2
COMPOFF: Compute new axes offset............................................................................ 5-7
CON_LED: Manage leds on the OPLink operator panel ............................................... 7-10
CONN_AX: Connect an axis to the interpolator of the logic........................................... 4-26
CONN_SP: Connect a spindle to an interpolator ........................................................... 4-32
CYCLE: Request cycle for a selected process ......................................................... 1-4
CYSTART: Request cycle start for a selected process ................................................. 1-3
CYSTOP: Request cycle stop for the selected process .............................................. 1-5
DE_ETH: Enable/disable communication via Ethernet ............................................... 9-10
DECODE: Decodify a word with some data ................................................................. 3-46
DELAY: Delay function.............................................................................................. 3-39
ENCODER: Decodify a bit on a word.............................................................................. 3-47
ENDRESE: Notify end of reset from WinPLUS .............................................................. 1-21
FAST_RD: Fast data reading from DP .......................................................................... 9-8
FAST_WR: Fast data writing on DP ............................................................................... 9-6
FAX_GET: Read in real time a number of axis parameters .......................................... 8-68
FAX_PUT: Real time updating of an axis' zero shift value............................................ 8-67
FAX_RCON: Configures the driver for real time data communication ............................. 8-66
FAX_WCON: Configures driver for real time data communication ................................... 8-65
FEED_GO: Request the interpolator to exit the feedhold status.................................... 1-7
FEEDBYOF: Restore programmed feedrate after feedrate bypass ................................. 1-35
FEEDBYON: Activate feedrate bypass ............................................................................. 1-33
FEEDHLD: Request the interpolator to enter the feedhold status ................................. 1-6
FEEDHEM: Tells the interpolator to change to feedhold mode at end of movement……1-8
FOUT: Force a fast output ...................................................................................... 3-17
FRORIDE: Set feedrate override................................................................................... 1-13
GBPROVAR: Get Boolean process variable ..................................................................... 6-3
GET_AX: Plus gets a parked axis ............................................................................... 4-24
GET_EMCY_INFORead node information and diagnostic data ............................................... 10-8
GET_INTP: Reads in real time a number of interpolator data........................................ 1-38
GET_POSD: Read position and feed rate of an axis controlled via serial line RS-232.... 4-23
GET_SP: Process gets a spindle already parked ....................................................... 4-31
GETAXINT: Get real axis position................................................................................... 8-3
GETEPAR: Get part program E-parameter .................................................................... 6-5
GETHFL: Get part program H parameter flag (HF) ..................................................... 6-9
GETHPAR: Get part program H-parameter.................................................................... 6-7
GETPNTR: Request information about part program execution.................................... 1-24
GETPPNAM: Get information from selected part program ............................................... 1-22
GETSC: Get ASCII global part program variable ...................................................... 6-11
GETSN: Get lreal global part program variable......................................................... 6-13
GETDATE: Read system data…………………………………………………………………3-65 GETTIME: Read system time…………………………………………………………………3-67
GETUSEC: Read the user variables of a char type process.......................................... 6-17
GETUSED: Read the user variables of a double type process ...................................... 6-15
GJOG: Get Jog increment.............................................................................................. 1-16
HISPROC: Select a process to control.......................................................................... 7-2
HOLDOFF: Exit from hold............................................................................................... 1-10
HOLDON: Enter in hold ................................................................................................ 1-9
HPG_OFF: Disables hand pulse generator (HPG) ........................................................ 2-11
HPG_ON: Enable hand pulse generator (HPG)........................................................... 2-9
HUM_ABI: Enable specified softkeys............................................................................ 7-11
HUM_DIS: It disables specified softkeys....................................................................... 7-13
IBS_INP: Transfer of INTERBUS inputs to the MW variables.................................... 3-35
IBS_OUT: Transfer MW variables to INTERBUS outputs ............................................ 3-36
10 Series CNC WinPLUS Library - User Manual (04) 5
Preface
10 Series CNC WinPLUS Library - User Manual
ID_TO_A: Request for conversion from axis identifier into axis name (ASCII) ............ 2-22
IFWAIT: Semaphore status........................................................................................ 3-40
INDEX: Copy a range of M variables........................................................................6-19
INDEXA: Copy a range of ASCII variabiles................................................................. 6-20
INTP_ABI: Enable driver for real time reading of interpolator parameters.................... 1-36
INTP_CMD: Send a command to the interpolator ........................................................... 1-46
INTP_DIS: Disable driver for real time reading of the interp. parameters. .................... 1-37
INWORD: Read input word........................................................................................... 3-18
IO_FILE: Read/write formatted file…………………………………………………………3-69 XDA-COMD: Master/slave axis management…………………………………………………1-53
LIMITSW: Manage hardware overtravel limits.............................................................. 2-20
LOCKTAB: Set table interlock status.............................................................................. 9-3
MANFEED: Set manual feedrate override ......................................................................1-11
MDI_CMD: Execute a block in MDI ................................................................................ 1-27
MESSROT: Display rotating messages...........................................................................3-48
MTB_OFF: Disconnect a Pilot panel from a process ..................................................... 7-9
MTB_ON: Assign a Pilot panel to a process ................................................................ 7-7
NAXOFF: Activate new axes offset .............................................................................. 5-8
NMT_CMD: Send CANopen network or remote node management commands............. 10-5
OUTWORD: Write output word......................................................................................... 3-19
PALMOVE: Move a point-to-point-axis ........................................................................... 4-9
PARK_AX: Park an axis belonging to the logic .............................................................. 4-29
PARK_SP: Park a spindle .............................................................................................. 4-30
PP_BSRC: Position the active Part Program on the selected block .............................. 1-40
PP_EXEC: Select a block from part program for execution........................................... 1-26
PP_SELE: Select a part program for execution ............................................................1-25
PP_TSRC: Finds a string inside the active part program............................................... 1-39
PPRESUME: Resume part program execution after M06 ................................................. 1-30
PPRUNINFO: Part Program execution monitoring management…………………………….1-47
PREC_OFF: Disable part program block precalculation ..................................................1-31
PREC_ON: Enable part program block precalculation ...................................................1-32
PUTUSEC: Write the user variables of a type char process ..........................................6-18
PUTUSED: Write the user variables of a double type process ......................................6-16
R232_INI: Set termination character for the serial line ................................................. 3-4
R232_RES: Reset RS 232 interface................................................................................ 3-12
R232_RXD: Receive lreal data buffer via the RS-232 interface...................................... 3-9
R232_RXS: Receive an ASCII string via the RS 232 interface....................................... 3-11
R232_RXW: Receive int data buffer via the RS 232 interface .........................................3-10
R232_STS: Read RS-232 status .................................................................................... 3-13
R232_TRM: Set termination characters used in message handling................................ 3-5
R232_TXD: Transmit lreal data buffer via the RS 232 interface .....................................3-6
R232_TXS: Transmit an ASCII string via the RS 232 interface...................................... 3-8
R232_TXW: Trasmit int data buffer via RS 232 interface ................................................ 3-7
RCM_MOD: Define the mode for the search in memory. ................................................1-41
RD_ADA: Read an ADARING device A/D channel...................................................... 3-24
READ_SDO_CMD Send read objects through SDO commands............................................... 10-11
RESRIF: Reset axis homed flag .................................................................................2-6
RIO_INP: Read remote I/O inputs................................................................................ 3-33
RIO_OUT: Write the remote I/O outputs........................................................................3-34
RQESTOP: Request process E-STOP ...........................................................................3-20
RQRESET: Request reset of NC ....................................................................................1-19
RTIRES: Read RTI axes monitor table ....................................................................... 4-19
SBPROVAR: Set Boolean process variable ...................................................................... 6-4
SCLOSE: Close RTI channel for spindle ..................................................................... 4-11
SCONN_AX: Disconnect an axis from the interpolator of the logic................................... 4-28
6 10 Series CNC WinPLUS Library - User Manual (04)
Preface
10 Series CNCWinPLUS Library - User Manual
SCONN_SP: Disconnect a spindle from the associated interpolator ............................... 4-33
SEL_SCR: Display a screen.......................................................................................... 3-27
SEND: Send to semaphore ..................................................................................... 3-43
SEND_MSG: Trasmit message to a queue....................................................................... 3-44
SETCUSK: Set OEM softkey status; ON/OFF type ....................................................... 7-3
SETCUSL: Set OEM softkey status; Maintained, Data Entry and Normal .................... 7-4
SETDATE: Set system data……………………………………………………………………3-66
SETEPAR: Set part program E parameter..................................................................... 6-6
SETHFL: Set part program H parameter flag ............................................................. 6-10
SETHINT: Set human interface protection bits............................................................. 7-5
SETHPAR: Set part program H-parameter .................................................................... 6-8
SETMODE: Request mode of operation for a selected process .................................... 1-15
SETRANG: Select spindle gear range............................................................................ 4-12
SETRIF: Set axis homed flag..................................................................................... 2-5
SETSC: Set ASCII global part program variable....................................................... 6-12
SETSN: Set lreal global part program parameter ..................................................... 6-14
SETTEST: Set axes to test mode.................................................................................. 2-8
SETTIME: Write system time…………………………………………………………………3-68
SG96RPM: Request G96 constant surface speed spindle control ................................ 4-13
SG97RPM: Set spindle speed in RPM ........................................................................... 4-15
SJOG: Set jog incremen ......................................................................................... 1-17
SL_CLOSE: Release posses of the serial line COM1 or COM2 ..................................... 3-52
SL_OPEN: Obtain exclusive possession of serial line COM1 or COM2 ....................... 3-51
SL_RESET: Reset the transmission status on COM1 or COM2..................................... 3-54
SL_RXD: Receive lreal buffer data from COM1 or COM2.......................................... 3-61
SL_RXS: Receive string buffer data from COM1 or COM2 ........................................ 3-62
SL_RXW: Receive short data buffer from COM1 or COM2......................................... 3-59
SL_SETUP: Set parameters for serial lines COM1 or COM2 ......................................... 3-49
SL_STAT: Status of the serial line COM1 or COM2..................................................... 3-53
SL_TXD: Transmit lreal data buffer on COM1 or COM2 ............................................ 3-57
SL_TXS: Transmit string data buffer on COM1 or COM2 .......................................... 3-58
SL_TXW: Transmit short data buffer on COM1 or COM2........................................... 3-56
SOFTOTL: Enable /disable software overtravel limits ................................................... 2-4
SOPEN: Open a channel for spindle management ................................................... 4-16
SORIENT: Request spindle orientation......................................................................... 4-17
SPEPN: Request to energize the E-STOP relay(s)................................................... 3-21
SPORIDE: Set speed override ...................................................................................... 1-14
SRESET: Request to reset a spindle........................................................................... 4-18
STTRAVEL: Set H/W overtravel status............................................................................ 2-7
SYNC_CMD: Send SYNC command to all the nodes....................................................... 10-7
TBLGETD: Read lreal value from a table ...................................................................... 5-10
TBLGETW: Read int value from a table ......................................................................... 5-9
TBLPUTD: Write lreal value to a table.......................................................................... 5-12
TBLPUTW: Write int value to a table.............................................................................. 5-11
TBLSRCD: Table lreal search........................................................................................ 5-13
TBLSRCW: Table int search ........................................................................................... 5-15
TC_CONF: Set the transducer ERDC ............................................................................ 8-60
TC_READ1: Read the physical position of the transducer.............................................. 8-62
TC_WRIT: Set D/A Converter output ............................................................................ 8-63
TCPACT: Enable/disable the Tool Center Point feature ............................................. 2-15
TCPREAD: Read associated variables to Tool Center Point......................................... 2-18
TCPWRT: Write associated variables to Tool Center Point ......................................... 2-16
TOOL_RD: Get tool slave identifier ................................................................................ 5-17
TOOLACT: Update axis table with new tool offset ......................................................... 5-2
UNLKTAB: Cancel table interlock status ....................................................................... 9-5
10 Series CNC WinPLUS Library - User Manual (04) 7
Preface
10 Series CNC WinPLUS Library - User Manual
URLFEED: Set rapid feedrate override .......................................................................... 1-12
WAIT: Wait on semaphore...................................................................................... 3-41
WAIT_MSG: Wait a message in a queue ......................................................................... 3-42
WARN_HIS: Display a message and store it in system history. ......................................3-26
WARNING: Display error message ................................................................................. 3-3
WR_ADA: Write an ADARING device D/A channel...................................................... 3-22
WRI_SCR: Display a user message .............................................................................. 3-30
WRITE_SDO_CMD: Scrive parametri tramite SDO...................................................................... 10-13
END OF PREFACE
8 10 Series CNC WinPLUS Library - User Manual (04)

INDEX

NC RELATED FUNCTIONS
CYSTART: Request cycle start for a selected process......................................... 1-3
CYCLE: Request cycle for a selected process...................................................... 1-4
CYSTOP: Request cycle stop for the selected process........................................ 1-5
FEEDHLD: Request the interpolator to enter the feedhold status ........................ 1-6
FEED_GO: Request the interpolator to exit the feedhold status........................... 1-7
FEEDHEM: request to interpolator to enter in feedhold at end of movement....... 1-8
HOLDON: Enter in hold ......................................................................................... 1-9
HOLDOFF: Exit from hold ..................................................................................... 1-10
MANFEED: Set manual feedrate override ............................................................ 1-11
URLFEED: Set rapid feedrate override ................................................................. 1-12
FRORIDE: Set feedrate override........................................................................... 1-13
SPORIDE: Set speed override .............................................................................. 1-14
SETMODE: Request mode of operation for a selected process........................... 1-15
GJOG: Get jog increment ...................................................................................... 1-16
SJOG: Set jog incremen........................................................................................ 1-17
AXSELEC: Select one or more axes for manual movement................................. 1-18
RQRESET: Request reset of NC........................................................................... 1-19
ENDRESE: Notify end of reset from WinPLUS ..................................................... 1-21
GETPPNAM: Get information from selected part program ................................... 1-22
GETPNTR: Request information about part program execution........................... 1-24
PP_SELE: Select a part program for execution .................................................... 1-25
PP_EXEC: Select a block from part program for execution.................................. 1-26
MDI_CMD: Execute a block in MDI ....................................................................... 1-27
MDI_EXEC: Executes program blocks from WinPLUS in MDI mode ................... 1-29
PPRESUME: Resume part program execution after M06 .................................... 1-30
PREC_OFF: Disable part program block precalculation....................................... 1-31
PREC_ON: Enable part program block precalculation ......................................... 1-32
FEEDBYON: Activate feedrate bypass ................................................................. 1-33
FEEDBYOF: Restore programmed feedrate after feedrate bypass...................... 1-35
INTP_ABI: Enable driver for real time reading of interpolator parameters............ 1-36
INTP_DIS: Disable driver for real time reading of the interpolator
parameters............................................................................................................. 1-37
GET_INTP: Reads in real time a number of interpolator data .............................. 1-38
PP_TSRC: Finds a string inside the active part program...................................... 1-39
PP_BSRC: Position the active Part Program on the selected block ..................... 1-40
RCM_MOD: Define the mode for the search in memory. ..................................... 1-41
AXSELFED: Selects axes allowing to change feedrate override .......................... 1-42
AXMANFED: Set feedrate override of axes in manual movement........................ 1-44
Index
10 Series CNC WinPLUS Library - User Manual
10 Series CNC WinPLUS Library - User Manual (04) i
Index
10 Series CNC WinPLUS Library - User Manual
INTP_CMD: Send a command to the interpolator ................................................. 1-46
PPRUNINFO: Part Program execution monitoring management.......................... 1-47
XDA_COMD: Master/Slave axes management..................................................... 1-53
Master/Slave association ....................................................................................... 1-54
Mode 0 ...................................................................................................................1-55
Mode 1 ...................................................................................................................1-55
Mode 2 ...................................................................................................................1-57
Mode 3 ...................................................................................................................1-58
Deactivating the Master/Slave Association............................................................ 1-59
Definition/Variation of Following Ratio ................................................................... 1-59
Activating the Following function............................................................................ 1-59
Deactivating the following function......................................................................... 1-60
Monitoring the following function............................................................................ 1-60
AXIS MOTION FUNCTIONS
AX_ENAB: Enable servo loop of an axis or enable its D/A converter. .................. 2-2
AX_DISA: Disable servo loop of an axis or disable its D/A converter. .................. 2-3
SOFTOTL: Enable /disable software overtravel limits ........................................... 2-4
SETRIF: Set axis homed flag................................................................................. 2-5
RESRIF: Reset axis homed flag ............................................................................2-6
STTRAVEL: Set H/W overtravel status.................................................................. 2-7
SETTEST: Set axes to test mode .......................................................................... 2-8
HPG_ON: Enable hand pulse generator (HPG) .................................................... 2-9
HPG_OFF: Disables hand pulse generator (HPG)................................................ 2-11
AXTAN_E: Enable tangent axis algorithm ............................................................. 2-12
AXTAN_D: Disables tangent axis algorithm .......................................................... 2-14
TCPACT: Enable/disable the Tool Center Point feature ....................................... 2-15
TCPWRT: Write associated variables to Tool Center Point ..................................2-16
TCPREAD: Read associated variables to Tool Center Point ................................ 2-18
LIMITSW: Manage hardware overtravel limits....................................................... 2-20
A_TO_ID: Request for conversion from axis name into axis identifier .................. 2-21
ID_TO_A: Request for conversion from axis identifier into axis name (ASCII) ..... 2-22
GENERAL PURPOSE FUNCTIONS
WARNING: Display error message ....................................................................... 3-3
R232_INI: Set termination character for the serial line.......................................... 3-4
R232_TRM: Set termination characters used in message handling .....................3-5
R232_TXD: Transmit lreal data buffer via the RS 232 interface ...........................3-6
R232_TXW: Trasmit int data buffer via RS 232 interface...................................... 3-7
R232_TXS: Transmit an ASCII string via the RS 232 interface ............................3-8
R232_RXD: Receive lreal data buffer via the RS-232 interface............................ 3-9
R232_RXW: Receive int data buffer via the RS 232 interface .............................. 3-10
R232_RXS: Receive an ASCII string via the RS 232 interface ............................. 3-11
R232_RES: Reset RS 232 interface......................................................................3-12
R232_STS: Read RS-232 status ........................................................................... 3-13
ANAIN: Read analog input..................................................................................... 3-15
FOUT: Force a fast output .....................................................................................3-17
INWORD: Read input word.................................................................................... 3-18
OUTWORD: Write output word..............................................................................3-19
RQESTOP: Request process E-STOP.................................................................. 3-20
SPEPN: Request to energize the E-STOP relay(s) ............................................... 3-21
WR_ADA: Write an ADARING device D/A channel............................................... 3-22
ii 10 Series CNC WinPLUS Library - User Manual (04)
Index
10 Series CNC WinPLUS Library - User Manual
RD_ADA: Read an ADARING device A/D channel............................................... 3-24
WARN_HIS: Display a message and store it in system history. ........................... 3-26
SEL_SCR: Display a screen.................................................................................. 3-27
WRI_SCR: Display a user message ..................................................................... 3-30
RIO_INP: Read remote I/O inputs ......................................................................... 3-33
RIO_OUT: Write the remote I/O outputs ............................................................... 3-34
$IBS_INP: Transfer of physical inputs from the INTERBUS or
CANOPEN, OSWIRE, PROFIBUS modules to the MW variables ........................ 3-35
$IBS_OUT: Transfer of the MW variables to the physical outputs of
the INTERBUS, CANOPEN, OSWIRE or PROFIBUS modules ........................... 3-36
ACK_STRB: Send acknowlegde signal................................................................. 3-37
DELAY: Delay function .......................................................................................... 3-39
IFWAIT: Semaphore status ................................................................................... 3-40
WAIT: Wait on semaphore .................................................................................... 3-41
WAIT_MSG: Wait a message in a queue.............................................................. 3-42
SEND: Send to semaphore ................................................................................... 3-43
SEND_MSG: Trasmit message to a queue........................................................... 3-44
DECODE: Decodify a word with some data .......................................................... 3-46
ENCODER: Decodify a bit on a word.................................................................... 3-47
MESSROT: Display rotating messages ................................................................ 3-48
SL_SETUP: Set parameters for serial lines COM1 or COM2 ............................... 3-49
SL_OPEN: Obtain exclusive possession of serial line COM1 or COM2............... 3-51
SL_CLOSE: Release posses of the serial line COM1 or COM2........................... 3-52
SL_STAT: Status of the serial line COM1 or COM2 ............................................. 3-53
SL_RESET: Reset the transmission status on COM1 or COM2........................... 3-54
SL_TXB: Transmits byte data buffer on COM1 or COM2 ..................................... 3-55
SL_TXW: Transmit short data buffer on COM1 or COM2..................................... 3-56
SL_TXD: Transmit lreal data buffer on COM1 or COM2....................................... 3-57
SL_TXS: Transmit string data buffer on COM1 or COM2..................................... 3-58
SL_RXW: Receive short data buffer from COM1 or COM2 .................................. 3-59
SL_RXB: Receives byte data buffer from COM1 or COM2 .................................. 3-60
SL_RXD: Receive lreal buffer data from COM1 or COM2 .................................... 3-61
SL_RXS: Receive string buffer data from COM1 or COM2 .................................. 3-62
MOVEDATA: Copies/transfers variables in indexed mode ................................... 3-63
TCPSYS_I: Enables Teach Pendant on serial line (CPU board) .......................... 3-64
GETDATE: read system date ................................................................................ 3-65
SETDATE: Write system date ............................................................................... 3-66
GETTIME: Read system time................................................................................ 3-67
SETTIME: writes system time ............................................................................... 3-68
IO_FILE : Reading / writing formatted files............................................................ 3-69
POINT-TO-POINT-AXES / SPINDLE LIBRARY
AX_SHARE: Shares/releases axes between a process and the logic.................. 4-3
AABORT: Abort a point-to-point-interpolator......................................................... 4-5
ACLOSE: Close channel for point-to-point-interpolator ........................................ 4-6
AOPEN: Open channel for point-to-point-interpolator........................................... 4-7
ARESET: Request to reset a point-to-point-interpolator ....................................... 4-8
PALMOVE: Move a point-to-point-axis.................................................................. 4-9
SCLOSE: Close RTI channel for spindle............................................................... 4-11
SETRANG: Select spindle gear range .................................................................. 4-12
SG96RPM: Request G96 constant surface speed spindle control ....................... 4-13
SG97RPM: Set spindle speed in RPM.................................................................. 4-15
SOPEN: Open a channel for spindle management............................................... 4-16
SORIENT: Request spindle orientation................................................................. 4-17
10 Series CNC WinPLUS Library - User Manual (04) iii
Index
10 Series CNC WinPLUS Library - User Manual
SRESET: Request to reset a spindle.....................................................................4-18
RTIRES: Read RTI axes monitor table.................................................................. 4-19
AUX_STAT: Read point-to-point axis or spindle status......................................... 4-20
GET_POSD: Read position and feed rate of an axis controlled via
serial line RS-232................................................................................................... 4-23
GET_AX: Plus gets a parked axis.......................................................................... 4-24
CONN_AX: Connect an axis to the interpolator of the logic .................................. 4-26
SCONN_AX: Disconnect an axis from the interpolator of the logic ....................... 4-28
PARK_AX: Park an axis belonging to the logic .....................................................4-29
PARK_SP: Park a spindle...................................................................................... 4-30
GET_SP: Process gets a spindle already parked.................................................. 4-31
CONN_SP: Connect a spindle to an interpolator................................................... 4-32
SCONN_SP: Disconnect a spindle from the associated interpolator .................... 4-33
OFFSET AND TOOLS HANDLING
TOOLACT: Update axis table with new tool offset ................................................5-2
ACTOFFS: Request activation of a tool offset....................................................... 5-5
COMPOFF: Compute new axes offset ..................................................................5-7
NAXOFF: Activate new axes offset........................................................................ 5-8
TBLGETW: Read int value from a table................................................................. 5-9
TBLGETD: Read lreal value from a table ..............................................................5-10
TBLPUTW: Write int value to a table ..................................................................... 5-11
TBLPUTD: Write lreal value to a table .................................................................. 5-12
TBLSRCD: Table lreal search................................................................................ 5-13
TBLSRCW: Table int search.................................................................................. 5-15
TOOL_RD: Get tool slave identifier .......................................................................5-17
PROCESS/SYSTEM VARIABLES HANDLING
GBPROVAR: Get Boolean process variable ......................................................... 6-3
SBPROVAR: Set Boolean process variable .......................................................... 6-4
GETEPAR: Get part program E-parameter ...........................................................6-5
SETEPAR: Set part program E parameter ............................................................6-6
GETHPAR: Get part program H-parameter........................................................... 6-7
SETHPAR: Set part program H-parameter............................................................ 6-8
GETHFL: Get part program H parameter flag (HF) ............................................... 6-9
SETHFL: Set part program H parameter flag ........................................................6-10
GETSC: Get ASCII global part program variable ..................................................6-11
SETSC: Set ASCII global part program variable ................................................... 6-12
GETSN: Get lreal global part program variable ..................................................... 6-13
SETSN: Set lreal global part program parameter .................................................. 6-14
GETUSED: Read the user variables of a double type process ............................. 6-15
PUTUSED: Write the user variables of a double type process .............................6-16
GETUSEC: Read the user variables of a char type process................................. 6-17
PUTUSEC: Write the user variables of a type char process .................................6-18
INDEX: Copy a range of M variables ..................................................................... 6-19
INDEXA: Copy a range of ASCII variabiles ...........................................................6-20
HUMAN INTERFACE
HISPROC: Select a process to control .................................................................. 7-2
SETCUSK: Set OEM softkey status; ON/OFF type............................................... 7-3
iv 10 Series CNC WinPLUS Library - User Manual (04)
SETCUSL: Set OEM softkey status; Maintained, Data Entry and Normal............ 7-4
SETHINT: Set human interface protection bits ..................................................... 7-5
MTB_ON: Assign a Pilot panel to a process ......................................................... 7-7
MTB_OFF: Disconnect a Pilot panel from a process ............................................ 7-9
CONS_LED: Manage leds on the OPLink operator panel .................................... 7-10
HUM_ABI: Enable specified softkeys.................................................................... 7-11
HUM_DIS: It disables specified softkeys............................................................... 7-13
CONS_ON: Connects a WinMedia Operator Console to a process ..................... 7-15
CONS_OFF: Disconnects a WinMedia Operator Console from a process .......... 7-17
CONS_PUT: Sets the parameters of a WinMedia Operator Console................... 7-18
AXES RELATED FUNCTIONS
GETAXINT: Get real axis position ......................................................................... 8-3
AX_CHAS: Change the servo mode of an axis..................................................... 8-4
AX_PROB: Enable probing signal for one or more axis........................................ 8-5
AX_RDPB: Read the probed positions of one or more axes ................................ 8-6
AX_RESE: Abort the actual operation of the addressed axis ............................... 8-8
AX_ZSH1: Write zero shift offset #1...................................................................... 8-9
AX_ZSH2: Write zero shift offset #2...................................................................... 8-10
AX_SELE: Activate axis monitor functions / gear range ....................................... 8-11
AX_RPOS: Resets the axis' position..................................................................... 8-13
AX_SETZ: Allows the activation of different functions for the specified axis ........ 8-14
AX_GET1: Get axis (spindle) servo parameters ................................................... 8-15
AX_GET2: Get axis (spindle) servo parameters ................................................... 8-17
AX_GET2B: Get axis (spindle) servo parameters................................................. 8-20
AX_GET3: Get axis (spindle) servo parameters ................................................... 8-23
AX_GET4: Get axis (spindle) servo parameters ................................................... 8-25
AX_GET5: Get axis (spindle) servo parameters ................................................... 8-27
AX_GET6: Get axis (spindle) servo parameters ................................................... 8-29
AX_GET7: Get axis (spindle) servo parameters ................................................... 8-34
AX_GET8: Get axis (spindle) servo parameters ................................................... 8-39
AX_PUT1: Set axis servo parameter..................................................................... 8-41
Notes to the parameter “CHANGECONV” ............................................................ 8-44
Notes to the parameter “CHANGETRAS” ............................................................. 8-45
Notes concerning the “STANDSTILL-GAIN” parameter........................................ 8-46
Notes on the parameter “BACKLASH_TIME” ....................................................... 8-47
AX_PUT2: Set axis servo parameter..................................................................... 8-48
AX_PUT2B: Sets axis interlocking parameter....................................................... 8-50
AX_PUT3: Set axis servo parameter..................................................................... 8-52
AX_PUT4: Set axis servo parameter..................................................................... 8-54
AX_PUTS: Writes axis status ................................................................................ 8-57
AX_GETS: Get axis status .................................................................................... 8-59
TC_CONF: Set the transducer ERDC................................................................... 8-61
TC_READ1: Read the physical position of the transducer ................................... 8-63
TC_WRIT: Set D/A Converter output .................................................................... 8-64
FAX_WCON: Configures driver for real time data communication ....................... 8-66
FAX_RCON: Configures the driver for real time data communication .................. 8-67
FAX_PUT: Real time updating of an axis' zero shift value.................................... 8-68
FAX_GET: Read in real time a number of axis parameters.................................. 8-69
AXD_RDD: Read a numerical parameter from a digital drive ............................... 8-71
AXD_WRD: Write a numerical parameter to a digital drive................................... 8-73
AXD_RDS: Read a string parameter from a digital drive ...................................... 8-74
AXD_WRS: Write a string parameter to a digital drive.......................................... 8-75
AXD_PUT: Set the enable/disable bits for a digital drive ...................................... 8-76
Index
10 Series CNC WinPLUS Library - User Manual
10 Series CNC WinPLUS Library - User Manual (04) v
Index
10 Series CNC WinPLUS Library - User Manual
AXD_CMD: Send a command to a digital drive..................................................... 8-77
AX_WPAR: Writes the AMP parameters of an axis............................................... 8-79
AX_RPAR: Reads the AMP parameters of an axis ............................................... 8-85
AX_FWW: Writes the parameters of an OS3 drive associated with an axis .........8-86
AX_FWR: Reads the parameters of an OS3 drive associated with an axis.......... 8-87
AX_MECS: Read the status of a Mechatrolink drive ............................................. 8-90
AX_MECR: Read the parameters of a Mechatrolink drive .................................... 8-91
AX_MECW: Write the parameters of a Mechatrolink drive.................................... 8-92
AX_RTFBCK: Read OS-WIRE variables in real time ............................................ 8-93
SPECIAL FUNCTIONS
ACTRES: Active reset request............................................................................... 9-2
LOCKTAB: Set table interlock status ..................................................................... 9-3
UNLKTAB: Cancel table interlock status ...............................................................9-5
FAST_WR: Fast data writing on DP ......................................................................9-6
FAST_RD: Fast data reading from DP ..................................................................9-8
DE_ETH: Enable/disable communication via Ethernet ......................................... 9-10
CANOPEN® HILSCHER MANAGEMENT FUNCTIONS
CAN_INIT: CANopen parameters initialisation ...................................................... 10-2
NMT_CMD: Send CANopen network or remote node management commands ... 10-5
SYNC_CMD: Send SYNC command to all the nodes........................................... 10-7
GET_EMCY_INFO: Read node information and diagnostic data.......................... 10-8
READ_SDO_CMD: Send read objects through SDO commands......................... 10-11
WRITE_SDO_CMD: Send write objects through SDO commands....................... 10-13
CAN_BOARD_CMD: Send commands to Hilscher mster board........................... 10-15
ERROR MESSAGES FOR SERIAL LINES COM1 OR COM2
General errors ........................................................................................................ A-1
Transmit errors....................................................................................................... A-1
Receive errors........................................................................................................ A-1
Line errors .............................................................................................................. A-2
System errors......................................................................................................... A-2
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
vi 10 Series CNC WinPLUS Library - User Manual (04)
10 Series CNC WinPLUS Library - User Manual
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
Index
APPENDIX H
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
viii 10 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 .........................................
ACTIVATE FEEDRATE BYPASS................................................................................
RESTORE PROGRAMMED FEEDRATE AFTER FEEDRATE BYPASS ...................
ENABLE DRIVER FOR R.T. READING OF INTERP. PARAMETERS .......................
DISABLE DRIVER FOR R.T. READING OF THE INTERP. PARAM..........................
READS IN R.T. A NUMBER OF INTERP. DATA ........................................................
FIND A STRING INSIDE THE ACTIVE PART PROGRAM .........................................
POSITION THE ACTIVE PART PROGRAM ON THE SELECTED BLOCK ...............
DEFINE THE MODE FOR THE SEARCH IN MEMORY .............................................
SELECT AXES ALLOWING TO CHANGE FEEDRATE OVERRIDE..........................
SET FEED RATE OVERRIDE OF AXES FOR MANUAL MOVEMENT......................
SEND A COMMAND TO THE INTERPOLATOR ........................................................
CYSTART CYCLE CYSTOP FEEDHLD FEED_GO HOLDON HOLDOFF MANFEED URLFEED FRORIDE SPORIDE SETMODE GJOG SJOG AXSELEC RQRESET ENDRESE GETPPNAM GETPNTR PP_SELE PP_EXEC MDI_CMD MDI_EXEC PPRESUME PREC_OFF PREC_ON FEEDBYON FEEDBYOF INTP_ABI INTP_DIS GET_INTP PP_TRSC PP_BRSC RCM_MOD AXSELFED AXMANFED INTP_CMD
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-2 10 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-4 10 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-6 10 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:
FEEDHLD request 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-8 10 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:
HOLDOFF Exit 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:
HOLDON request to enter in HOLD status.
System flag:
S_nHOLDA (S 20_2) process in HOLD status.
1-10 10 Series CNC WinPLUS Library - User Manual (03)

MANFEED: Set manual feedrate override

LD/FBD:
stat_wrd
ST:
stat_wrd := MANFED(proc_num, mfo_percent, mfo_direction);
Chapter 1
NC Related Functions
Type: Wait
INPUT VARIABLES: process number (1-20) (int)
manual feed percentage ( x 100) (int) manual feed direction (int)
OUTPUT VARIABLE: status word (int)
Description:
Forces the feedrate with the value equal to the percentage (mfo-percent) of the maximum configured manual feedrate.
The mfo_percent variable can have values between 0 and 10000, where:
00000 = manual feedhold 10000 = 100% manual feedrate
The direction of the manual motion depends on the variable mfo_direction:
0 = positive manual jog 1 = negative manual jog
You cannot override the manual feedrate to a value higher than the configured manual feedrate (100 %).
See also:
S_nMFO (SW 035) actual manual feedrate override percentage.
$n_PUTFMA manual feedrate override change requested
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:
SBPROVAR Set Boolean process variable (URL)
GBPROVAR Get Boolean process variable (URL)
1-12 10 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:
0 = 0 % feedhold 100 = 1 % 1000 = 10 % 10000 = 100 % 20000 = 200 % 32767 = 327.67 % max. FRO percentage
See also:
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
0 0 % of the programmed spindle speed
100 1 %
1000 10 %
10000 100 %
20000 200 %
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-14 10 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-16 10 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-18 10 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.
ENDRESE Logic has finished reset actions
Manual 10 Series CNC WinPLUS Application Manual - chapter 8
1-20 10 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
Manual 10 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

LD/FBD:
stat_wrd
ST:
stat_wrd := GETPPNAM(proc_num, name_main, name_sub, pp_num);
Type: Wait
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-22 10 Series CNC WinPLUS Library - User Manual (03)
Chapter 1
NC Related Functions
The "pp_num" parameter can have the following values:
Value Meaning
0 no active part program is present
1 main part program is active
2 subroutine at level 2 is in execution
3 subroutine at level 3 is in execution
4 subroutine at level 4 is in execution
5 subroutine 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

LD/FBD:
stat_wrd
ST:
stat_wrd := GETPNTR(proc_num, main, level1, level2, level3, level4);
Type: Wait
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-24 10 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-26 10 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
CYSTART System function call cycle start from WinPLUS NO WAIT Type
CYCLE System function call cycle start from WinPLUS WAIT Type
1-28 10 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-30 10 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-32 10 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:
FEEDBYOF restore programmed feedrate
S_nFRB (S 30_15) feedrate bypass active flag
1-34 10 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:
FEEDBYON activate 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:
Value Meaning
0OK
402 Process number out of range
404 Driver Already Active
See also:
GET_INTP
INTP_DIS
1-36 10 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:
Value Meaning
0OK
402 Process number out of range
405 Driver 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

. Type: Internal
LD/FBD:
stat_wrd
ST:
stat_wrd := GET_INTP(proc_num, para_num, value);
INPUT VARIABLES : process number (1..4) (int)
parameter number (int)
OUTPUT VARIABLES : requested parameter value (lreal)
status word (int)
Description:
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:
Value Meaning
0OK 403 para_num out of range 402 process number out of range 405 driver disabled
See also:
NTP_ABI
INTP_DIS
1-38 10 Series CNC WinPLUS Library - User Manual (03)

PP_TSRC: Finds a string inside the active part program

LD/FBD:
stat_wrd
ST:
stat_wrd := PP_TSRC(proc_num, aString, direction);
Chapter 1
NC Related Functions
Type: Wait
INPUT VARIABLES : process number (1..20) (int)
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

LD/FBD:
stat_wrd
ST:
stat_wrd := PP_BSRC(proc_num, block_number, direction);
Type: Wait
INPUT VARIABLES : process number (1..20) (int)
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-40 10 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:
bit meaning
0 M function passed to WinPlus during the search
1 T function passed to WinPlus during the search
2 S function passed to WinPlus during the search
3 axes 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-42 10 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-44 10 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:
Value Meaning
0 OK
160 Invalid command (the CODE value is invalid)
1-46 10 Series CNC WinPLUS Library - User Manual (03)

PPRUNINFO: Part Program execution monitoring management

LD/FBD:
stat_wrd
ST:
stat_wrd := PPRUNINFO (func_num, proc_num, MD_index, MW_index);
Chapter 1
NC Related Functions
Type: Internal
INPUT VARIABLES : function requested (int)
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-48 10 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-50 10 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:
Value Meaning
0OK
2 Process number wrong
3 Process 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:
Value Meaning
0OK
2 Process number wrong
3 Process 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:
Value Meaning
0OK
2 Process number wrong
3 Process not present
4 Monitoring function not activated
6 MD index wrong, or does not make it possible to save the 320 variables
needed for monitoring
7 MW 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:
Value Meaning
0 Monitoring NOT activated
1 Monitoring ON
2 Process 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:
Value Meaning
5 Function not envisaged
1-52 10 Series CNC WinPLUS Library - User Manual (03)

XDA_COMD: Master/Slave axes management

LD/FBD:
Chapter 1
NC Related Functions
Type: Wait
ST:
stat_wrd := XDA_COMD(FuncNum, ProcNum, Mode, FollRate, Spazio, MD_index,
MW_index, MastNam, SlavNam );
INPUT VARIABLES: function 0-5 (int)
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
FuncNum 1
ProcNum Number of process for which the association is requested
Mode Defines 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
FollRate This 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
Space This is the distance to be covered by the slave to synchronise with the motion of
the master.
MastNam This is the name of the master axis and it is denoted with a single ASCII character
SlavNam These 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-54 10 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:
Vslave = Vmaster * FollowRate PosSlave = PosSlavet0 + (PosMaster – PosMaster
) * FollowRate
t0
V
V maste
t 0
V slave
ctivation =
Synchronisation
t
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 :
Aslave = ((Vmaster * FollowRate)2 + 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 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-56 10 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-58 10 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
FuncNum 0
Definition/Variation of Following Ratio
This instruction defines/varies the parameter determining the master axis following ratio by the slave(s) specified.
Parameters needed
FuncNum 2
FollRate This 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.
SlavNam These 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
FuncNum 3
SlavNam These 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
FuncNum 4
SlavNam These 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-60 10 Series CNC WinPLUS Library - User Manual (03)
Chapter 1
NC Related Functions
Parameters needed
FuncNum 5
MD_Index MD to contain the error in the master following function by the slaves specified.
MW_Index MW to contain the status of the slaves specified.
SlavNam These 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 0 The 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 1 The slave is moving in synchronisation with the master phase.
bit 2 The slave is moving in synchro with the master.
bit 3 The slave is moving but is ending the master following stage.
The STAT_WRD output variable may assume the following values:
Value Meaning
1 Function not envisaged
2 Slave number wrong
3 Mode parameter wrong
4 MD index wrong
5 MW index wrong
Others Process errors
10 Series CNC WinPLUS Library - User Manual (03) 1-61
Chapter 1
NC Related Functions
END OF CHAPTER
1-62 10 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.............
ENABLE/DISABLE SOFTWARE OVERTRAVEL LIMITS ...........................................
SET AXIS HOMED FLAG ............................................................................................
RESET AXIS HOMED FLAG .......................................................................................
SET H/W OVERTRAVEL STATUS .............................................................................
SET AXES TO TEST MODE .......................................................................................
ENABLE HAND PULSE GENERATOR.......................................................................
DISABLE HAND PULSE GENERATOR......................................................................
ENABLE TANGENT AXIS ALGORITHM.....................................................................
DISABLE TANGENT AXIS ALGORITHM....................................................................
ENABLE/DISABLE TOOL CENTER POINT FEATURE..............................................
WRITE ASSOCIATED VARIABLE TO TOOL CENTER POINT.................................
READ ASSOCIATED VARIABLE TO TOOL CENTER POINT ...................................
MANAGE HARDWARE OVERTRAVEL LIMITS .........................................................
REQUEST FOR CONVERSION FROM AXIS NAME INTO AXIS IDENTIFIER .........
REQUEST FOR CONVERSION FROM AXIS IDENTIFIER INTO AXIS NAME .........
AX_ENAB AX_DISA SOFTOTL SETRIF RESRIF STTRAVEL SETTEST HPG_ON HPG_OFF AXTAN_E AXTAN_D TCPACT TCPWRT TCPREAD LIMITSW A_TO_ID ID_TO_A
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-2 10 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
Chapter 2
Axis Motion Functions

SOFTOTL: Enable /disable software overtravel limits

Type: Wait
LD/FBD:
stat_wrd
ST:
stat_wrd := SOFTOTL(ax_id, otl_state);
INPUT VARIABLES: axes identifier (int)
overtravel limit status (0 = active) (int)
OUTPUT VARIABLE: function status word (int)
Description:
The variable otl_state must be specified with a short. The meaning of this variable is:
otl_state = 0 Positive and negative software overtravel limit switches active
otl_state = 1 Positive software overtravel limit switch active; negative overtravel limit
switch not active
otl_state = 2 Positive software overtravel limit switch not active; negative software
overtravel limit switch active
otl_state = 3 Positive 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-4 10 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-6 10 Series CNC WinPLUS Library - User Manual (04)

STTRAVEL: Set H/W overtravel status

LD/FBD:
stat_wrd
ST:
stat_wrd := STTRAVEL(ax_id, direction, otl_state) ;
Chapter 2
Axis Motion Functions
Type: No Wait
INPUT VARIABLES: physical axis identifier (int)
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 = 1 active State = 0 non-active
This function can only be activated/de-activated when the process is IDLE (S 20_00).
2-8 10 Series CNC WinPLUS Library - User Manual (04)
Chapter 2
Axis Motion Functions

HPG_ON: Enable hand pulse generator (HPG)

Type: Wait
LD/FBD:
stat_wrd
ST:
stat_wrd := HPG_ON(ax_id, transducer, scale, pitch) ;
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:
Value Meaning
0OK
-1 wrong or not configured ax_id 1 the handwheel's transducer and the associated axis are not on the
same board
2 virtual axis or the handwheel is already active on an axis different from
the input one (axis_id) 3 the handwheel transducer is already engaged by another axis 4 Out of range software overtravel limits 5 Maximum number of transducers
6 Invalid id of OSWire transducer
7 OSWire transducers exhausted (max. number exceeded)
8 OSWire 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° board from 0x100 to 0x105
2° board from 0x106 to 0x10B
3° board from 0x10C to 0x111
4° board from 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.1 Transd.2 Trasnd.3 Transd.4 Transd.5 Transd.6
1° Board
2° Board
3° Board
0x100 0x101 0x102 0x103 0x104
0x106 0x107 0x108
0x10C 0x10D 0x10E 0x10F 0x110 0x111
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-10 10 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:
Value Meaning
0OK
-1 wrong or not configured ax_id
1 the handwheel's transducer and the associated axis are not on the
same board
2 virtual axis or the handwheel is already active on an axis different from
the input one (ax_id)
6 Invalid id of OSWire transducer
8 OSWire transducer resource could not be allocated for timeout.
10 Series CNC WinPLUS Library - User Manual (04) 2-11
Chapter 2
Axis Motion Functions

AXTAN_E: Enable tangent axis algorithm

LD/FBD:
stat_wrd
ST:
stat_wrd := AXTAN_E(proc_num, ax_num, ax_id1, ax_id2, ax_id3, offset, sign);
Type: Wait
INPUT VARIABLES: process number (1...20) (int)
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-12 10 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-14 10 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:
type meaning
0 disables TCP
1 enables TCP in mode 1
2 enables TCP in mode 2
3 enables TCP in mode 3
4 enables TCP in mode 4
5 enables 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

LD/FBD:
stat_wrd
Type: internal
ST:
stat_wrd := TCPWRT(proc_num, mask, reserved, lenght, hor_pos, ver_pos, radius,
angle, edge_rad, edge_angle);
INPUT VARIABLES: process number (int)
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-16 10 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:
bit associated variable
0 reserved
1 length - tool length variation
2 hor_pos - horizontal rotary axis position
3 ver_ pos - vertical rotary axis position
4 radius - tool radius variation
5 angle - part contact point angle variation
6 edge 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

LD/FBD:
stat_wrd
Type: internal
ST:
stat_wrd := TCPREAD(proc_num, status, lenght, hor_pos, ver_pos, radius, angle,
edge_rad, edge_angle);
INPUT VARIABLES: process number (int) OUTPUT VARIABLE: Tool Center Point status (int)
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) status word (int)
2-18 10 Series CNC WinPLUS Library - User Manual (04)
Loading...