10 Series CNC
WinPLUS
Application Manual
Code: 45006862V
Rev. 03
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: January 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.
10 Series CNC WinPLUS Application Manual
SUMMARY OF CHANGES
General
This issue completely replaces the previous ones.
PAGE |
UPDATE TYPE |
|
INDEX |
Updated |
|
Chapter 2 |
Updated entire chapter |
|
Chapter 3 |
||
|
||
Page 2 |
Added system variable SW0 bit S_RESET |
|
Page 3 |
Added management modalities of system variable SW7 |
|
Page 27 |
Added table with mnemonic data for router |
|
Page 31 |
Added summary table with WINPLUS variables |
|
Chapter 5 |
Updated all the management schemes |
|
Chapter 6 |
Added note on feed, jog, speed commands |
|
Page 3 |
||
Chapter 7 |
|
|
Page 2 |
Added figure on emergency management and OEM softkeys |
|
Chapter 8 |
|
|
Page 6 |
Added error 0X0171 |
|
Chapter 12 |
|
|
Page 5 |
Changed errors returned from RIO EC for bytes 0 ,2 , 8-9, 10-15 |
|
Page 6 |
Added note |
|
Pages 8-9 |
Added new errors returned at CNC start-up |
|
Chapter 13 |
|
|
Page 6 |
Added note |
|
Chapter 14 |
Added new chapter on PROFIBUS |
10 Series CNC WINPLUS Application Manual (03)
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 (03) |
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. |
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 (03) |
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 (03) |
3 |
Preface
10 Series CNC WinPLUS Application Manual
END OF PREFACE
4 |
10 Series CNC WinPLUS Application Manual (03) |
Indice
10 Series CNC WinPLUS – Application Manual
SYSTEM - APPLICATION LOGIC HANDSHAKE
THE LOGIC INTERFACE BUFFER – THE M RACK ..................................................... |
1-1 |
SYSTEM FUNCTION CALLS ......................................................................................... |
1-2 |
COMMON DATA AREAS ............................................................................................... |
1-2 |
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 |
ANALISYS OF RACK M ................................................................................................. |
2-3 |
TASK SYNCRONISATION ............................................................................................. |
2-3 |
BACKGROUND EXECUTION ........................................................................................ |
2-9 |
WINPLUS TASK DECLARATION .................................................................................. |
2-12 |
I/O PROCESSOR /SYSTEM DATA AREAS
SYSTEM STATUS FLAGS.............................................................................................. |
3-2 |
PROCESS STATUS FLAGS........................................................................................... |
3-7 |
USER DEFINED / GLOBAL VARIABLES (G VARIABLES).......................................... |
3-16 |
M VARIABLES ................................................................................................................ |
3-17 |
A VARIABLES................................................................................................................. |
3-19 |
TABLES........................................................................................................................... |
3-20 |
Axes Table............................................................................................................. |
3-20 |
Tool table ............................................................................................................... |
3-24 |
Tool offset table ..................................................................................................... |
3-26 |
User table .............................................................................................................. |
3-30 |
WINPLUS VARIABLES SUMMARY TABLE.................................................................. |
3-31 |
CONFIGURATION OF FUNCTIONALITIES
10 Series CNC WinPLUS – Application Manual (03) |
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-7 |
Consent to move Rack........................................................................................... |
5-7 |
Motion blocks ......................................................................................................... |
5-9 |
Consent to move management.............................................................................. |
5-10 |
End of motion Rack................................................................................................ |
5-11 |
End of motion management................................................................................... |
5-12 |
M FUNCTIONS ................................................................................................................ |
5-13 |
M function rack....................................................................................................... |
5-14 |
M code management (EXPEDITE) ........................................................................ |
5-16 |
AMP set up for M functions.................................................................................... |
5-17 |
PSEUDO AXES ............................................................................................................... |
5-25 |
Pseudo axes rack................................................................................................... |
5-25 |
S FUNCTION ................................................................................................................... |
5-28 |
Rack of S functions ................................................................................................ |
5-28 |
T FUNCTION.................................................................................................................... |
5-32 |
T function Rack ...................................................................................................... |
5-34 |
END OF BLOCK RACK................................................................................................... |
5-39 |
TOOL OFFSET PRESETTING RACK (RQP) ................................................................. |
5-41 |
TOOL OFFSET REQUALIFICATION (RQT)................................................................... |
5-44 |
DECLARE TOOL LIFE EXPIRED (TOU) ........................................................................ |
5-47 |
PROBING CYCLE COMPLETED (QUTAST) ................................................................. |
5-49 |
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
SYSTEM EMERGENCIES ............................................................................................... |
8-1 |
UNRECOVERABLE EMERGENCIES............................................................................. |
8-2 |
ii |
10 Series CNC WinPLUS – Application Manual (03) |
Indice
10 Series CNC WinPLUS – Application Manual
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 |
OSWIRE EMERGENCIES .................................................................................... |
8-12 |
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 |
STANDARD APPLICATION NOTES
WINPLUS INITIALIZATION ............................................................................................ |
10-1 |
MACHINE TOOL POWER UP AND RE-POWER UP AFTER E-STOP......................... |
10-2 |
HOLD MANAGEMENT.................................................................................................... |
10-6 |
RESET MANAGEMENT.................................................................................................. |
10-9 |
SPINDLE MANAGEMENT .............................................................................................. |
10-11 |
CO-ORDINATED AXES MOVES (MAS) FROM WINPLUS ........................................... |
10-13 |
HARDWARE OVERTRAVEL LIMIT SWITCHES ........................................................... |
10-18 |
AXES HOMING ............................................................................................................... |
10-21 |
FEED HOLD .................................................................................................................... |
10-24 |
ACTIVE RESET............................................................................................................... |
10-26 |
MANUAL JOG BY THE LOGIC ...................................................................................... |
10-31 |
FEED RATE OVERRIDE CONTROL.............................................................................. |
10-32 |
FEED RATE BYPASS..................................................................................................... |
10-33 |
SERIAL LINE MANAGEMENT (RS-232)........................................................................ |
10-35 |
AXIS POSITIONING VIA RS-232 SERIAL LINE ............................................................ |
10-37 |
Configuration ......................................................................................................... |
10-37 |
Programming ......................................................................................................... |
10-38 |
Installation Specifications ...................................................................................... |
10-41 |
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
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 |
10 Series CNC WinPLUS – Application Manual (03) |
iii |
Indice
10 Series CNC WinPLUS – Application Manual
ERRORS RETURNED DURING CNC POWER UP........................................................ |
12-7 |
SD180 CAN: Not all modules have been found on net .......................... |
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 ..................................................................................................................... |
100-1 |
END INDEX
iv |
10 Series CNC WinPLUS – Application Manual (03) |
Chapter 1
SYSTEM - APPLICATION LOGIC HANDSHAKE
Logic Buffer Interface
M Rack
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.
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 (03) |
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 (03) |
Chapter 2
Organisation of the Machine Logic Program
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.
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.
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.
10 Series CNC WinPLUS - Application Manual (03) |
2-3 |
Chapter 2
Organisation of the Machine Logic Program
SYSTEM CPU |
SYSTEM |
INFORMATION SEND TO LOGIC
|
|
|
|
|
|
|
|
PACK |
|
|
PACK |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|||||||
|
|
|
|
|
|
|
|
EMERGENCY |
|
OEM SOFTKEY |
|
|
|
|
|
|
|
|
|
|
|
PART |
|
|
|
|
|
|
|
|
|
|
|
|
PACK OF |
|
|
|
|
|
PROG. PACk |
|
|
|
|
|
|
|
|
|
|
|
REQUEST |
|
|
|
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||
|
INTERFACE |
|
|
LOGIC INTERFACE |
|
|
|
|
CONSENS |
|
|
||||||||
|
|
|
|
|
|
|
|
EVENT OF |
|
|
EVENT TASK OF |
EMERGENCY |
|
|
|
||
|
EMERGENCY |
|
|
|
|
INTERRUPT |
|
|
|
TEMPORIZED |
|
|
ROUTINE |
10 MS |
|
|
|
||
|
FOREGROUND |
|
|
ROUTINE |
|
|
|
BACKGROUND |
|
|
|
# 1 |
|
EVENT |
|
|
|
||
|
EVENT TASK |
P. P. |
|
|
|
||
|
PART PROGRAM |
|
|
ROUTINE |
|
EVENT |
|
|
CONSOLE |
||
BACKGROUND |
EVENT TASK |
||
|
|||
# 2 |
|
||
CONSOLE |
|
||
|
|
||
|
|
EVENT |
|
|
EVENT TASK |
SOFTKEY |
|
ROUTINE |
OEM |
||
SOFTKEY OEM |
|
||
BACKGROUND |
|
||
|
|
||
# 3 |
|
|
|
|
|
EVENT |
|
|
EVENT TASK |
LOGIC |
|
|
|
||
|
LOGIC |
|
Fig. 2-2 Routine scheduling
2-4 |
10 Series CNC WinPLUS - Application Manual (03) |
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 |
|
|
|
|
|
|
10 Series CNC WinPLUS - Application Manual (03) |
2-5 |
Chapter 2
Organisation of the Machine Logic Program
High priority |
I/O update |
|
|
|
Foreground Routine |
|
|
|
|
Emergency EventTask |
|
|
||
Event Task |
|
Event Task |
|
|
|
Console |
# 1 |
Console |
# 2 |
|
|
Event Task |
# 3 |
Event Task |
# 4 |
|
|
Console |
Console |
|
|||
Event Task |
|
Event Task |
|
|
|
Console |
# 5 |
Console |
# 6 |
|
|
Event Task |
# 7 |
Event Task |
# 8 |
|
|
Console |
Console |
|
|||
Event Task |
|
Event Task |
|
|
|
Console |
# 9 |
Console |
# 10 |
|
|
Event Task |
|
Part |
Event Task |
Part |
|
Program |
# 1 |
Program |
# 2 |
|
|
Event Task |
|
Part |
Event Task |
Part |
|
Program |
# 3 |
Program |
# 4 |
|
|
Event Task |
|
Part |
Event Task |
Part |
|
Program |
# 5 |
Program |
# 6 |
|
|
Event Task |
|
Part |
Event Task |
Part |
|
Program |
# 7 |
Program |
# 8 |
|
|
Event Task |
|
Part |
Event Task |
Part |
|
Program |
# 9 |
Program |
# 10 |
|
|
|
OEM softkey eventTask |
|
|
|
|
Routine background |
# 1 |
Routine background |
# 2 |
||
|
|
|
|
|
Task n°39 |
Routine background |
# 3 |
Routine background |
# 4 |
||
|
Logic event Task |
|
|
Task n°1 |
|
|
|
|
|
|
2-6 |
10 Series CNC WinPLUS - Application Manual (03) |
Chapter 2
Organisation of the Machine Logic Program
1 ms |
1 ms |
t |
10 ms |
10 ms |
|
I/O update |
|
= 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 |
1 ms |
t |
10 ms |
10 ms |
|
I/O update |
= 1 |
|
routine foreground |
routine background |
|
High priority routine |
|
Fig. 2-4 High Priority Interrupt Operation
10 Series CNC WinPLUS - Application Manual (03) |
2-7 |
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 |
Part Programm |
Consense |
|
|
request |
interface request |
request |
|
|
10 ms |
1 ms |
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.
2-8 |
10 Series CNC WinPLUS - Application Manual (03) |
Chapter 2
Organisation of the Machine Logic Program
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.
10 Series CNC WinPLUS - Application Manual (03) |
2-9 |
Chapter 2
Organisation of the Machine Logic Program
|
|
1.1 |
|
|
|
|
|
|
|
1° TICK |
|
2.1 2.1 |
|
|
|
|
|
|
|
2° TICK |
|
|
|
|
|
|
|
|
|
|
||
|
0.5 | 0.5 ms |
|
|
|
|
|
|
|
|
|
|
|
3.1 |
|
|
|
|
|
|
|
3° TICK |
|
|
1.2 |
|
|
|
|
|
|
|
4° TICK |
|
2.1 2.1 |
|
|
|
|
|
|
|
5° TICK |
|
|
|
|
|
|
|
|
|
|
||
|
0.5 | 0.5 ms |
|
|
|
|
|
|
|
|
|
|
|
3.2 |
|
|
|
|
|
|
|
6° TICK |
|
|
|
|
|
|
|
|
|
|
|
|
|
1.3 |
|
|
|
|
|
|
|
7° TICK |
|
2.1 2.1 |
|
|
|
|
|
|
|
8° TICK |
|
|
|
0.5 | 0.5 ms |
|
|
|
|
|
|
|
|
|
|
3.1 |
|
|
|
|
|
|
|
9° TICK |
|
|
1 ms |
|
|
|
|
|
|
|
|
0 |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 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:
2-10 |
10 Series CNC WinPLUS - Application Manual (03) |
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) |
|
|
|
10 Series CNC WinPLUS - Application Manual (03) |
2-11 |
Chapter 2
Organisation of the Machine Logic Program
To make sure that the various tasks are called correctly, they must be assigned the following names:
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.
NOTE: The max. number of tasks that can be loaded simultaneously is 40.
END OF CHAPTER
2-12 |
10 Series CNC WinPLUS - Application Manual (03) |
Chapter 3
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.
SYSTEM
Status of the system (s variables)
Status of the proces (s variables)
Defined by the user (G variables)
AXES Table
Non retentive |
|
|
TOOL Table |
retentive |
variables |
|
variables |
||
|
||||
|
|
|
OFFSET Table |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
USER Table |
|
|
|
|
|
|
Global |
APPLICATION |
|
M variables |
||
LOGIC |
||
|
|
Global |
|
global |
|
|
(M variables) |
|
|
|
|
USER area |
|
(variables G) |
|
Non retentive |
Physical inputs |
|
|
retentive |
variables |
(I variable) |
|
|
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
There are 500 system variables. They all have the short format. The first 20 variables (SW 00SW 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 |
|
|
|
reserved for future use |
|
|
|
|
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 |
|
Title: ACTIVATION STATUS |
|
|
|
||
|
S00_00 |
|
S_DONE |
Signal on 1 when all SW loading operations have been completed |
||||
|
|
|
|
|
satisfactorily. |
|
|
|
|
S00_14 |
|
S_RESET |
MW and MD variables reset request after logic Warm Start |
|
|||
|
|
|
|
|
|
|
|
|
|
S 00_15 |
|
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. |
|
|
|
|
R/W SYSTEM VARIABLE SW1 |
|
S_SECURLEV |
|||||
|
|
|
|
|
|
|
||
|
WORD |
|
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 |
|
|||
|
|
|
|
(see SECURITY chapter in User Manual) |
|
|
|
|
|
|
|
|
|
|
|||
|
R/O SYSTEM VARIABLE SW 02 |
S_CNINFO |
|
|
||||
|
|
|
|
|
|
|
||
|
BIT |
Title: NC state information |
|
|
|
|||
|
|
|
|
|
|
|
||
|
S 02,00 |
|
|
S_OVRT.00 |
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 |
|
|
|
|
S 02,01 |
|
|
S_AXES |
This indicates that the axes boards are ready to receive commands |
|
||
|
|
|
from the logic |
|
|
|
||
|
|
|
|
|
|
|
|
|
|
S 02,02 |
|
|
S_TUNING |
Flag correlated to OSWire. Shows that the CNC has shifted to |
|
||
|
|
|
TUNING modality for setup of OS3 drives. |
|
|
|||
|
|
|
|
|
|
|||
|
S 02,03 |
|
|
reserved |
|
|
|
|
|
up to |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
S 02,15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||
|
R/W SYSTEM VARIABLE |
SW 03 |
S_HLS1 |
|
||||
|
|
|
|
|
|
|
|
|
|
BIT |
|
|
Title: Home limit switches |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
S 03,00 |
|
|
S_HLS1.00 Home limit switch axis with ID 1 |
|
|
|
|
|
S 03,01 |
|
|
S_HLS1.01 Home limit switch axis with ID 2 |
|
|
|
|
|
through |
|
|
|
|
|
|
|
|
S 03,15 |
|
|
S_HLS1.15 Home limit switch axis with ID 16 |
|
|
|
|
|
|
|
|
|
|
|||
|
|
|
|
|||||
|
R/W SYSTEM VARIABLE |
SW 04 |
S_HLS2 |
|
||||
|
|
|
|
|
|
|
|
|
|
BIT |
|
|
Title: Home limit switches |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
S 04,00 |
|
|
S_HLS2.00 Home limit switch axis with ID 17 |
|
|
|
|
|
S 04,01 |
|
|
S_HLS2.01 Home limit switch axis with ID 18 |
|
|
|
|
|
through |
|
|
|
|
|
|
|
|
S 04,15 |
|
|
S_HLS2.15 Home limit switch axis with ID 32 |
|
|
|
|
|
|
|
|
|
||||
|
R/W SYSTEM VARIABLE SW 06 |
S_ESTOP |
|
|||||
|
|
|
|
|
|
|
|
|
|
BIT |
|
|
Title: Local E_Stop status |
|
|
|
|
|
|
|
|
|
|
|
||
|
S 06_00 |
|
|
S_ESTOP0 |
Status of first E_Stop (1 stands for contact closed) |
|
||
|
S 06_01 |
|
|
S_ESTOP1 |
Status of second E_Stop (1 stands for contact closed) |
|
||
|
S 06_04 |
|
|
S_ESTOP2 |
Status of third E_Stop (1 stands for contact closed) |
|
||
|
S 06_03 |
|
|
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 |
TITLE: Logic activation delay |
||
|
|
|
|
|
|
SW7 |
S_DELAY_BOOT Logic activation delay executed by either a “warm start” or a |
||
|
|
|
“cold start” (milliseconds) |
|
|
|
|
|
|
|
R/O SYSTEM VARIABLE SW 09 |
S_PROCSEL |
||
|
|
|
|
|
|
WORD |
|
Title: Selected process for operation |
|
|
SW 09 |
|
S_PROCSEL |
This word contains the number of the selected process. It is |
|
|
|
|
an integer in the range from 1 to 24. |
|
|
|
|
|
|
|
|
||
|
R/O SYSTEM VARIABLE SW 10 |
S_SCRNSEL |
||
|
|
|
|
|
|
WORD |
|
Title: Selected screen number |
|
|
|
|
|
|
|
SW 10 |
|
S_SCRNSEL |
This flag contains the number of the screen actually |
|
|
|
|
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 |
1 |
Logic main screen |
2 |
Large axes position |
3 |
Logic screen 1 (full) |
4 |
Logic screen 2 (full) |
5 |
Logic screen 3 (full) |
6 |
Logic screen 4 (full) |
7 |
Additional screen 1 |
8 |
Additional screen 2 |
9 |
Additional screen 3 |
10 |
Additional screen 4 |
11 |
Additional screen 5 |
12 |
|
|
R/O SYSTEM VARIABLE SW 11 |
S_UNITS |
|
|
|
|
BIT |
Title: Configured units (metric/inch) |
|
|
|
|
S 11_00 |
S_UNITS METRIC = 1 , INCH = 0 |
|
S 11_01 |
|
|
through |
reserved spares |
|
S 11_15 |
|
|
|
|
|
3-4 |
10 Series CNC WinPLUS Application Manual (03) |