osai 10 CNC Application Manual

10 Series CNC
WinPLUS
Application Manual
Code: 45006862V Rev. 04
PUBLICATION ISSUED BY:
OSAI S.p.A. Via Torino, 14 - 10010 Barone Canavese (TO) – Italy
Tel. +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

SUMMARY OF CHANGES

General
This issue completely replaces the previous ones.
PAGE UPDATE TYPE
UPDATE
10 Series CNC WinPLUS Application Manual
INDEX
Chapter 2
page 3 page 5 page 6 page 7 page 13
Chapter 4
page 2
Chapter 5
page 1 page 3 page 5 page 6 page 8 page 53 page 54 page 55
Chapter 8
page 1 page 2 page 9 page 11 page 12 page 13 page 15
Updated
Added a new paragraph “Routines activated by Fast Input Events” Changed picture (added Fast Input) Added “Attention” Changed picture (added Fast Input) Added description EventTaskFIN
Added description in the table
Changed picture Added description in the table Added “Attention” Changed picture Added “Attention” Added a new paragraph “MANAGEMENT of SHARED SPINDLE RACK (GTS)” Added a new paragraph “ Added a new paragraph “ MIGRATION OF AXES (GTA) MANAGEMENT RACK”
Changed description Changed table Changed table Added description in the table Changed table and description Added a new paragraph “Shutdown Warnings” Added a new paragraph “Mechatrolink Emergencies”
PROGRAM ACTIVATION (SPG) MANAGEMENT RACK”
Chapter 10
page 6
Chapter 12
page 7
APPENDIX B
10 Series CNC WINPLUS Application Manual (04)
Added new paragraphs “Coordinated Axes” Point-Point Axes” “Gantry Axis”
Added description in the table
Added a new appendix “ HILSCHER CANOPEN ERROR CODES”
abc

Preface

10 Series CNC WinPLUS Application Manual
PREFACE
The 10 Series numerical control introduces many new Technical concepts. One of the most important of these concepts is the concept of information exchange between the CNC and the integrated PLC (Programmable Logic Controller).
Conventional controls use a window with a large amount of fixed flags, which are continuously scanned and updated by both CNC and programmable logic control.
The concept of 10 Series by-passes this general conception with a simple but unique solution: both CNC and PLC use function calls to alert each other, to pass information or to request a certain action. These function calls need only be executed on event, thus freeing up CPU capacity and increasing the general system performance.
This manual explains the new concept and shows how applications can use its power.
ABOUT THIS MANUAL
This manual is intended to be used by the OEM personnel in charge of the programming of the machine tool interface. It gives an overview of the software architecture to be used to develop the programmable logic.
it does NOT explain the WinPLUS programming language and the use of any of its language elements.
10 Series CNC WinPLUS Application Manual (04) 1
Preface
10 Series CNC WinPLUS Application Manual
This manual is structured as follows:
Chapter 1 explains the concepts of communication between the logic and the system.
Chapter 2 gives a detailed view of the structure of the routines running on the PLC
module: it shows the timing and the execution priorities of the different routines on the I/O processor and it makes you familiar with the special execution mode of the background logic programs. Finally, it gives a list of declarations needed to define the different routines.
Chapter 3 deals with the data areas in the PLC module's memory and in its dual port.
Chapter 4 explains the configuration of the interface between part program and logic.
Chapter 5 explains the functions of the interface between the part program and the logic.
Chapter 6 explains the configuration and the use of filters of executive commands.
Chapter 7 explains the configuration of the emergency routines and of OEM softkeys.
Chapter 8 describes management of emergencies.
Chapter 9 describes OEM softkey management.
Chapter 10 this is the practical part of the manual which explains how to use the
communication concepts of the controls to create efficient applications.
Chapter 11 this chapter describes how to use the INTERBUS feature on 10 Series systems.
Chapter 12 this chapter describes how to use the CANOPEN feature on 10 Series systems.
Chapter 13 this chapter describes how to use the OSWIRE feature on 10 Series systems.
Chapter 14 Describes how to use the PROFIBUS function in Series 10 systems
Appendix A contains a glossary of verbs and expressions used in this manual.
Appendix B contains HILSCHER CANOPEN ERROR CODES
OTHER MANUALS ABOUT WINPLUS
Beside this manual there are 2 other specific manuals on WinPLUS:
10 Series CNC WinPLUS LIBRARY code : 45006867F
This manual covers the library function calls and the function blocks available in the WinPLUS
programming language:
System function calls
function calls
10 Series CNC WinPLUS development tool code 4500 6672 P
This manual describes the WinPLUS development tool, the editors and the utilities to generate
an executable logic program:
ladder diagram / function block diagram editor (FBD/LD)
sequential function chart editor (SFC)
2 10 Series CNC WinPLUS Application Manual (04)
Preface
10 Series CNC WinPLUS Application Manual
Other manuals may be of interest when programming a machine tool interface:
1. 10 Series CNC AMP - Software Characterisation Manual Code : 4500 6667 V
describes the system/process software configuration utility and its parameters
2. 10 Series CNC Programming Manual Code: 4500 4457 K
describes the 10 Series CNC part program language
3. 10 Series CNC User Manual Code: 4500 4452 H
describes the use of the human interface, the CNC manual functions and the utilities available
to the operator
4. 10 Series Family Installation Guide Code 4500 6657 R
contains all the information needed to realise a correct installation of the 10 Series CNC
system.
5. 10 Series CNC Software Installation Manual Code 4500 6687 N
contains all the information needed to install the software release.
WARNINGS
For correct control operation, it is important to follow the information given in this manual. Take particular care with topics bearing one of the signs: WARNING, CAUTION or IMPORTANT, which indicate the following types of information:
Draws attention to facts or circumstances that may cause damage to the control, to the machine or to operators.
WARNING
Indicates information to be followed in order to avoid damage to equipment in
CAUTION
general.
IMPORTANT
Indicates information that must be followed carefully in order to ensure full success of the application.
10 Series CNC PLUS Application Manual (04) 3
Preface
10 Series CNC WinPLUS Application Manual
END OF PREFACE
4 10 Series CNC WinPLUS Application Manual (04)
10 Series CNC WinPLUS – Application Manual

INDEX

SYSTEM - APPLICATION LOGIC HANDSHAKE
THE LOGIC INTERFACE BUFFER – THE M RACK ..................................................... 1-1
SYSTEM FUNCTION CALLS ......................................................................................... 1-2
COMMON DATA AREAS ............................................................................................... 1-2
Indice
ORGANIZATION OF THE MACHINE LOGIC PROGRAM
AVAILABLE ROUTINES................................................................................................. 2-1
Routines activated on time (foreground) ............................................................... 2-1
Continuously executed routines (background routines) ........................................ 2-1
Routine activated in an emergency ....................................................................... 2-2
Routine activated by pressing a softkey (OEM softkey routine)............................ 2-2
Routines activated by part program events (part program interface).................... 2-2
Routines activated from the console (request for enable signal) .......................... 2-2
Routines activated when requested by the logic ................................................... 2-2
Routines activated by Fast Input Events ............................................................... 2-3
ANALYSIS OF RACK M ................................................................................................. 2-3
TASK SYNCRONISATION ............................................................................................. 2-3
BACKGROUND EXECUTION ........................................................................................ 2-10
WINPLUS TASK DECLARATION .................................................................................. 2-13
I/O PROCESSOR /SYSTEM DATA AREAS
SYSTEM STATUS FLAGS.............................................................................................. 3-2
PROCESS STATUS FLAGS........................................................................................... 3-6
USER DEFINED / GLOBAL VARIABLES (G VARIABLES).......................................... 3-15
M VARIABLES ................................................................................................................ 3-16
A VARIABLES................................................................................................................. 3-18
TABLES........................................................................................................................... 3-19
Axes Table............................................................................................................. 3-19
Tool table ............................................................................................................... 3-23
Tool offset table ..................................................................................................... 3-25
User table .............................................................................................................. 3-29
WINPLUS VARIABLES SUMMARY TABLE.................................................................. 3-30
CONFIGURATION OF FUNCTIONS
10 Series CNC WinPLUS – Application Manual (04) i
Indice
10 Series CNC WinPLUS – Application Manual
Configuration.......................................................................................................... 4-1
LOGIC / SYSTEM COMMUNICATION
STRUCTURE OF THE PART PROGRAM RACK........................................................... 5-1
THE PART PROGRAM INTERFACE RACKS................................................................ 5-3
COORDINATED AXES.................................................................................................... 5-8
Consent to move Rack........................................................................................... 5-8
Motion blocks ......................................................................................................... 5-10
Consent to move management.............................................................................. 5-11
End of motion Rack................................................................................................ 5-12
End of motion management................................................................................... 5-13
M FUNCTIONS ................................................................................................................5-14
M function rack....................................................................................................... 5-15
M code management (EXPEDITE) ........................................................................5-17
AMP set up for M functions.................................................................................... 5-18
PSEUDO AXES ............................................................................................................... 5-26
Pseudo axes rack................................................................................................... 5-26
S FUNCTION ................................................................................................................... 5-29
Rack of S functions ................................................................................................ 5-29
T FUNCTION.................................................................................................................... 5-33
T function Rack ...................................................................................................... 5-35
END OF BLOCK RACK................................................................................................... 5-40
TOOL OFFSET PRESETTING RACK (RQP) .................................................................5-42
TOOL OFFSET REQUALIFICATION (RQT)................................................................... 5-45
DECLARE TOOL LIFE EXPIRED (TOU) ........................................................................ 5-48
PROBING CYCLE COMPLETED (QUTAST) ................................................................. 5-50
MANAGEMENT OF SHARED SPINDLE RACK (GTS).................................................. 5-53
MIGRATION OF AXES (GTA) MANAGEMENT RACK .................................................. 5-55
SYSTEM/ LOGIC COMMUNICATION
CONSOLE RACK FROM LOGIC ....................................................................................6-2
Configuration.......................................................................................................... 6-2
Control of commands sent by the console............................................................. 6-4
STRUCTURE OF THE RACK ......................................................................................... 6-6
Parameters associated with Manual Feed Override.............................................. 6-8
Parameters associated with Feed rate Override ...................................................6-8
Parameters associated with Speed Override ........................................................6-9
Parameters associated with Mode change............................................................ 6-9
Parameters associated with Rapid Override .........................................................6-10
Parameters associated with Axes Selection.......................................................... 6-10
Originating command environment........................................................................ 6-11
END OF COMMAND ACKNOWLEDGE FUNCTIONS ...................................................6-12
RACK CONFIGURATION OF EMERGENCIES AND OEM SOFTKEYS
ANSWER FUNCTIONS FOR COMMAND END.............................................................. 7-2
EMERGENCY MANAGEMENT
ii 10 Series CNC WinPLUS – Application Manual (04)
10 Series CNC WinPLUS – Application Manual
SYSTEM EMERGENCIES............................................................................................... 8-1
UNRECOVERABLE EMERGENCIES ............................................................................ 8-2
Digital Servo Interface (D.S.I.) EMERGENCIES ................................................... 8-4
EMERGENCIES FROM WINPLUS INTERPRETER ............................................ 8-5
OSWIRE EMERGENCIES .................................................................................... 8-6
RECOVERABLE EMERGENCIES.................................................................................. 8-9
D.S.I. Emergencies (Digital Servo Interface)......................................................... 8-11
SHUTDOWN WARNINGS (CLASS 2 DIAGNOSTIC)........................................... 8-13
OSWIRE EMERGENCIES .................................................................................... 8-15
MECHATROLINK EMERGENCIES ...................................................................... 8-15
OEM SOFTKEYS
ON/OFF Softkeys .................................................................................................. 9-3
MAINTAINED Softkey............................................................................................ 9-3
DATA ENTRY Softkeys ......................................................................................... 9-4
NORMAL Softkeys................................................................................................. 9-5
OPLink Function Keys ........................................................................................... 9-5
Indice
STANDARD APPLICATION NOTES
WINPLUS INITIALIZATION ............................................................................................ 10-1
MACHINE TOOL POWER UP AND RE-POWER UP AFTER E-STOP......................... 10-2
Coordinated axes................................................................................................... 10-6
Point-Point Axes .................................................................................................... 10-6
Gantry Axis ............................................................................................................ 10-6
HOLD MANAGEMENT.................................................................................................... 10-10
RESET MANAGEMENT.................................................................................................. 10-13
SPINDLE MANAGEMENT .............................................................................................. 10-15
CO-ORDINATED AXES MOVES (MAS) FROM WINPLUS ........................................... 10-17
HARDWARE OVERTRAVEL LIMIT SWITCHES ........................................................... 10-22
AXES HOMING ............................................................................................................... 10-25
FEED HOLD .................................................................................................................... 10-28
ACTIVE RESET............................................................................................................... 10-30
MANUAL JOG BY THE LOGIC ...................................................................................... 10-35
FEED RATE OVERRIDE CONTROL.............................................................................. 10-36
FEED RATE BYPASS..................................................................................................... 10-37
SERIAL LINE MANAGEMENT (RS-232)........................................................................ 10-39
AXIS POSITIONING VIA RS-232 SERIAL LINE ............................................................ 10-41
Configuration ......................................................................................................... 10-41
Programming ......................................................................................................... 10-42
Installation Specifications ...................................................................................... 10-45
INTERBUS® FEATURES ON 10 SERIES SYSTEMS
CONFIGURATION APPLICATION IBS CMD................................................................. 11-3
On-line Operations................................................................................................. 11-5
Off-line Operations................................................................................................. 11-13
TRANSFERRING THE CONFIGURATION FILE TO THE 10 SERIES CNC ................. 11-15
INTERBUS ERRORS ...................................................................................................... 11-16
CANOPEN® FUNCTIONS ON SERIES 10
10 Series CNC WinPLUS – Application Manual (04) iii
Indice
10 Series CNC WinPLUS – Application Manual
CANOPEN BUS CONFIGURATION ............................................................................... 12-2
CONFIGURATION EXAMPLE ........................................................................................ 12-4
DESCRIPTION OF ERROR CODES RETURNED DURING OPERATION
OF CANOPEN BUS......................................................................................................... 12-5
Errors from RIO EC modules .................................................................................12-5
Errors from CWIO modules.................................................................................... 12-7
ERRORS RETURNED DURING CNC POWER UP ........................................................ 12-7
SD180 CAN: Not all modules have been found on net .......................... 12-9
SD185 CAN: 24V failure on at least one I/O module ..................................................12-9
OSWIRE FUNCTIONS ON SERIES 10 SYSTEMS
OSWIRE BUS CONFIGURATION................................................................................... 13-2
CONFIGURATION EXAMPLE ........................................................................................ 13-4
DESCRIPTION OF ERROR CODES RETURNED DURING OPERATION
OF OSWIRE BUS ............................................................................................................ 13-5
Errors returned during CNC power up ...................................................................13-7
SLAVE PROFIBUS® FUNCTIONALITIES ON 10 SERIES SYSTEMS
SLAVE PROFIBUS CONFIGURATION .......................................................................... 14-2
DESCRIPTION OF ERROR CODES RETURNED DURING THE
FUNCTIONING OF THE SLAVE PROFIBUS. ................................................................14-4
ERRORS RETURNED DURING CNC START-UP .........................................................14-6
GLOSSARY
GLOSSARY .....................................................................................................................A-1
HILSCHER CANOPEN ERROR CODES
ERROR CODES............................................................................................................... B-1
END INDEX
iv 10 Series CNC WinPLUS – Application Manual (04)
SYSTEM - APPLICATION LOGIC HANDSHAKE
Logic Buffer Interface
Chapter 1
Fig. 1-1 System - Application Logic Handshake
THE LOGIC INTERFACE BUFFER – THE M RACK
The system communicates with the logic through a logic interface. This interface is a data buffer in which the system writes the data to send to the machine logic program.
The data buffer is divided according to its functions in different parts called RACKS.
They are always active.
M Rack
10 Series CNC WinPLUS Application Manual (00) 1-1
Chapter 1
System - Application Logic Handshake

SYSTEM FUNCTION CALLS

The logic from its part communicates with the system through a set of function calls which can include a parameter exchange between the two parties. There are two types of function calls:
NO WAIT functions pass a command (with parameters) to the system without waiting for an answer (the application program execution is not suspended).
WAIT functions pass a command to the system and wait for a response ( the logic execution is suspended until the response arrives)

COMMON DATA AREAS

The third communication channel between the logic and the system are the common data areas in the battery buffered dual ported memory of the I/O processor board. These areas can be divided in:
System area. This is a group of 500 variables of the type short (16 bit integer word) containing the status of the system and/or the processes.
Global variables. These variables are referred to as "G" variables. They have two formats; short and double (precision floating point). They can be read and written by both part program and logic program. The G variables are retentive, i.e. they are not cleared after powering up the system.
Tables. Tables are retentive memory areas in the dual port of the I/O processor module. They can be commonly accessed by the system and by the logic programs. The data contained in tables includes:
tool data
tool offset data
axes origin data
axes offsets
END OF CHAPTER
1-2 10 Series CNC WinPLUS Application Manual (00)
Chapter 2
ORGANIZATION OF THE MACHINE LOGIC PROGRAM
The logic program is organised in independent routines. All these routines run on the I/O processor module and have different priorities depending on their use.
The various routines are activated by the operating system of the PLC following specific events, or at given times, or may also be run continuously (in loops).
AVAILABLE ROUTINES
Routines activated on time (foreground)
This routine (only one can be present) will be executed on each clock tick of the I/O processor module. This clock tick is currently set at 10 ms. If the foreground routine execution time exceeds the available time (max. 10 ms), the system will generate an "overrun error" and go into emergency status. The routine must have the shortest execution time possible (<5 ms) because the remaining TICK time is used by routines with a lower priority. The primary use of the foreground routine is to "latch" events to be executed with fast, precise timing such as read/write physical I/O device status or handling of security/emergency devices. Requested name for the routine :fore.
Continuously executed routines (background routines)
A background routine executes continuously in a loop like a program in a standard PLC. The I/O processor can run up to 12 background routines in parallel.
Each background routine can execute functions of the WAIT type, which will suspend the execution of that background routine until arrival of the response. In the meantime the other background routines will continue executing. In reality, when one routine is suspended, control passes to the next one.
The logic programmer has to optimise the performance of the I/O processor by distributing the logic in the available background routines. Requested name for the routine : back1 …back12.
10 Series CNC WinPLUS Application Manual (04) 2-1
Chapter 2
Organisation of the Machine Logic Program
Routine activated in an emergency
This routine can be recalled whenever an emergency condition occurs. It can be activated only if it has been loaded. In an emergency, the logic application may have to execute logic sequences in parallel with the actions performed by the system. Mandatory name for the routine:
EventTaskEmg.
Routine activated by pressing a softkey (OEM softkey routine)
This routine is called whenever an OEM softkey is pressed (or released).It can be activated only if it has been loaded.
The OEM softkeys are defined in AMP, enabling the OEM to provide its application with the same appearance and operability as are typical of the standard system (AMP configuration manual). The management routine of an OEM softkey works at a very low priority level. Mandatory name for this routine: EventTaskHum.
Routines activated by part program events (part program interface)
Specific routines (one for each process configured) are called whenever a part program block contains functions relating to the logic (e.g., M codes, S and T functions, and all the other functions that can be grouped under the heading of ancillary logic functions). These routines can be activated only if they have been loaded. Mandatory name for these routines: EventTaskPPX, where X stands for the name of the associated process.
Routines activated from the console (request for enable signal)
Specific routines (one for each process configured) are called whenever a command is imparted to the system (e.g., cycle start, reset, etc.), enabling the logic to read and/or suspend the commands imparted to the system by the operator. These routines can be activated only if they have been loaded.
These routines are provided for most of the commands that can be entered via softkeys and/or from the MTB panel. Mandatory name for these routines: EventTaskConX, where X stands for the name of the associated process.
Routines activated when requested by the logic
Specific routines (from 1 to 39) will be called whenever the logic notifies an event through the SetEventTask function. Once activated, these tasks will be completed through the end.
Mandatory name for these routines: EventTaskLogX, where X stands for the task number.
2-2 10 Series CNC WinPLUS - Application Manual (04)
Chapter 2
Organisation of the Machine Logic Program
Routines activated by Fast Input Events
A routine that is available following activation of a fast input.
This routine will be activated only if it has been loaded. The application logic understands what Fast Input has been executed. To understand which input has been executed refer to the following table.
MW9990
Bit Event
0 Fast Input#1
1 Fast Input#2
2 Fast Input#3
3 Fast Input#4
4-15 Reserved
If two Fast Input events occur at the same time, the routine will be called twice.
Mandatory name for the routine: EventTaskFIN.

ANALYSIS OF RACK M

The data supplied from CNC to the logic is written in RACK M every time that the data is memorised in the interface buffer interrupting the execution of the Background routine for the necessary time that it takes to be written.

TASK SYNCRONISATION

The background routines can be synchronised with a set of semaphores (32) with the WAIT and SEND instructions. With the WAIT instruction and a semaphore number (from 0 to 31) it is possible to suspend the execution of a routine (task) until one of the other routines executes the SEND instruction with the same semaphore number . In this way it is possible to synchronise the execution of a task with another event in another task.
10 Series CNC WinPLUS - Application Manual (04) 2-3
Chapter 2
Organisation of the Machine Logic Program
Fig. 2-1 Task synchronisation
The instruction WAIT (3) suspends the execution of the BackProgram1 task until the command SEND (3) in the BackProgram2 task executes. Naturally the exact point (in time) of task resume depends on its priority.
2-4 10 Series CNC WinPLUS - Application Manual (04)
Chapter 2
Organisation of the Machine Logic Program
SYSTEM CPU
PART PROG. PACK INTERFACE
INTERFACCIA DELLA LOGICA
ROUTINE BACKGROUND # 1
SYSTEM
PACK EMERGENCY
PACK OEM SOFTKEY
EVENT TASK OF EMERGENCY
ROUTINE FOREGROUND
EVENT TASK PART PROG.
INFORM ATION SEND TO LOGIC
PACK OF REQUEST CONSENS
EVENT OF EMERGENCY
INTERRUPT TEMPORIZ. 10 MS
EVENT P. P.
ROUTINE BACKGROUND # 2
ROUTINE BACKGROUND # 3
EVENT TASK CONSOLE
EVENT TASK SOFTKEY OEM
EVENT TASK LOGIC
EVENT TASK FAST INPUT
Fig. 2-2 Routine scheduling
EVENT CONSOLE
EVENT SOFTKEY OEM
EVENT LOGIC
FAST INPUT
10 Series CNC WinPLUS - Application Manual (04) 2-5
Chapter 2
Organisation of the Machine Logic Program
NOTE:
If a SEND on a semaphore is issued without a task waiting for this semaphore. The SEND instruction will be ignored. Any routine in WAIT status can only be released by the equivalent SEND instruction. The routine containing the SEND instruction must be synchronised with the routine containing the WAIT status request.
IMPORTANT
You are not allowed to use the WAIT/DLY instructions in foreground, fast input and emergency routines
The use of the SEND and WAIT functions for synchronisation can produce some inhibits to the system if used during the management of the Part Program functions:
RQP RQT TOU GTA GTS
The problem can happen if the task that performs the SEND to the routines managing the functions in the list above also performs process applications (for example NC functions for position or status acquisition).
If they are wanted to use criterions of synchronism founded on WAIT and SEND it it is necessary to make sure that the task that sends the SEND doesn't perform any application toward the NC process. It is suggested that an ad hoc task is created that verifies the conditions of acceptance of the applications (e.g. possibility to use the in demand axes through GTA) and you effect the SEND to unhook the task applicant.
2-6 10 Series CNC WinPLUS - Application Manual (04)
High Priority
Emergency EventTask
Event Task Console # 1
I/O update
Event Task FAST INPUT
Foreground routine
Event Task Console
Chapter 2
Organisation of the Machine Logic Program
# 2
Event Task Console # 3
Event Task Console
Event Task Console # 7
Event Task Console # 9
Event Task Part Program # 1
Event Task Part Program # 3
Event Task Part Program
Event Task Part Program # 7
Event Task Part Program
Routine background # 1 Routine background # 2
# 5
# 5
# 9
OEM softkey eventTask
Event Task Console # 4
Event Task Console # 6
Event Task Console # 8
Event Task Console
Event Task Part Program # 2
Event Task Part Program
Event Task Part Program
Event Task Part Program # 8
Event Task Part Program
# 10
# 4
# 6
# 10
Low Priority
Routine background # 3 Routine background # 4
Logic event Task
Task n°39
Task n°1
10 Series CNC WinPLUS - Application Manual (04) 2-7
Chapter 2
Organisation of the Machine Logic Program
t
10 ms
I/O update
1 ms
10 ms
1 ms
= 1 ms.
Foreground routine
Background routine
Fig. 2-3 Steady Operation
Every 10 ms the system updates the I/O, executes all the foreground routine and executes a background in 1 ms. Every 10 ms one of the background routines will be executed in sequence. If a background routine lasts for less than 1 ms, it will be executed again from the start, until the time runs out. No routine will be interrupted.
Part Program interface
1 ms
10 ms
I/O update
routine foreground
High priority routine
Fig. 2-4 High Priority Interrupt Operation
1 ms
10 ms
routine background
t
= 1
2-8 10 Series CNC WinPLUS - Application Manual (04)
Chapter 2
Organisation of the Machine Logic Program
When emergencies occur, the continuous operation of the I/O processor will be interrupted and the high priority routines required will be executed immediately. Note that the continuous execution may be interrupted anywhere during the execution of the I/O ring update, of the foreground logic or of the background logic.
Consense request
Part Programm interface
10 ms
1 ms
request
Consense request
10 ms
1 ms
t
I/O update
1 ms
=
Foreground routine
.
Lower routine priority
Background routine
Fig. 2-5 Low Priority Interrupt Operation
When low priority events occur, like consent request calls, part program Interface calls or even OEM softkey calls, the foreground routine and all other higher priority tasks will not be interrupted. These low priority routines will only run during the time available for background logic execution.
10 Series CNC WinPLUS - Application Manual (04) 2-9
Chapter 2
Organisation of the Machine Logic Program

BACKGROUND EXECUTION

There can be up to 12 background routines. The background routines are those with the lowest priorities among the routines making up the application logic and are executed in turn every 10 ms (WinPlus Tick) for 1 ms. At each WinPlus Tick the integrated PLC updates the I/O's and the foreground routines. Consent routines, part program interfaces and OEM softkeys are enabled at system request and interrupt background execution.
After enabling all high priority routines at each WinPlus Tick, the system enables one of the background routines and lets it run for 1 ms. At each WinPlus Tick the system enables a different background routine. The sequence of activation is determined by the number associated with the routine name. At the first WinPlus Tick the background routine 1 (BACK1) is enabled, at the second the background routine 2 (BACK2) and so on. Once the last background routine has been enabled, the system starts again with the first.
Therefore, an individual background routine is executed over several WinPlus Ticks, alternating part of its code with that of other background routines in time slicing. If a background routine suspends its execution voluntarily by calling a function such as WAIT or DELAY or indirectly by calling system functions of the WAIT type, the remaining time up to the end of the millisecond is available for other system operations (processing a part program, displaying, etc).
If a background routine is shorter than 1 ms, it will execute several times during the WinPlus Tick. If the background task to be enabled is suspended at a new WinPlus Tick, no other background routine is executed and the millisecond reserved for it is used by the system.
Fig. 2-6 Background logic execution
Fig. 2.6 shows 3 background loops with total execution times of 3, of 0.5 and 2 ms respectively.
2-10 10 Series CNC WinPLUS - Application Manual (04)
Chapter 2
Organisation of the Machine Logic Program
1.1
2.1 2.1
0.5 | 0.5 ms
3.1
1.2
2.1 2.1
0.5 | 0.5 ms
3.2
1.3
1° TICK
2° TICK
3° TICK
4° TICK
5° TICK
6° TICK
7° TICK
2.1 2.1
0.5 | 0.5 ms
3.1
1 ms
8° TICK
9° TICK
012345678910 ms
Task Foreground
Task Background
Fig. 2-7 Background logic execution
Supposing after foreground execution + I/O ring management the remaining time for each sampling is constant at 5 mSec, the above routine are executed in the following sequence:
10 Series CNC WinPLUS - Application Manual (04) 2-11
Chapter 2
Organisation of the Machine Logic Program
As can be seen, at each cycle a different background routine is started, which means that a short background routine is executed more often than a long one.
Referring to the example, the repeat frequency of the 3 loops will be:
$BACK 1 90 ms $BACK 2 30 ms $BACK 3 60 ms
The formula for calculating the frequency of a background routine is:
duration of the background routine x number of background routines x 10
IMPORTANT
In this example it is assumed, that there are no interrupts (fast inputs, OEM softkey, requests form a part program or from the operator)
2-12 10 Series CNC WinPLUS - Application Manual (04)
Chapter 2
Organisation of the Machine Logic Program

WINPLUS TASK DECLARATION

To make sure that the various tasks are called correctly, the following names must be assigned:
Fore: Foreground task;
Back1 … Back12: Background task;
EventTaskCon1…EventTaskCon20: Tasks activated by enable signal requested events;
Numbers 1…20 denote the process associated with the task;
EventTaskPP1…EventTaskPP20: Tasks activated by Part Program interface events; Numbers 1…20 denote the process associated with the task;
EventTaskEmg: Tasks activated by emergency events;
EventTaskHum: Tasks activated by pressing an OEM softkey;
EventTaskLog1…EventTaskLog39: Tasks activated by logic events. The numbers denote the
task number and serve as input parameters for the SetEventTask function for triggering the associated task.
EventTaskFIN: Task activated by a fast input.
NOTE: The max. number of tasks that can be loaded simultaneously is 40.
10 Series CNC WinPLUS - Application Manual (04) 2-13
Chapter 2
Organisation of the Machine Logic Program
END OF CHAPTER
2-14 10 Series CNC WinPLUS - Application Manual (04)
Chapter 3
A
A
I/O PROCESSOR /SYSTEM DATA AREAS
The I/O processor and the system share a data area in the dual port memory of the I/O processor module. This data area contains an I/O image, global retentive variables (G), system status variables and 4 retentive tables with machine tool related data. Fig. 3-1 gives a detailed overview of all data areas on the I/O processor, which are available to the application logic.
Non retentive variables
Non retentive variables
Status of the system
(s variables)
Status of the proces
(s variables)
Global
M variables
Global
(M variables)
USER area
Physical inputs
(I variable)
SYSTEM
PPLICATION
LOGIC
Defined by the user
(G variables)
XES Table
TOOL Table
OFFSET Table
USER Table
global
(variables G)
retentive variables
retentive variables
Physical outputs
(0 variable)
Fig. 3-1 Memory areas available to WinPLUS
10 Series CNC WinPLUS Application Manual (03) 3-1
Chapter 3
I/O Processor /System Data Areas

SYSTEM STATUS FLAGS

There are 500 system variables. They all have the short format. The first 20 variables (SW 00­SW 19) are used to exchange some general system information between the logic program and the system. Since the purpose of these variables is predefined, they have predefined symbolic names. Most of the variables are read only by the logic (R/O). Only SW 03, SW4 , SW7 and SW12 can be written and read by the logic (R/W). SW Variables can be managed as words (I) or as single bits (B) or both (B/I).:
WORD MNEMONIC TITLE ACCESS PROT
SW 00 S_CTRL Activation status B R/W
SW 01 S_SECURLEV Active security level I R/O
SW 02 S_CNINFO NC state information B R/O
SW 03 S_HLS1 Home Limit Switches 1 B/I R/W
SW 04 S_HLS2 Home Limit Switches 2 B/I R/W
SW 05 S_WINNBI Activation WinNBI screens I R/W
SW 06 E_STOP E_STOP status B R/O
SW 07 S_DELAY_BOOT WINPLUS logic activation delay I R/W
SW 08 reserved for future use
SW 09 S_PROCSEL Selected process I R/O
SW 10 S_SCRNSEL selected screen I R/O
SW 11 S_UNITS configured units B R/O
SW 12 reserved for future use
SW 13 reserved for future use
SW 14 reserved for future use
SW 15 reserved for future use
SW 16 S_NOWAIT NO WAIT call counter I R/O
SW 17 S_CNCTYPE Control type B/I R/O
SW 18 reserved for future use
SW 19 reserved for future use
Hereafter, all variables and their functions will be discussed in more detail.
R/W SYSTEM VARIABLE SW0 S_CTRL
BIT
S00_00
S00_14
S 00_15
R/W SYSTEM VARIABLE SW1 S_SECURLEV
WORD
Title: ACTIVATION STATUS
S_DONE Signal on 1 when all SW loading operations have been completed
satisfactorily.
S_RESET MW and MD variables reset request after logic Warm Start
S_REBOOT Signal on 1 when a logic Warm Start has been performed, the
application can reset this bit once the required operations have been carried out.
Title: Home Limit switches
3-2 10 Series CNC WinPLUS Application Manual (03)
Chapter 3
I/O Processor /System Data Areas
SW 01 S_SECURLEV actually active security level value in the range of 0-6
R/O SYSTEM VARIABLE SW 02 S_CNINFO
BIT
S 02,00
S 02,01
S 02,02
S 02,03
up to
S 02,15
R/W SYSTEM VARIABLE SW 03 S_HLS1
BIT
S 03,00
S 03,01
through
S 03,15
(see SECURITY chapter in User Manual)
Title: NC state information
S_OVRT.00
S_AXES
S_TUNING
reserved
Title: Home limit switches
S_HLS1.00 Home limit switch axis with ID 1
S_HLS1.01 Home limit switch axis with ID 2
S_HLS1.15 Home limit switch axis with ID 16
The system temperature has reached 45° C. If the temperature goes higher, the controller switches off (50° C) This signal is only valid for systems equipped with temperature sensors
This indicates that the axes boards are ready to receive commands from the logic
Flag correlated to OSWire. Shows that the CNC has shifted to TUNING modality for setup of OS3 drives.
R/W SYSTEM VARIABLE SW 04 S_HLS2
BIT
S 04,00
S 04,01
through
S 04,15
R/W SYSTEM VARIABLE SW 06 S_ESTOP
BIT
S 06_00
S 06_01
S 06_04
S 06_03
Title: Home limit switches
S_HLS2.00 Home limit switch axis with ID 17
S_HLS2.01 Home limit switch axis with ID 18
S_HLS2.15 Home limit switch axis with ID 32
Title: Local E_Stop status
S_ESTOP0 Status of first E_Stop (1 stands for contact closed)
S_ESTOP1 Status of second E_Stop (1 stands for contact closed)
S_ESTOP2 Status of third E_Stop (1 stands for contact closed)
S_ESTOP3 Status of fourth E_Stop (1 stands for contact closed)
Home limit switches are wired as NC contacts: The input goes to a low level when the machine hits the switch.
10 Series CNC WinPLUS Application Manual (03) 3-3
Chapter 3
I/O Processor /System Data Areas
SW7 PROCESS R/O VARIABLE S_DELAY_BOOT
WORD
SW7 S_DELAY_BOOT
R/O SYSTEM VARIABLE SW 09 S_PROCSEL
WORD
SW 09 S_PROCSEL This word contains the number of the selected process. It is
R/O SYSTEM VARIABLE SW 10 S_SCRNSEL
WORD
SW 10 S_SCRNSEL This flag contains the number of the screen actually
TITLE: Logic activation delay
Logic activation delay executed by either a “warm start” or a “cold start” (milliseconds)
Title: Selected process for operation
an integer in the range from 1 to 24.
Title: Selected screen number
selected. It is a positive integer number (AMP – SW Characterisation Manual)
The S_SCRNSEL variable contains the number corresponding to the selected screen as configured in AMP. The variable can have the following values:
SCREEN NAME SCREEN NUMBER
Process main screen
Logic main screen
Large axes position
Logic screen 1 (full)
Logic screen 2 (full)
Logic screen 3 (full)
Logic screen 4 (full)
Additional screen 1
Additional screen 2
Additional screen 3
Additional screen 4
Additional screen 5
1
2
3
4
5
6
7
8
9
10
11
12
R/O SYSTEM VARIABLE SW 11 S_UNITS
BIT
S 11_00
S 11_01
through
S 11_15
Title: Configured units (metric/inch)
S_UNITS METRIC = 1 , INCH = 0
reserved spares
3-4 10 Series CNC WinPLUS Application Manual (03)
I/O Processor /System Data Areas
R/O PROCESS VARIABLE SW 16 S_NOWAIT
Chapter 3
WORD
SW 16 S_NOWAIT This word contains the number of NOWAIT calls placed. It is valid
R/O PROCESS VARIABLE SW 17 S_CNCTYPE
WORD
SW 17 S_CNCTYPE This word is used to indicate the control type.
Title: NO WAIT call counter
only for 10/365 and 10/385 systems.
Title: Controller type
The lower byte of SW17 is used for indicating the CNC model:
Value = 0 10/110 NC
Value = 1 10/510 NC
Value = 4 10/565 NC
Value = 5 10/100 NC
Value = 8 10/585 NC
Value = 255 10/3xx NC
IMPORTANT
The higher byte of SW17 is reserved for future developments.
10 Series CNC WinPLUS Application Manual (03) 3-5
Chapter 3
I/O Processor /System Data Areas

PROCESS STATUS FLAGS

All words in the process flag window have mnemonic names that start with the process number. Prefixes from S_1 to S_20 for the processes from 1 to 20. For each process there is one group of 20 words. Each group is identically structured. The access to process variables is as discussed for the system variables. For each process there will be a group of flags as for process number 1. The functionality is identical, the mnemonics are different only to the part relating to the number of the process. The symbolic addresses SW nn must be incremented by 20 for each further process.
These flags are dynamically updated. They are not synchronised with the
CAUTION
execution of the logic (except S_nRESE and S_nHOLDA). Therefore, do not use these flags to synchronise the logic: the signals may change state during the execution of a routine.
WORD MNEMONIC NAME TITLE ACCESS
SW20 S_nSYSSTA Process Status Control Word B
SW 21 S_nGMACRO Active G Code Of Paramacro I
SW 22 S_nGCODE1 Active G Codes G00-G15 B
SW 23 S_nGCODE2 Active G Codes G16-G31 B
SW 24 S_nGCODE3 Active G Codes G32-G47 B
SW 25 S_nGCODE4 Active G Codes G48-G63 B
SW 26 S_nGCODE5 Active G Codes G64-G79 B
SW 27 S_nGCODE6 Active G Codes G80-G95 B
SW 28 S_nGCODE7 Active G Codes G96-G99 B
SW 29 S_nAXSEL Axis Selected I
SW 30 S_nPROINF Process Informations B
SW 31 S_nPROMOD Active Process Mode B
SW 32 S_nFIXSTA Fixed Cycle Active State B
SW 33 S_nOFFS Number of the tool offset activated by 'h'
SW 34 S_wRAP Rapid traverse feed override percentage
SW 35 SnMFO Manual Feedrate Override Value I
SW 36 S_nFRO Feedrate Override Value I
SW 37 S_nSSO Spindle Speed Override Value I
SW 38 S_nPROMSG Process Message Number I
SW 39 S_nTYPE Type Of Application I
3-6 10 Series CNC WinPLUS Application Manual (03)
I/O Processor /System Data Areas
R/O PROCESS VARIABLE SW 20 (40, 60, 80,100,120, ,480) S_nSYSSTA
BIT
Title: Process Status Control Word
S 20,00 S_nIDLE process is in idle state
S 20,01 S_nCYCLE process executes a program block (run status)
S 20,02 S_nHOLDA process in hold status
S 20,03 S_nRUNH process in hold,motion aux. func. allowed
S 20,04 S_nHRUN process waiting to exit from hold state
S 20,05 S_nERRO process is in error state
S 20,06 RESERVED
S 20,07 S_nRESE process is being reset
S 20,08 RESERVED
S 20,09 S_nWAIT process is in WAIT substatus
S 20,10 S_nINPUT process is in INPUT substatus
S 20,11 RESERVED
S20,12 RESERVED
S 20,13 s_nMAS process in calculation stop (transfer. inh.)
S 20,14 RESERVED
S 20,15 S_nFEEDH process in feedhold
Chapter 3
Bits from S20,09 to S20,14 represent "under status" of previous bits (from S20,00 to S20,08) therefore, when a status is active, an "understatus" bit may be activated.
The association "status/understatus" is given by the following table:
STATUS
IDLE MAS
RUN MAS
HOLD MAS
RUNH MAS
HRUN MAS
ERRO none
RESE nome
POSSIBLE UNDERSTATUS
WAIT
INPUT
10 Series CNC WinPLUS Application Manual (03) 3-7
Chapter 3
I/O Processor /System Data Areas
R/O PROCESS VARIABLE SW 21 (41,61,81,101,121, ,481) S_nGMACRO
BIT
SW 21 S_nGMACRO Number of active paramacro (300...998)
Title: Active paramacro G code
The variable provides the number of G-code of the active paramacro. In case of paramacro nesting the paramacro G that is passed is the last programmed one.
IMPORTANT
For the G-codes G00 up to G99, there are 100 reserved bits in the dual port memory. The G-codes are divided into groups. In one group only one G-code can be active. The different groups are indicated by the letters a-m. The G­codes with the "*" are non-modal, i.e. they are only active for the duration of the part program block they were used in.
R/O PROCESS VARIABLES SW 22 (42, 62, 82,102,122, ,482) S_nGCODE1
BIT
Title: Active G-codes
S 22,00 S_nG00 a rapid positioning
S 22,01 S_nG01 a linear interpolation
S 22,02 S_nG02 a circular interpolation CW
S 22,03 S_nG03 a circular interpolation CCW
S 22,04 S_nG04 j * dwell time at end of block
S 22,05 S_nG05 not used
S 22,06 S_nG06 not used
S 22,07 S_nG07 not used
S 22,08 S_nG08 not used
S 22,09 S_nG09 j * deceleration at end of block
S 22,10 S_nG10 not used
S 22,11 S_nG11 not used
S 22,12 S_nG12 not used
S 22,13 S_nG13 not used
S 22,14 S_nG14 not used
S 22,15 S_nG15 not used
3-8 10 Series CNC WinPLUS Application Manual (03)
I/O Processor /System Data Areas
R/O PROCESS VARIABLES SW 23 (43,63,83,103,123, , 483) S_nGCODE2
BIT
Title: Active G-codes
S 23,00 S_nG16 not used
S 23,01 S_nG17
S 23,02 S_nG18
S 23,03 S_nG19
S 23,04 S_nG20 not used
S 23,05 S_nG21 not used
S 23,06 S_nG22 not used
S 23,07 S_nG23 not used
S 23,08 S_nG24 not used
S 23,09 S_nG25 not used
S 23,10 S_nG26 not used
S 23,11 S_nG27 c acc/dec on corners
S 23,12 S_nG28 c no acc/dec on corners
S 23,13 S_nG29 c point to point positioning mode
S 23,14 S_nG30 not used
S 23,15 S_nG31 not used
b interpolation on the plane formed by the 1st and 2nd axis (AMP) b interpolation on the plane formed by the 3rd and 1st axis (AMP) c
b interpolation on the plane formed by the 2nd and 3rd axis (AMP) c
Chapter 3
c
NOTE:
cIn many applications the 1st, 2nd, 3rd axes are called X, Y, Z, respectively.
R/O PROCESS VARIABLES SW 24 (44,64,84,104,124, ,484) S_nGCODE3
BIT
Title: Active G-codes
S 24,00 S_nG32 not used
S 24,01 S_nG33 a threading
S 24,02 S_nG34 not used
S 24,03 S_nG35 not used
S 24,04 S_nG36 not used
S 24,05 S_nG37 not used
S 24,06 S_nG38 not used
S 24,07 S_nG39 not used
S 24,08 S_nG40 e no cutter compensation
S 24,09 S_nG41 e cutter compensation left of part
S 24,10 S_nG42 e cutter compensation right of part
S 24,11 S_nG43 not used
S 24,12 S_nG44 not used
S 24,13 S_nG45 not used
S 24,14 S_nG46 not used
S 24,15 S_nG47 not used
The G code flags S_nG40 through S_nG42 will reflect the true status of the system after axes motion has been programmed in one of these modes. The flags are not updated when just one of the G codes G40, G41 or G42 are programmed in a block on its own (no motion).
10 Series CNC WinPLUS Application Manual (03) 3-9
Chapter 3
I/O Processor /System Data Areas
R/O PROCESS VARIABLES SW 25 (45,65,85,105,125, ,485) S_nGCODE4
BIT
Title: Active G-codes
S 25,00 S_nG48 not used
S 25,01 S_nG49 not used
S 25,02 S_nG50 not used
S 25,03 S_nG51 not used
S 25,04 S_nG52 not used
S 25,05 S_nG53 not used
S 25,06 S_nG54 not used
S 25,07 S_nG55 not used
S 25,08 S_nG56 not used
S 25,09 S_nG57 not used
S 25,10 S_nG58 not used
S 25,11 S_nG59 not used
S 25,12 S_nG60 not used
S 25,13 S_nG61 High Speed execution
S 25,14 S_nG62 not used
S 25,15 S_nG63 not used
R/O PROCESS VARIABLES SW 26 (46,66,86,106,126, ,486) S_nGCODE5
BIT
Title: Active G-codes
S 26,00 S_nG64 not used
S 26,01 S_nG65 not used
S 26,02 S_nG66 not used
S 26,03 S_nG67 not used
S 26,04 S_nG68 not used
S 26,05 S_nG69 not used
S 26,06 S_nG70 f inch programming mode
S 26,07 S_nG71 f metric programming mode
S 26,08 S_nG72 k * measuring cycle G72
S 26,09 S_nG73 k * measuring cycle G73
S 26,10 S_nG74 k * measuring cycle G74
S 26,11 S_nG75 not used
S 26,12 S_nG76 not used
S 26,13 S_nG77 not used
S 26,14 S_nG78 not used
S 26,15 S_nG79 i * absolute movement (home reference)
3-10 10 Series CNC WinPLUS Application Manual (03)
I/O Processor /System Data Areas
R/O PROCESS VARIABLES SW 27 (47,67,87,107,127, ,487) S_nGCODE6
BIT
Title: Active G-codes
S 27,00 S_nG80 g no fixed cycle active
S 27,01 S_nG81 g fixed cycle G81 active
S 27,02 S_nG82 g fixed cycle G82 active
S 27,03 S_nG83 g fixed cycle G83 active
S 27,04 S_nG84 g fixed cycle G84 active
S 27,05 S_nG85 g fixed cycle G85 active
S 27,06 S_nG86 g fixed cycle G86 active
S 27,07 S_nG87 not used
S 27,08 S_nG88 not used
S 27,09 S_nG89 g fixed cycle G89 active
S 27,10 S_nG90 h absolute programming
S 27,11 S_nG91 h incremental programming
S 27,12 S_nG92 d * axis datum offset
S 27,13 S_nG93 l inverse time feed coding
S 27,14 S_nG94 l feed coding in mm/min inch/min
S 27,15 S_nG95 l feed coding per spindle revolution
Chapter 3
R/O PROCESS VARIABLES SW 28 (48,68,88,108,128, ,488) S_nGCODE7
BIT
Title: Active G-codes
S 28,00 S_nG96 m constant surface speed active
S 28,01 S_nG97 m constant surface speed not active
S 28,02 S_nG98 d* defines axis offset (new mode)
S 28,03 S_nG99 d* cancel G92 offset
S 28,04
through reserved spares
S 28,15
R/O PROCESS VARIABLES SW 29 (49,69,89,109,129, ,489) S_nAXSEL
BIT
Title: Axis selected for manual operations
SW 29 S_nAXSEL physical axis identifier of selected axis
R/O PROCESS VARIABLES SW 30 (50,70,90,110,130, ,490) S_nPROINF
BIT
Title: Process Informations
S 30,11 S_wAUX Auxiliary function emission running at the end of RCM
S 30,12 S_nRCM Search in memory
S 30,13 S_nDRY Dry Run activated
S 30,14 S_nEOB End of Block activated
S 30,15 S_nFRB Feed Rate Bypass activated
R/O PROCESS VARIABLES SW 31 (51, 71, 91,111,131, ,491) S_nPROMOD
10 Series CNC WinPLUS Application Manual (03) 3-11
Chapter 3
I/O Processor /System Data Areas
BIT
TITLE: Active process mode of operation
S 31,00 S_nMDI manual data input mode
S 31,01 S_nAUTO auto mode active
S 31,02 S_nSTEP single block mode active
S 31,03 S_nMANU continuous manual jog mode active
S 31,04 S_nMANJ incremental manual jog mode active
S 31,05 S_nPROF jog return mode active
S 31,06 S_nHOME axes homing selected
S 31,07 S_nHPG hand pulse generator active
S 31,08 not used
S 31,09 not used
S 31,10 not used
S 31,11 not used
S 31,12 not used
S 31,13 not used
S 31,14 not used
S 31,15 not used
R/O PROCESS VARIABLES SW 32 (52, 72, 92,112,132, 492) S_nFIXSTA
BIT
TITLE: Fixed cycle status
S 32,00 S_nINVER spindle reverse in fixed cycle
S 32,01 S_nSTOPR spindle stop in fixed cycle
S 32,02 not used
S 32,03 not used
S 32,04 not used
S 32,05 not used
S 32,06 not used
S 32,07 not used
S 32,08 S_nTRAP touch probe cycle, rapid approach
S 32,09 not used
S 32,10 not used
S 32,11 not used
S 32,12 not used
S 32,13 not used
S 32,14 not used
S 32,15 not used
S_nINVER is set TRUE in the fixed cycle G84 at the moment in which the spindle must be
reversed at the bottom of the tapping hole.
3-12 10 Series CNC WinPLUS Application Manual (03)
Chapter 3
I/O Processor /System Data Areas
S_nSTOPR is set TRUE before the axis' return movement and it is set false at the end of
the boring cycle.
NOTE:
30 ms of time are required at least, from the moment we set at 1 the value and the moment of the axes’s return movement. This time is used by the logic machine to analize the connect strategy to use (ex.: stopping the axis for a long time before returning to allow the spindle stop).
S_nTRAP is set TRUE during the rapid approach phase of the touch probe cycles G72,
G73 and G74. It can be used to clean the workpiece surfaces with compressed air.
10 Series CNC WinPLUS Application Manual (03) 3-13
Chapter 3
G
I/O Processor /System Data Areas
R/O PROCESS VARIABLE SW 33 (53, 73, 93,113,133, ,493) S_nOFFS
WORD
SW 33 S_nOFFS number of the tool offset activated using the 'h' parameter
R/O PROCESS VARIABLE SW 34 (54, 74, 94, 114, 134,...494) S_wRAP
WORD
R/O PROCESS VARIABLE SW 35 (55, 75, 95,115,135, ,495) S_nMFO
WORD
SW 035 S_nMFO manual feedrate percentage value :
S 35,15 S_nMFO.15 Sign of manually adjusted feedrate: 0 = positive 1 =
R/O PROCESS VARIABLE SW 36 (56, 76, 96,116,136, ,496) S_nFRO
WORD
SW 36 S_nFRO Feedrate override percentage value
TITLE: Number of the tool offset activated by 'h'
Title: Rapid Traverse feed override percentage
SW 34 S_wRAP Rapid Traverse feed override percentage:
0 = 0% 10000 = 100% of the Rapid Traverse feed
TITLE: Manual feedrate override percentage
0 = 0% 10000 = 100% of max feedrate Use bit 00 - 14 only (absolute value)
BIT
TITLE: Manual feedrate direction
negative
TITLE: Feedrate override percentage
0 = 0% 10000 = 100% of prog. feedrate
R/O PROCESS VARIABLE SW 37 (57, 77, 97117,137, ,497) S_nSSO
WORD
SW 37 S_nSSO spindle override percentage value
R/O PROCESS VARIABLE SW 38 (58, 78, 98,118,138, ,498) S_nPROMS
WORD
SW 38 S_nPROMSG process related screen message number actually
R/O PROCESS VARIABLE SW 39 (59, 79, 99,119,139, ,499) S_nTYPE
WORD
SW 39 S_nTYPE
TITLE: Spindle speed override percentage
0 = 0% 10000 = 100% of prog. value
TITLE: Process message number
displayed. See appendix B of WinPLUS Library user manual for a list of messages
TITLE: Type of application
type of application
1 = Mill
2 = Lathe
3 = Grinder
3-14 10 Series CNC WinPLUS Application Manual (03)
Chapter 3
I/O Processor /System Data Areas

USER DEFINED / GLOBAL VARIABLES (G VARIABLES)

In addition to the system flag area and the process areas there is one memory area reserved for user defined variables. These variables are retentive, i.e. once stored, they will not be cleared at power turn on, unless they have been configured to be changed to a specific value by AMP. The variables in this memory area are called G-variables. There a 2 formats of G-variables:
16 bit words (value -32768..0..32767) (you can also address the individual bits of these variables)
64 bit floating point (double) variables
GW 000
GW 255
GD 00
GD 63
Fig. 3-2 "G variables" memory area
Since the G variables are accessible by the system and by the I/O processor, you can not only use them in the logic program but also in a part program. In this way they can serve as a direct communication channel between the part program and the logic or between the logic and the part program. To make one or more of the variables available for part programs, you have to define them in the AMP configuration program. In order to simplify access, you must assign a logical name to the "physical" address. All logical names for variables in this area have to begin with the "@" character.
AMP allows 3 types of variables to be configured:
Boolean (max. 128) You can assign any bit (0-15) of the G variables (0.255)
Short (max. 64) You can assign any of the 256 GW variables (000..255)
Double (max. 32) You can assign any of the 64 GD variables (00..63)
In AMP it is possible to assign a value to these variables that is loaded every time you switch on the system.
The following examples show an assignment for each of the possible variable types:
Examples:
@POS = G 006,04 (Bit 4 of word GW 006) @SPEED = GW 200 @ACC = GD 18
10 Series CNC WinPLUS Application Manual (03) 3-15
Chapter 3
I/O Processor /System Data Areas
@ = GW3 (a value can be assigned in AMP, but the variable is not available to the part program

M VARIABLES

The M variables are part of the "memory work area" for the logic.
They are divided logically into two parts:
User’s area (the work area memory for the logic) 6950 MW and 1950 MD variables
The M RACK (exchange and request data buffer between CNC and logic)
There are 10000 variables of short type (MW0 -MW9999) and 3000 variables of the double type (MD 000 - MD2999) of which 50MW and 50MD are global (not reserved to a particular process). 150 MW variables and 50 MD variables are dedicated to each process (max 20),.
In general the M RACK is divided functionally into parts that are called RACK. Each of which is composed of a group of variables (read and write) “dedicated “ to a special function.
CAUTION
The system cannot access the M variables directly.
NOTES:
These variables are NOT retentive! They will be cleared at power turn on.
The variables MW 0000 - MW 4999 can be addressed as words (MW xxxx) or also as single
bits, (Mxxxx,yy) or as entire MIxxxx .
In case the processes are less than 20, the variables that otherwise would be dedicated to the concerning process are available, like the user M, MW or MD variables.
The operations that can be executed on the M RACK must follow the rules described in this manual
3-16 10 Series CNC WinPLUS Application Manual (03)
MW0
MW6949 MW6950
MW7099 MW7100
MW7249
I/O Processor /System Data Areas
RAM Memory of I/O processor
M and MW user variables (Bit and/or Int)
M RACK of the Process 20
M RACK of the Process 19
Chapter 3
150
……
MW9800
MW9949 MW9950
MW9999
……
M RACK of Process 1
M RACK Global variables
Fig. 3-3 MW variables memory area
50
10 Series CNC WinPLUS Application Manual (03) 3-17
Chapter 3
I/O Processor /System Data Areas
MD1949 MD1950
MD1999 MD2000
MD2049
MD0
RAM Memory of the I/O processor
MD user variables (Double)
MD RACK of Process 20
MD RACK of Process 19
50
……
MD2900
MD RACK of Process 1
MD2949 MD2950
MD RACK Global variables
MD2999
Fig. 3-4 Memory area of MD variables
……
50

A VARIABLES

1500 string type variables (A0…A1499). These variables are loaded when bootstrapping starting from file ASCIIFILE.TXT.
Each variable can contain a string that can be maximum 40 characters long. The format of how to set them up in the file is shown in the following example:
EG A20,20 User Message
3-18 10 Series CNC WinPLUS Application Manual (03)
Chapter 3
I/O Processor /System Data Areas

TABLES

In the DUAL PORT memory, 4 table are available:
AXES TABLE
TOOL TABLE
TOOL OFFSET TABLE
USER'S TABLE
These tables are persistent: once they are memorized they are not deleted when the system is switched on.
Axes Table
The axis table can contain up to 32 pages. Each page contains information regarding one specific axis. This information is divided into fields:
etc..
32
3
2
1
Fig. 3-5 Axes table (one page per axis)
10 Series CNC WinPLUS Application Manual (03) 3-19
Chapter 3
I/O Processor /System Data Areas
There is one page in the table for each configured axis (co-ordinate, point to point, transducer-only axis, spindle and virtual axis). The page number of an axis corresponds to its physical identifier as defined in the AMP configuration. The system supports up to 32 axes, so there are 32 pages in this table and 32 physical axes identifiers (1-32).
You can select one of the pages of the axis table with the physical axis identifier of the axis. If you only know the axis name ("X", "Y", etc. in the AXNAME field) and process (AXOWNER field), you can use the function A_TO_ID to find the corresponding physical identifier. The field AXOWNER defines which ambient actually controls that axis:
AXOWNER Meaning
5000H (20480T) point-to-point-axis or spindle (WinPLUS)
6100H (24832T) coordinated axis process 1
6200H (25088T) coordinated axis process 2
6300H (25344T) coordinated axis process 3
6400H (25600T) coordinated axis process 4
6500H (25856T) coordinated axis process 5
6600H (26112T) coordinated axis process 6
6700H (26368T) coordinated axis process 7
6800H (26624T) coordinated axis process 8
6900H (26880T) coordinated axis process 9
6A00H (27136T) coordinated axis process 10
6B00H (27392T) coordinated axis process 11
6C00H (27648T) coordinated axis process 12
6D00H (27904T) coordinated axis process 13
6E00H (28160T) coordinated axis process 14
6F00H (28416T) coordinated axis process 15
7000H (28672T) coordinated axis process 16
7100H (28928T) coordinated axis process 17
7200H (29184T) coordinated axis process 18
7300H (29440T) coordinated axis process 19
7400H (29696T) coordinated axis process 20
3-20 10 Series CNC WinPLUS Application Manual (03)
I/O Processor /System Data Areas
These are the fields and the formats for the axis table:
MNEMONIC CONTENTS FORMAT
Chapter 3
AXOWNER
AXNAME
AXORIG
----------
AXOFG92
AXTOFF
PRO_OFFS
TOT_OFFS
ORIG1
ORIG2
ORIG3
ORIG4
ORIG5
ORIG6
ORIG7
ambient 'owning' this axis
ASCII axis name
current origin offset value
reserved
current G92 offset value
current tool offset value (introduced from logic)
current total offset value applied from the process by use of
“h” (with tool offset introduced by “h”)
current total axis offset value (with tool offset introduced by
logic)
origin #1 value
origin #2 value
origin #3 value
origin #4 value
origin #5 value
origin #6 value
origin #7 value
short
short
double
double
double
double
double
double
double
double
double
double
double
double
double
ORIG8
ORIG9
ORIG10
ACT_ORIG
----------
origin #8 value
origin #9 value
origin #10 value
number of the enabled origin
reserved
double
double
double
short
short
The logic program should not normally need to directly address this table. For special applications in which you have to handle either G92 offset or tool offset in a different way, you can read or write table fields. To address a table field you must use the mnemonic for that field as given in the table above.
10 Series CNC WinPLUS Application Manual (03) 3-21
Chapter 3
A
I/O Processor /System Data Areas
The TOT_OFFS field contains the total offset value applied to the related axis. Its value is calculated as follows:
TOT_OFFS = AXORIG + AXOFG92 + AXTOFF
Any time the logic has to change an axis offset (i.e. G92), the following sequence of operations should be performed:
WinPLUS
Find axis identifier
_TO_ID
Memorize a new offset value
in required field (TBLPUT)
Calculate new total offset
(AXOFSET) (COMPOFF)
Bring new
offset to system
(NAXOFF)
END
Fig. 3-6 Axis Offset Activation Flowchart
3-22 10 Series CNC WinPLUS Application Manual (03)
Chapter 3
I/O Processor /System Data Areas
Tool table
The tool table consists of 250 pages. Each page contains information regarding one specific tool. This information is divided into fields:
3
2
1
Fig. 3-7 Tool table (one page per tool)
There are 250 pages in the table for up to 250 tools with tool magazine option; it is possible to assign 250 tools to one or more tool magazines (up to 10). You can access a page of the tool table with the page number (1-250) or if you use the TBLSRCD function also with the tool identification code. Since the data for a specific tool may be in any of the 250 pages, it is better to use the method which uses the TBLSRCD function.
10 Series CNC WinPLUS Application Manual (03) 3-23
Chapter 3
I/O Processor /System Data Areas
MNEMONIC CONTENTS FORMAT UNITS
TCODE
TOOLPOS
TFAMCOL
TOOLTYPE
TSTATUS
TCNTRL
MAXLIFE
REMLIFE
TUSER1
TUSER2
TUSER3
TUSER4
TOLOFNR
tool identification code
tool position info
reserved
tool type info
tool status
tool control word
initial life
actual life
user parameter 1
user parameter 2
user parameter 3
user parameter 4
pointer on the offset table page
double
short
short
short
short
short
double
double
double
double
double
double
short
--
nnnn
--
--
--
--
sec
sec
--
--
--
--
--
The TBLSRCD function/ function block/ macro can be used to find the page number of the tool table for a given tool identifier:
Fig. 3-8 The table search function block (double search)
In above function block the inputs “n_tab” e “n_field” define the Number of the table and the field to search. The input “srchaval” is connected to the searched tool id, the tool identifier as programmed in the part program. The inputs “n_start”and “n_stop” indicate the first and the last table page in which the input “srchval” is searched. Generally you will use 1 as the start index and the maximum number of tools as the stop index.
For example, you will use different ranges in case a tool table is subdivided in areas, each belonging to a single process.
3-24 10 Series CNC WinPLUS Application Manual (03)
Chapter 3
I/O Processor /System Data Areas
Tool offset table
The tool offset table consists of 300 pages. Each page contains all the information describing the dimensions of a tool. This information is divided into fields:
TACTL1
TCMAXL1
TCACTL1
TACTL2
TCMAXL2
TCACTL2
TDIAMETER
TCACDIAM
TORIENT
1
300
3
2
Fig. 3-9 Tool offset table (one page per offset)
The table contains 300 pages for 300 offset tools. This allows to define more offsets for a single tool. You can access a page of the tool offset table via the tool offset number corresponding to the page number (1-300). The tool offset number will be directly programmed into the part program using the "T" function or can be found in the last field of the tool table (TOLOFNR). Depending on the application type (milling, lathing or grinding), different fields of the tool offset table will be used.
10 Series CNC WinPLUS Application Manual (03) 3-25
Chapter 3
I/O Processor /System Data Areas
All table formats will be shown hereafter:
MNEMONIC CONTENTS MILL FORMAT
TACTL1
TACTL2
TCMAXL1
TCMAXL2
TCACTL1
TCACTL2
TDIAMETER
TCACDIAM
actual tool length
Current radius of toroidal tool
allowable tool length wear
Max. wear of toroidal tool radius
actual tool wear offset
Current wear of toroidal tool radius
actual tool diameter
actual tool diameter wear
double
double
double
double
double
double
double
double
Fig. 3-10 Mill Tool Offset Table
TACTL2
Fig. 3-11 TACTL2 Toroidal Tool radius
This function is activated by process variable TTR(a 1).
3-26 10 Series CNC WinPLUS Application Manual (03)
Chapter 3
I/O Processor /System Data Areas
MNEMONIC CONTENTS GRINDER FORMAT
TACTL1
TCMAXL1
TCACTL1
TACTL2
TCMAXL2
TCACTL2
TDIAMETER *
TCACDIAM
TORIENT
actual tool length 1 (wheel radius)
allowable tool length 1 wear
actual tool length 1 wear
actual tool length 2 (wheel width)
allowable tool length 2 wear
actual tool length 2 wear
actual wheel nose diameter
wheel nose diameter wear
orientation ( wheel orientation angle)
double
double
double
double
double
double
double
double
short
Fig. 3-12 Grinder tool offset table
10 Series CNC WinPLUS Application Manual (03) 3-27
Chapter 3
I/O Processor /System Data Areas
MNEMONIC CONTENTS LATHE FORMAT
TACTL1
TCMAXL1
TCACTL1
TACTL2
TCMAXL2
TCACTL2
TDIAMETER
TCACDIAM
TORIENT
actual tool length 1 (length in X axis)
allowable tool length 1 wear
actual tool length 1 wear
actual tool length 2 (length in Z axis)
allowable tool length 2 wear
actual tool length 2 wear
actual tool tip diameter
tool tip diameter wear
orientation ( tool tip orientation angle)
double
double
double
double
double
double
double
double
short
Fig. 3-13 Lathe tool offset table
NOTE:
The wheel nose radius resp. tool tip radius is internally (table) managed as a diameter.
The entry in the table editor is a radius.
3-28 10 Series CNC WinPLUS Application Manual (03)
User table
Chapter 3
I/O Processor /System Data Areas
USER1
USER2
USER3
USER4
3
2
1
100
Fig. 3-14 User table
The user table has 100 pages. Each page contains 4 "double" fields. You can read or write in this table with the page number (index) to select the page and the field name (USERn) to address the desired field. The use of the fields depends on the requirements of the application. The system never accesses this table.
One page of the table in detail:
MNEMONIC CONTENTS FORMAT
USER1
USER2
USER3
USER4
user variable 1
user variable 2
user variable 3
user variable 4
double
double
double
double
10 Series CNC WinPLUS Application Manual (03) 3-29
Chapter 3
I/O Processor /System Data Areas

WINPLUS VARIABLES SUMMARY TABLE

Syntax Type Format Number of elements
Ixx_yy Physical input Boolean 16*512 signals
Qxx_yy Physical input / from memory Boolean 16*512 signals
Oxx_yy Physical output Boolean 16*512 signals
IWxx / IIxx Physical input Word / Integer 512
QWxx / QIxx Physical input / from memory Word / Integer 512
OWxx / OIxx Physical output Word / Integer 512
Sxx_yy System status Boolean 500*8 signals
SWxx / SIxx System status Word / Integer 500
Gxx_yy Retentive global Boolean 16*256 signals
GWxx /GIxx Retentive global Word / Integer 256
GDxx Retentive global Double 64
Mxx_yy Global Boolean 16*10000 signals
MWxx /MIxx Global Word / Integer 10000
MDxx Global Double 3000
Axx Global String 1500 (40 char)
END OF CHAPTER
3-30 10 Series CNC WinPLUS Application Manual (03)
Chapter 4
CONFIGURATION OF FUNCTIONS
The user of the logic can use a “Configuration Rack” to enable the proper functions.
For each process there is a configuration variable and a strobe variable (variable where you send the acknowledge) of the different functions of the Part Program. These variables are listed in table 4-1.
Configuration
Configuration Strobe
Process 1 MW9800 MW9801
Process 2 MW9650 MW9651
Process 3 MW9500 MW9501
Process 4 MW9350 MW9351
Process 5 MW9200 MW9201
Process 6 MW9050 MW9051
Process 7 MW8900 MW8901
Process 8 MW8750 MW8751
Process 9 MW8600 MW8601
Process 10 MW8450 MW8451
Process 11 MW8300 MW8301
Process 12 MW8150 MW8151
Process 13 MW8000 MW8001
Process 14 MW7850 MW7851
Process 15 MW7700 MW7701
Process 16 MW7550 MW7551
Process 17 MW7400 MW7401
Process 18 MW7250 MW7251
Process 19 MW7100 MW7101
Process 20 MW6950 MW6951
Table 4-1 Configuration variables
10 Series CNC WinPLUS Application Manual (04) 4-1
Chapter 4
Configuration of functionalities
The indexes of variables MW and MD of RACK M related to each process can be calculated in the following way:
Index MW K = 9950 – (process n° * 150)
Index MD L = 2950 – (process n° * 50)
A functionality enabling is associated to each bit of a configuration variable. The bit position of the configuration and strobe variables is shown in the following table 4-2
Bit
0 Enable/Disable management of M functions
1 Enable/Disable management of S functions
2 Enable/Disable management of T functions
3 Enable/Disable management of consent to movement
4 Enable/Disable management of end of movement
5 Enable/Disable management of pseudo axes
6 Enable/Disable End of Block (EOB)
7 Enable/Disable management of RQP
8 Enable/Disable management of RQT
9 Enable/Disable management of TOU
10 Enable/Disable management of probing end of cycle
11 Enable/Disable management of GTS
12 Enable/Disable management of Program activation
SPG
13 Enable/Disable management of GTA
Fig. 4-2 Bit position of the configuration and strobe variables
Description
Enabling (bit =1) the functionality, the related RACK is available for the user (See chapter 5); therefore the configuration phase must be executed BEFORE any other operation on the RACKS.
NOTE:
All the variables of this Rack are reset when you bootstrap the system..
END OF CHAPTER
4-2 10 Series CNC WinPLUS Application Manual (04)
Chapter 5
A
LOGIC / SYSTEM COMMUNICATION
STRUCTURE OF THE PART PROGRAM RACK
A part program block can contain:
A single S function to control the spindle speed
A single T function to select the tool and offset which have to be used
up to 4 M codes for miscellaneous functions (prelude, postlude and expedite M codes are
supported)
up to 6 pseudo axes used to transfer information to the logic
up to 6 motion axes (for co-ordinated motion)
LOGIC SYSTEM COMMUNICATION
RACK
RACK
RACK
SYSTEM/LOGIC COMMUNICATION
RACK
RACK END.
CONS.
MOVEMENT
MOVEMENT
RACK
S FUNCTIONS
RACK M
RACK
RACK
M FUNCTIONS
T FUNCTIONS
PSEUDO
AXIS
RACK
RACK
LOGIC PROG.
RACK RACK RACK
END OF
BLOCK
SYSTEM
RQP
RQT
RACK RACK
END CYCLE
TOU
PROBING
RACK
GTS
RACK
CTIVATION
PROGR.
SPG
RACK
GTA
Fig. 5-1 Rack for SYSTEM/LOGIC communication
10 Series CNC WinPLUS Application Manual (04) 5-1
Chapter 5
Logic system communication
The system will write the data for each one of these part program information groups into the relative M RACK if this has been enabled in the configuration Rack by the WinPLUS programmer.
NOTE:
It is not necessary to enable all of the Racks.
If the system detects that one of these is not enabled, it will be assumed that the logic is not interested in that particular feature of the part program and, it will continue the execution of the block without updating the Rack data..
Even if they are optional, some RACKS like the M,S,T, functions, must be enabled so that the 10 Series CNC will execute the M codes, the spindle speed, and the tool management. correctly.
5-2 10 Series CNC WinPLUS Application Manual (04)
Chapter 5
Logic System Communication

THE PART PROGRAM INTERFACE RACKS

Each Rack of this group will be updated every time that an associated request is found in the part program.
The requests from part program (or MDI) can be:
Request Associated Rack
Programming of axes movement Movement consent, end of movement
Programming code M M functions
Programming code S S functions
Programming code T T functions
Programming pseudo axes Pseudo axes
End of the block End of Block (EOB)
inserting tool offset RQP
Inserting correction for tool wear RQT
Tool worn TOU
Completed probing cycle Probing end of cycle
Shared spindle activation GTS
Program activation Program Activation SPG
Programmed axis migration GTA
The task of these interface Racks is to allow the logic to manage the information that comes from the part program and to start actions related to them.
For each request, the system prepares the data at the specific Rack, activates a strobe to signal the presence of new data to the machine logic and then waits for the logic to acknowledge completion of the action. .(ACKSTROBE).
The system is left in a wait state until the acknowledgement is received, the wait state is then released and the associated strobe signal is disabled.
It is possible for the machine logic to release the suspended part program execution before the completion of the logic action, by sending the appropriate acknowledge. E.g. A T word might be acknowledged before the completion of a tool search, if the tool storage system is independent of the rest of the machine. In this case the logic would acknowledge the T strobe as soon as the new value was recognized.
NOTE:
All the functions that you will find in this chapter (functions M,S,T, consent to movement, end movement), are described assuming a sequential management of the request (e.g. fig. 5-2: the part program restarts execution only at the completion of the handling of the function).
10 Series CNC WinPLUS Application Manual (04) 5-3
Chapter 5
A
N
Logic system communication
SYSTEM
WAIT
Function emission
o
Set function?
Compile M RACK
Set Strobe
Start Event task If present
Reset Strobe
Manage answer
Yes
WAIT
CK_STROBE
From logic
Fig. 5-2 Synchronisation of the Part Program interface
5-4 10 Series CNC WinPLUS Application Manual (04)
Chapter 5
Logic System Communication
The use of the SEND and WAIT functions for synchronisation can produce some inhibits to the system if used during the management of the Part Program functions:
RQP RQT TOU GTA GTS
The problem can happen if the task that performs the SEND to the routines managing the functions in the list above also performs process applications (for example NC functions for position or status acquisition).
If they are wanted to use criterions of synchronism founded on WAIT and SEND it it is necessary to make sure that the task that sends the SEND doesn't perform any application toward the NC process. It is suggested that an ad hoc task is created that verifies the conditions of acceptance of the applications (e.g. possibility to use the in demand axes through GTA) and you effect the SEND to unhook the task applicant.
10 Series CNC WinPLUS Application Manual (04) 5-5
Chapter 5
Logic system communication
RACK
RACK END
MOVEMENT
RACK FUNCTIONS
M
CONSENT
TO
MOVEMENT
RACK PSEUDO AXES
PART PROGRAM
REQUESTS
TYPE OF REQUEST
RACK FUNCTIONS S
RACK FUNCTIONS T
RACK EOB
SYSTEM LOGIC INTERFACE
RACK M
RACK RQP
RACK
RQT
RACK
TOU
RACK
END CYCLE
PROBING
RACK
GTS
RACK
ACTIVATION
PROGR.
SPG
RACK
GTA
ACCEPT
CONSENT
MOV.
ACCEPT END MOV.
ACCEPT
FUNCTIONS
M
ACCEPT PSEUDO AXES
FUNCTIONS
ACCEPT
S
ACCEPT
FUNCTIONS
T
ACCEPT
FUNCTIONS
EOB
ACCEPT FUNCTIONS RQP
ACCEPT FUNCTION RQT
ACCEPT
FUNCTIONS
TOU
ACCEPT
COMPLETE
PROBING
CYCLE
ACCEPT
FUNCTIONS
GTS
RETURNS THE CONTROL TO
THE SYSTEM
Fig. 5-3 SYSTEM/LOGIC Interface: Interface part program Rack
ACTIVATION
PROGR.
SPG
ACCEPT
FUNCTIONS
GTA
5-6 10 Series CNC WinPLUS Application Manual (04)
Logic System Communication

SEQUENCE OF PART PROGRAM INFORMATION TRANSFER TO THE LOGIC

In point-to-point mode functions are sent to the logic in the following order:
Chapter 5
Fig. 5-4 Sequence of part program to WinPLUS information transfer
10 Series CNC WinPLUS Application Manual (04) 5-7
Chapter 5
Logic system communication

COORDINATED AXES

There are 9 possible motion axes in a process. 6 of the 9 axes can be programmed simultaneously in a single part program block. In the case of dual axes, up to 9 axes may be moving with only 6 axes programmed in the block. Each of the axes has a part program address (axis name) which must be defined in AMP. The numerical value which is programmed after that address (the position) is a (double precision) floating point number which has a format of 5.5 (5 figures before and 5 figures after the decimal point). There are two calls from the system to the logic related to co-ordinated axes motion:
Consent to motion
End of motion
Consent to move Rack
Warning Both this rack and the GTA rack share the same information and MW variables.
The “Consent to move” Rack data is always updated when the system encounters a block of axis movement during the execution of a part program,. When this happens the variable “motion consent strobe” is set to 1 while the data related to the axes in use is stored. The logic has to check if this axis is allowed to move. The axis motion will not be started until the logic responds with an acknowledge to the system. The inputs and outputs of this Rack are:
INPUT VARIABLES:
MW(K+5) Type of motion (short) MW(K+6) Type of fixed cycle (short) MW(K+7) mode (short)
KW(K+8) axis identifier of 1st configured axis (short) ……..
MW(K+16) axis identifier of 9th configured axis (short) MD(L) programmed feedrate (double)
MD(L+1) end position of 1st configured axis (double) …..
MD(L+9) end position of 9th configured axis (double)
OUTPUT VARIABLES:
MW(K+4) task return value (short)
To know how K and L are obtained see Chapter 4.
To acknowledge “consent to movement” to the system it is necessary to insert the following call in the user’s logic:
5-8 10 Series CNC WinPLUS Application Manual (04)
Chapter 5
D
D
G
Logic System Communication
G29
G28
G27
15 00
Fig. 5-5 Consent to move /type of move
15 00 Bit
G72 G73 G74
Fig. 5-6 Consent to move /type of canned cycle
Bit
XW 03
RAPID (G00)
LINEAR (G01)
CIRCULAR (G02, G03)
XW 04
G81 G82 G83 G84 G85 G86 RESERVE RESERVE G89
P-P BLOCK MAS BLOCK
15 00 Bit
XW 05
CONTUNOUS MANUAL JO INCREMENTAL JOG HOME RESERVED RESERVED JOG RETURN RESERVED RESERVED
Fig. 5-7 Consent to move/mode
10 Series CNC WinPLUS Application Manual (04) 5-9
Chapter 5
Logic system communication
Motion blocks
A motion block is a part program block or a group of part program blocks containing programmed axes motion from the actual point to the programmed end point without any commanded stop inside the motion.
A motion block can be:
an axes motion in G00
a programmed motion in G01, G02 or G03
a continuous path (profile) in G27 or G28. In this case the motion block may consist of more
than one part program block.
a fixed cycle (like G81, G83, etc.)
a fixed cycle like G84 or a part program block in G33
The system communicates with the logic at the beginning of a motion block by starting the “consent to move” routine in the interface system-logic Rack. At the end of the motion block the system will communicate to the logic “Block end” through the strobe bit “end of motion request” of the “Interface system-logic” Rack (motion end).
If there should be a continuous mode block, that would mean that the first block must contain all the axes that are part of this motion, even if this means repeating the current position. Only in this way can the system inform the logic about the axes involved in the motion block.
Example:
G 00 X 10 Y 10 Z 10
G 01 G 27 X 20 Y 20 Z 10 F 1000 <-- Z declared even if
MOTION X 30 no motion in this
BLOCK Y 30 pp block
Z 30
G 29 X 40 Y 40 Z 30
5-10 10 Series CNC WinPLUS Application Manual (04)
Chapter 5
Logic System Communication
Consent to move management
Every time a motion block is encountered, the system requests the consent of the logic, speciffies the axes involved, the type of motion, the end points and the programmed velocity on the profile. The maximum number of axes allowed in a process is 9.
SYSTEM
WAIT
Consent requets
To movement
No
Set
Function?
Si
Compile M RACK
Set Strobe
Start event task If present
Reset Strobe
Manage answer
Excute motion
WAIT
ACK_STROBE
Fig. 5-8 Diagram of end consent signals
10 Series CNC WinPLUS Application Manual (04) 5-11
Chapter 5
Logic system communication
End of motion Rack
The data of the “ End of motion ” Rack will be updated each time a motion block is completed; in and the “motion end strobe request” is set to 1.
The input and output variables of this Rack are:
INPUT VARIABLES:
MD(L+10) Tool life (reserved) double
OUTPUT VARIABLES:
MW(K+17) Return value short
K and L are calculated as shown in Chapter 4.
To send the answer “accept end of motion” to the system it is necessary to insert the following call in the user’s logic:
5-12 10 Series CNC WinPLUS Application Manual (04)
Chapter 5
g
Logic System Communication
End of motion management
At the end of a motion block the system will inform the logic. The logic will execute the correct action before releasing the system
SYSTEM
WAIT
End of motion
request
No
Set
function?
Yes
Compile M RACK
Set Strobe
Start event task If present
ACK_STROBE
Reset Strobe
Manage answer
Fig. 5-9 Diagram of end of motion signals
WAIT
from lo
ic
10 Series CNC WinPLUS Application Manual (04) 5-13
Chapter 5
Logic system communication

M FUNCTIONS

The M code followed by a number identifies an auxiliary function relating to the machine tool. In the 10 Series CNC the M code value must be a positive integer with up to 3 digits (0...999). The
programming format for the M code is therefore (M0.....M999). You can program up to 4 M codes in
a part program block.
M functions may have different characteristics, which must be specified in the AMP.
There are 3 types of M functions:
Prelude M functions are sent to the logic before axes motion
Expedite M functions are sent to the logic during axes motion
Postlude M functions are sent to the logic after axes motion
In prelude and postlude M function synchronisation between axes moves and execution of M's by the machine logic depends on:
how the accepted in continuous mode parameter has been configured
the type of motion (G27, G28 or G29)
Motion Code accepted in continuous mode = N accepted in continuous mode = Y
G27,G28 Not possible M function execution synchronised
with axes moves. No handshake required (the function is sent to the logic without interrupting program execution).
G29 M function execution synchronised
with axes moves. Handshake required (program execution interrupted as long as it is requested by the logic).
5-14 10 Series CNC WinPLUS Application Manual (04)
Chapter 5
Logic System Communication
M function rack
Each time a M function is encountered in the part program the “M function” Rack data is updated; the variable “strobe M prelude/postlude” is set to 1 and the other input data relating to the M are stored (type and code).
The logic must send an “accepting code M” answer using the special function so that the execution of the part program can continue.
In the case of M expedite functions the value of M function is updated in the “Expedite M code emitted” rack
The input variables of this Rack are:
INPUT VARIABLES:
MW(K+19) type of M code (short) MW(K+20) decimal value of code M (short) MW(K+21) decimal value of M expedite (short )
OUTPUT VARIABLES:
MW(K+18) return value of routine (short)
Description:
The type (MW(K+19)) of code M can have the following values:
0 => code M prelude 1 => code M expedite 2 => code M postlude
NOTE:
When starting the machine these variables are homed. The logic must always send an answer to the system following code M through the function “accept M code ”.
To send the answer “accept M function ” to the system it is necessary to insert the following call in the user’s logic.
10 Series CNC WinPLUS Application Manual (04) 5-15
Chapter 5
Logic system communication
The data associated with the M codes are passed to the “M Functions” Rack in the same sequence as they are programmed in the part program block.
SYSTEM
WAIT
M Function
No
Compile M RACK
Start event task if present
Reset Strobe
Manage answer
Set function?
Yes
Set Strobe
WAIT
ACK_STROBE
from logic
Fig. 5-10 Manage code M (Prelude/Postlude)
The can acknowledge or refuse the M code request. If a certain M code is not allowed with the machine in a particular state, the logic can return a -1 value in the XW 00 variable. The system will go into error status. Another reason to refuse an M code could be a mechanical problem during its execution.
When a RESET coincides with the execution of an M code, the logic must send an acknowledgement to the system anyway. The logic may decide to abort or to continue the further execution of the M code. Never forget to acknowledge a pending M code during a reset, as this will inhibit execution and prevent the reset from being completed. Note that the M code acknowledgement must be executed before the ENDRESE function may be called. For more details refer to the reset management. When a HOLD coincides with the execution of an M code, the system will not execute any further (MDI) M-codes, until it receives the acknowledge for the pending M code.
5-16 10 Series CNC WinPLUS Application Manual (04)
Chapter 5
Logic System Communication

M code management (EXPEDITE)

The system allows the use of only one expedite M function in each part program motion block.
Because there is no synchronisation for expedite functions, expedite M codes must be processed by the logic as fast as possible. The throughput of part program blocks containing an expedite function may be very high (block cycle time!). By making the execution as fast as possible, the risk of losing expedite M codes when working with a very low block time is minimized.
SYSTEM
WAIT
Expedite M function
No
Set function?
Yes
Compile MRACK
Manage answer
Fig. 5-11 Manage code M Expedite
10 Series CNC WinPLUS Application Manual (04) 5-17
Chapter 5
Logic system communication

AMP set up for M functions

Each M function allowed in the system has to be set up in the AMP software configuration program. The characterisation for M codes is used by the system when an M code is encountered in the part program. When an M code is programmed, which was not defined in AMP an error will occur.
This is the list of items which can be assigned to M codes in AMP:
Activation mode: PRELUDE / POSTLUDE / EXPEDITE
This attribute tells the system when to notify the logic about the M code. Prelude means before the motion of the block starts, postlude is after the motion of a block has finished and expedite means that the logic will be notified during the motion. (i.e. M03, spindle clockwise, will have the attribute prelude, M 06, change tool and tool offset, will be executed postlude)
Allowed in hold: Y/N
This attribute tells the system that the related M function can or cannot be executed and notified to the logic in the hold status. M06 is an example of a code which cannot be accepted in hold.
Visualisation: Y/N
This attribute defines whether or not the system will display the M code on the main screen.
Modal function: Y/N
This attribute refers to the display of an M code. If you declare the function modal, its code will also be displayed during all subsequent blocks. A non-modal function will only be displayed during the execution of the block it was programmed in. ( i.e. typically M03 is modal, M06 is not)
Display after reset: Y/N
This attribute tells the system if the display of the M code must be maintained after a reset. When set, the logic must also maintain the M function active, even if a reset occurs.
Force conditional blk/blk: Y/N
This attribute can be set true for postlude M functions only. When an M code with this attribute is executed and the system variable USO is set true, the system will go into "block by block" mode at the end of the block. The state of "USO" is defined in the "PART PROGRAM SETUP" menu. This attribute is normally used for the M01 (optional stop) code.
Force unconditional blk/blk: Y/N
This attribute can be set true for postlude M functions only. When an M code with this attribute is executed, the system will go into "block by block" mode at the end of the block containing the M code. This attribute is normally used for the M00 (programmed stop) code.
5-18 10 Series CNC WinPLUS Application Manual (04)
Block calculation stop: Y/N
This attribute can be set true for postlude M functions only. When an M code with this attribute is executed, the pre-calculation of the next part program block is stopped. In this status, the system can accept other motion commands from the logic, like MDI or subroutine calls (i.e. to execute a M60 pallet change with motion of the co-ordinate axes). The normal part program execution after a block calculation stop can be resumed with the PPRESUME function call.
Tool offset change: Y/N
This attribute can be set true for postlude M functions only. When an M code with this attribute is executed, the system will be prepared for a change of the tool offset. It must always be combined with "block calculation stop=Y". This attribute is normally used for the M06 tool change M code.
Reset after execution: Y/N
This attribute can be set true for postlude M functions only. When an M code with this attribute is executed, the system will automatically perform a RESET at the end of the block. Normally this attribute is used for codes like M02 or M30 (program end).
Chapter 5
Logic System Communication
10 Series CNC WinPLUS Application Manual (04) 5-19
Chapter 5
Logic system communication
Display class: 0....15
This attribute tells the system how the M codes must be grouped for their display on the screen. For example the codes M03, M04 and M05 belong to the same group, are mutually exclusive and can be displayed in one screen position.
During their execution, M codes will appear on the screen in reverse video mode. In the moment in which the logic acknowledges the M code, the display of the M code will be returned to normal.
Update M RACK
Update M RACK
WinPLUS
WinPLUS
WinPLUS
Fig. 5-12 Display Class: Program S1000 M3 M4
5-20 10 Series CNC WinPLUS Application Manual (04)
Chapter 5
Logic System Communication
Search in memory class: Defines the priority for the emission of the M functions at the end
of the search in memory command. There are 16 classes of priority. The emission of M functions is carried out as follows:
- class 0 means that the M function will not be memorised
- at the end of the search the functions that have the lowest
class number will be emitted first.
Accepted in continuous mode: Y/N
This parameter specifies whether or not the M function may be programmed in continuous mode. It can be set to Y only for functions that do not require "forced block to block", "calculation stop", "offset change" or "reset".
10 Series CNC WinPLUS Application Manual (04) 5-21
Chapter 5
Logic system communication
Example:
M Prelude function
distinguish M code (max 4) in
no
SYSTEM
prelude, postlude, expedite
M postlude
with stop
calculation
M postlude with change of
M prelude
mode
Yes
yes
no
no
yes
calculation of
stop pre
Save change of mode request
stop pre calculation of mode
arresta pre calcolo del modo
write M code on display (reverse mode)
scrivi codice M sul video (modo reverse)
block
Yes
Other M
prelude
A
no
update function rack
aggiorna rack funzioni M
Cancel M code on display
no
Cancel reverse mode on display
Modal Mcancella su video codice M
annullo modo reverse della
visualizzazione
Fig. 5-13 Block chart of execution of Prelude M
WinPLUS Logic
Yes
5-22 10 Series CNC WinPLUS Application Manual (04)
Example:
M Expedite function
Chapter 5
Logic System Communication
no
write M code on display
update M rack data
A
expedite M
yes
WinPlus
Log
Logic
P
B
Fig. 5-14 Block chart of execution of Expedite M
10 Series CNC WinPLUS Application Manual (04) 5-23
Chapter 5
Logic system communication
Example:
Postlude M function
write M code on display (reverse mode)
update M rack functions
no
B
Postlude M
yes
Stop Pre-calculation block
no
WinPLUS
Logica
Logica
Logic
WinPlus
PLUS
END
Yes
enters in MAS state (S20_13)
PPRESUME executed
yes
Modal M
Yes
Another POSTLUDE M
yes
no
no
no
cancel M code on display
cancel reverse mode from display
C
5-24 10 Series CNC WinPLUS Application Manual (04)
Chapter 5
Logic System Communication
C
U S E
no
Force block/block Mode
yes
request new status
generate reset command
enter in IDLE (S20_13) status
END
FINE
Fig. 5-15 Flow chart of M Postlude execution
no
reset
10 Series CNC WinPLUS Application Manual (04) 5-25
Chapter 5
Logic system communication

PSEUDO AXES

Pseudo axes offer an easy-to-handle interface between the part program and the logic. The pseudo axes are part program addresses (like axes addresses) which can be used to transfer numerical information (in double precision floating point format) to the WinPLUS program. This information can be used by the logic to control analogue outputs or point-to-point-axes.
The part program addresses (axes names) of the pseudo axes must be defined in the AMP configuration utility. AMP will allow up to 6 addresses to be defined as pseudo axes. The names used must be different from the other axes names. The programming format for pseudo axes (like for normal axes) is 5.5 (five figures before the point and five figures after).
Pseudo axes rack
If the “Pseudo axes” rack is enabled (in the configuration Rack), the data of this Rack will be updated each time there is a Pseudo rack in the part program execution.
Correspondingly the variable ”Pseudo axes function strobe request” is set to 1 while the other input variables contain the data concerning the related axes.
The logic must send an answer “acknowledge programmed pseudo axes”, using the proper function, in order to continue the part program execution.
The input and output variables of this Rack are:
INPUT VARIABLES:
MW(K+23) axis identifier for the first configured pseudo axis (short)
..... .........
MW(K+28) axis identifier for the sixth configured pseudo axis (short) MD(L+11) programmed value for the first pseudo axis (double)
..... .........
MD(L+16) programmed value for the sixth pseudo axis (double)
OUTPUT VARIABLE:
MW(K+22) task return value (short)
To send the answer” acknowledge pseudo axes function” to the system it is necessary to insert the following call in the user’s logic:
5-26 10 Series CNC WinPLUS Application Manual (04)
Chapter 5
Logic System Communication
If the value of a pseudo axis identifier (one of the parameters from MW (K+23) to MW(K+28) is zero, then the corresponding pseudo axis is not programmed in that block. The sequence of the pseudo axes addresses in the words MW(K+23) to MW(K+28) is the same as that of the sequence configured in AMP.
Axes identifiers can have the following values:
Process 1 First axis
Second axis
..................
Sixth axis
Process 2 First axis
..................
Process 3 First axis
..................
Process 4 First axis
..................
Process 5 First axis
...............................
Process 6 First axis
...............................
Process 7 First axis
...............................
Process 8 First axis
...............................
Process 9 First axis
...............................
Process 10 First axis
...............................
Process 11 First axis
...............................
Process 12 First axis
...............................
Process 13 First axis
...............................
Process 14 First axis
...............................
Process 15 First axis
...............................
Process 16 First axis
...............................
Process 17 First axis
...............................
Process 18 First axis
...............................
Process 19 First axis
...............................
Process 20 First axis
...............................
Identifier = E100H (57600T) Identifier = E101H (57601T)
............
Identifier = E105H (57605T) Identifier = E200H (57856T)
............
Identifier = E300H (58112T)
............
Identifier = E400H (58368T)
............
Identifier = 0E500H (58624T)
...............................
Identifier = 0E600H (58880T)
...............................
Identifier = 0E700H (59136T)
...............................
Identifier = 0E800H (59392T)
...............................
Identifier = 0E900H (59648T)
...............................
Identifier = 0EA00H (59904T)
...............................
Identifier = 0EB00H (60160T)
...............................
Identifier = 0EC00H (60416T)
...............................
Identifier = 0ED00H (60672T)
...............................
Identifier = 0EE00H (60928T)
...............................
Identifier = 0EF00H (61184T)
...............................
Identifier = 0F000H (61440T)
...............................
Identifier = 0F100H (61696T)
...............................
Identifier = 0F200H (61952T)
...............................
Identifier = 0F300H (62208T)
...............................
Identifier = 0F400H (62464T)
...............................
10 Series CNC WinPLUS Application Manual (04) 5-27
Chapter 5
A
Logic system communication
SYSTE
WAIT
Pseudo
No
Set configuration?
Yes
Compile Psuedo axis
Set
WAIT
Start event task if present
CK_STROB
E
Reset
Manage
Pic. 5-16 Pseudo axes management
If there is a RESET command during the management of the Pseudo axes (that is in the interval of time in which the signal STROBE “Pseudo axes function request” is set), the answer to the system must be given immediately or anyway before calling the function ENDRESE.
5-28 10 Series CNC WinPLUS Application Manual (04)
Chapter 5
Logic System Communication

S FUNCTION

The part program uses the letter "S" as code for the spindle speed. The S function can be used to program the spindle speed in RPM or the workpiece surface speed. The units of the value programmed under S must be defined by the programmer of the logic (normally the surface speed is expressed in m/min or feet/min but for grinders also m/s and feet/s are used). If G97 is active, the spindle must be programmed in RPM. If G96 is active the programming of S is expressed as a peripheral speed in feet/min (constant surface speed)
The S word is a floating point number (double precision) with a programming format of "6.3", i.e. the number may have up to 6 significant digits before the decimal point and up to 3 significant digits after the decimal point. In this way the 10 Series CNC is able to support all kinds of spindles from large reaming heads up to high frequency spindles.
Rack of S functions
When an S function is programmed the variable “Notify S function” is set to 1 while the data concerning the speed is stored in the S Rack..
The logic must manage the associated value and send an acknowledgement to the system when the execution has been completed. The S function Rack is enabled by setting the appropriate variable of the configuration Rack. The input/output variables of this Rack are
INPUT VARIABLES:
MD(L+17) S function value as programmed (double) MD(L+18) SSL spindle speed limit value (double) MD(L+19) - In G96 mode:
S function value in the active measuring unit (mm or inch)
- In G97 mode: S function value as programmed (rpm)
MD(K+30) Spindle control G code 0 = G97 1 = G96 (short)
OUTPUT VARIABLES:
MD(K+29) task return value (short)
To send the answer “acknowledge function S” to the system it is necessary to insert the following call in the user’s logic:
10 Series CNC WinPLUS Application Manual (04) 5-29
Chapter 5
Logic system communication
The value of MD(L+19) can be used directly as an input parameter in functions: SG96RPM or SG97RPM. With SG96RPM it is normally assumed that S is programmed in m/min (G71) or Feed/min (G70). Should other measure units be used such as Feed/s or m/sec, the appropriate conversions must be made in the logic program starting from the programmed speed value MD(L+17).
Handling the percentage spindle speed override (SS0) is one of the machine logic tasks. Two methods are available to the logic user for handling these variations (for example, after the relevant softkeys are pressed): check any variation recorded in the value of variable S_nSS0 (SW37) by comparing the current value with the previously stored one
In both cases, the value of SS0 is given by the value, multiplied by 100.
SS0 Value value %
0
1000
10000
The value obtained can be given as in input to function SG96RPM or SG97RPM.
Example:
SSO 1000 (10%) SPINDLE SPEED 1500 RPM
New Spindle Speed value =
1500
1000
10000
0
10
100
150 revolution / min×=
[]
5-30 10 Series CNC WinPLUS Application Manual (04)
SYSTE
A
No
Configured ?
Compile S
Set
Strobe
Start event task if present
Reset
Chapter 5
Logic System Communication
WAIT
S function
Si
WAIT
CK_STROB
E
from logic
Manage
answer
Pic.5-17 Management of S function
NOTE:
The spindle speed is displayed on the screen with two values:
Programmed speed (S programmed)
Actual speed:
spindle with transducer
actual spindle RPM will be displayed
spindle without transducer the displayed spindle speed will be calculated by the system from the programmed value,
the spindle speed override percentage, the SSL and the active G code.
10 Series CNC WinPLUS Application Manual (04) 5-31
Chapter 5
Logic system communication
After the execution of an S function, the logic must send an acknowledgement to the system. In case of a reset during the execution of this routine, the acknowledgement should be given immediately. What happens to the spindle in case of a reset depends on the type of application.
The system must be released before you can use the function call $ENDRESE. For more details on RESET please refer to the "RESET" chapter.
Fig. 5-18 Flow chart of S value in the logic
NOTE:
The above figure does not take into consideration the value of SS0.
5-32 10 Series CNC WinPLUS Application Manual (04)
Chapter 5
Logic System Communication

T FUNCTION

The T part program function is used to transfer up to two values to the logic. The first value is the tool identification code, a positive integer number of up to 12 digits, which is handled using the "double" format. The second value is the tool offset number. This is a positive integer number with a "short" format. Its range is 0..300. Values, tool identification and offset number must be separated by a point "." character when using the T code in the part program.
The programming format for the T word is therefore
Txxxxxxxxxxxx.yyy
The tool identification code is used to determine the tool table page where the required data can be found. Page identification can be done in two ways:
programmed tool identifier corresponds to the page number (T250)
tool identifier is a value that allows correct page to be found
The following descriptions are valid for both cases except for the tool table search that is valid only for the second case.
It is possible to express 6 types of T function representation, each with a different meaning.
T xxxxxxxxxxxx (only tool id code xxxxxxxxxxxx)
Insert a new tool. The logic has to search in the tool table for the programmed tool id. Once it has found the page that contains the tool, it must read the tool offset number (TOLOFNR) from the same page, change the tool and activate the offset. Normally a tool change M code is used in the part program (typically M06) to physically execute the tool change and to activate the offset.
T 12345
n + 2
n + 1 n
67
TCOD E TOLOFNR
12345 67
Tool Offset Table
69
68
Tool offset # 67
Tool Table
Fig. 5-19 Search for programmed tool and offset
10 Series CNC WinPLUS Application Manual (04) 5-33
Chapter 5
Logic system communication
T .yyy or T 0.yyy (only tool offset number yyy)
Activate a new tool offset for the actual tool in the spindle. The logic uses the tool offset number as a pointer to the tool offset table. The tool offset number is the page number containing that offset. You can use a tool change M code like M06 in the part program to tell the logic to activate this offset.
T .67
Tool Offset Table
69
68
67
Tool offset # 67
Fig. 5-20 Search for the offset number
T xxxxxxxxxxxx.yyy (tool id code xxxxxxxxxxxx + offset number yyy)
Insert a new tool. The logic has to search in the tool table for the programmed tool id. It must then use the programmed tool offset number to activate the required offset. On a tool change M code in the part program (typically M06), the logic has to change the tool and to activate the offset.
T 12345.67
Tool Table
n + 2
n + 1 n
67
TCODE TOLOFNR
12345
Tool Offset Table
69
68
Tool offset # 67
33
Fig. 5-21 Programmed tool and tool offset
5-34 10 Series CNC WinPLUS Application Manual (04)
T xxxxxxxxxxxx.0 (tool id code xxxxxxxxxxxx without tool offset)
Insert a new tool in the spindle. The logic has to search in the tool table for the programmed tool id. The tool offset has to be forced to a zero value.
T 12345.0
Tool Table
n + 2
n + 1 n
TCODE TOLOFNR
12345
33
Fig. 5-22 Programmed tool without offset
T .0 (remove actual tool offset)
The logic has to set the tool offset to a zero value. The tool remains in the spindle.
T 0 or T 0.0 (remove actual tool and tool offset)
Chapter 5
Logic System Communication
The logic has to set the tool offset to a zero value. The tool must be removed from the spindle.
T function Rack
The data of the “T function” Rack is updated every time a T function is encountered in a part program block. When this happens the variable “emitted T function” is set to 1 while the data associated with the tool is stored in the other input variables. The logic must manage the parameters that are present in the Rack. The “T function” Rack is enabled by setting the appropriate variable in the configuration Rack.
The input and output variables of this Rack are:
INPUT VARIABLES:
MW(K+32) Tool control word (short) MW(K+33) Tool offset number (short) MW(K+34) Number of axes for offset (1-2) (short) MW(K+35) identifier of first axis (short) MW(K+36) identifier of second axis (short) MW(K+37) Slave tool number (short) MD(L+20) Tool identification code (double) MD(L+21) reserved (double) MD(L+22) cosine for first axis' offset (double) MD(L+23) cosine for second axis' offset (double)
OUTPUT VARIABLES:
MW(K+31) task return value (short)
10 Series CNC WinPLUS Application Manual (04) 5-35
Chapter 5
Logic system communication
To send the answer “accept T function” to the system it is necessary to insert the following call in the user’s logic:
Description:
The tool control word MW(K+32) tells your logic how it should handle the information from the MW variables. Twelve programming modes are available, 6 monotool type and 6 multitool. The possible values for the control word in monotool mode are:
1 - T (tool identifier) change tool/offset from table
2 - T (tool identifier).(offset number) change tool but use specified offset
3 - T (tool identifier).0 change tool but no offset
4 - T .0 remove tool offset
5 - T 0 or T 0.0 remove tool and offset
6 - T .(offset number) or
T 0.(offset number) leave tool but change offset
Refer to Fig. 5.24, which shows how these cases are managed by the system.
The values for the control word in multitool mode range from 11 to 16. The essential difference between the two programming types is that in multitool mode the value of control word MW(K+37) is the number of slave tools specified in the T function.
The variable XW 04 contains the number of the offset (= page number of the tool offset table) which has to be applied or a zero value if no offset was programmed.
The variable MW(K+33) contains the offset number (corresponding to the page number of the tool’s offset) that must be applyed, or an 0 value, if no offset has been programmed.
MW(K+33) has no meaning in case 1.
MW(K+34) tells the logic program whether the offset has to be applied to one or two axes. The identifiers of the axes are supplied in MW(K+35) and MW(K+36).
The value of MW(K+37) can be used in multitool programming with the TOOL_RD F. B. required for reading the value of the slave tools programmed in the T function.
The variable MD(L+20) contains the tool identification code as programmed in the active part program block. This code is a number of up to 12 digits, which must be used in conjunction with the function TBLSRCD to find the page of the tool table containing this tool's data.
5-36 10 Series CNC WinPLUS Application Manual (04)
Chapter 5
A
Logic System Communication
The variables MD(L+22) and MD(L+23) finally pass a cosine value for each one of the axes involved in the tool offset. This cosine value has to be multiplied with the tool length offset for that axis as read from the tool offset table. The 1.0 and 2.0 versions of the control support only 2 values, either 1.0 or -1.0. If you want to use the standard offset handling, you have to pass these two cosine values to the function TOOLACT .
SYSTEM
WAIT
T
No
Set configuration?
Si
Compile T
Set
Start event task if present
Reset
Manage
Fig. 5-23 Management of T code
WAIT
CK_STROB
E
from logic
10 Series CNC WinPLUS Application Manual (04) 5-37
Chapter 5
Logic system communication
Pic.5-24 Example of of T code execution with POCKET search
5-38 10 Series CNC WinPLUS Application Manual (04)
Pic.5-25 Execution of M06 new tool offset
Chapter 5
Logic System Communication
10 Series CNC WinPLUS Application Manual (04) 5-39
Chapter 5
Logic system communication

END OF BLOCK RACK

The end of block Rack (EOB) is enabled by setting the appropriate variable in the configuration Rack. When it is active, the EOB management will be called at the end of each motion block, after the last postlude M code. This function is the last opportunity for the logic program to prevent the execution of the following part program block and offers the possibility of changing the system mode of operation.
The application of this routine is for tool status and tool life monitoring where the logic can automatically create a block calculation stop when it needs to change a broken or worn tool with an equivalent sister tool.
To enable the End of Block call, the logic must notify the system using the system function call PREC_OFF. In case of point-to-point, while in addition with G27 or G28 execution the # character must also be put in the block where the end of execution calculation is to be stopped In the EOB routine the logic can check the prerequisites for part program continuation and send an answer to the system (proceed with next block / stop program execution).
The input and output variables of this Rack are:
INPUT VARIABLES:
None
OUTPUT VARIABLES:
MW(K+98) MW(K+98)= 0 The system will proceed with the execution of the next block
MW(K+98) = -1 The part program execution is stopped. The system goes into
"MAS +IDLE" status.
When the system is in "MAS + IDLE" status, the logic can send new values for tools offset via ACTOFFS function.
In order to exit the "MAS" status the logic must activate the PPRESUME function.
To send the answer “accept EOB function” to the system it is necessary to insert the following call in the user’s logic:
5-40 10 Series CNC WinPLUS Application Manual (04)
Loading...