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.
PAGEUPDATE TYPE
UPDATE
10 Series CNC WinPLUS Application Manual
INDEX
Chapter 2
Chapter 3
Page 2
Page 3
Page 27
Page 31
Chapter 5
Chapter 6
Page 3
Chapter 7
Page 2
Chapter 8
Page 6
Chapter 12
Updated
Updated entire chapter
Added system variable SW0 bit S_RESET
Added management modalities of system variable SW7
Added table with mnemonic data for router
Added summary table with WINPLUS variables
Updated all the management schemes
Added note on feed, jog, speed commands
Added figure on emergency management and OEM softkeys
Added error 0X0171
Page 5
Page 6
Pages 8-9
Chapter 13
Page 6
Chapter 14
10 Series CNC WINPLUS Application Manual(03)
Changed errors returned from RIO EC for bytes 0 ,2 , 8-9, 10-15
Added note
Added new errors returned at CNC start-up
Added note
Added new chapter on PROFIBUS
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 (03)1
Preface
10 Series CNC WinPLUS Application Manual
This manual is structured as follows:
Chapter 1explains the concepts of communication between the logic and the system.
Chapter 2gives 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 3deals with the data areas in the PLC module's memory and in its dual port.
Chapter 4explains the configuration of the interface between part program and logic.
Chapter 5explains the functions of the interface between the part program and the logic.
Chapter 6explains the configuration and the use of filters of executive commands.
Chapter 7explains the configuration of the emergency routines and of OEM softkeys.
Chapter 8describes management of emergencies.
Chapter 9 describes OEM softkey management.
Chapter 10this is the practical part of the manual which explains how to use the
communication concepts of the controls to create efficient applications.
Chapter 11this chapter describes how to use the INTERBUS feature on 10 Series systems.
Chapter 12this chapter describes how to use the CANOPEN feature on 10 Series systems.
Chapter 13this chapter describes how to use the OSWIRE feature on 10 Series systems.
Chapter 14Describes how to use the PROFIBUS function in Series 10 systems
Appendix Acontains 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)
210 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
410 Series CNC WinPLUS Application Manual (03)
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
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-210 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.
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-210 Series CNC WinPLUS - Application Manual (03)
Chapter 2
Organisation of the Machine Logic Program
ANALISYS 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.
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
PART
PROG. PACk
INTERFACE
LOGIC INTERFACE
ROUTINE
BACKGROUND
# 1
SYSTEM
PACK
EMERGENCY
PACK
OEM SOFTKEY
EVENT TASK OF
EMERGENCY
ROUTINE
FOREGROUND
EVENT TASK
PART PROGRAM
INFORMATION
SEND TO LOGIC
PACK OF
REQUEST
CONSENS
EVENT OF
EMERGENCY
INTERRUPT
TEMPORIZED
10 MS
EVENT
P. P.
ROUTINE
BACKGROUND
# 2
ROUTINE
BACKGROUND
# 3
EVENT TASK
CONSOLE
EVENT TASK
SOFTKEY OEM
EVENT TASK
LOGIC
Fig. 2-2 Routine scheduling
EVENT
CONSOLE
EVENT
SOFTKEY
OEM
EVENT
LOGIC
2-410 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
Console # 1
Event Task
Console
Event Task
Console
Event Task
Console
Event Task
Console
Event TaskPart
Program # 1
Event TaskPart
Program
Event TaskPart
Program
Event TaskPart
Program # 7
# 3
# 5
# 7
# 9
# 3
# 5
Event Task
Console
Event Task
Console
Event Task
Console # 6
Event Task
Console
Event Task
Console
Event TaskPart
Program # 2
Event TaskPart
Program
Event TaskPart
Program
Event TaskPart
Program # 8
# 2
# 4
# 8
# 10
# 4
# 6
Event TaskPart
Program # 9
OEM softkey eventTask
Routine background# 1Routine background# 2
Routine background# 3Routine background# 4
Logic event Task
Event TaskPart
Program # 10
Task n°39
Task n°1
2-610 Series CNC WinPLUS - Application Manual (03)
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
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
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.
2-810 Series CNC WinPLUS - Application Manual (03)
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.
10 Series CNC WinPLUS - Application Manual (03)2-9
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:
2-1010 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 190 ms
$BACK 230 ms
$BACK 360 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
WINPLUS TASK DECLARATION
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-1210 Series CNC WinPLUS - Application Manual (03)
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 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).:
Hereafter, all variables and their functions will be discussed in more detail.
R/W SYSTEM VARIABLE SW0S_CTRL
BIT
S00_00
S00_14
S 00_15
R/W SYSTEM VARIABLE SW1S_SECURLEV
WORD
Title: ACTIVATION STATUS
S_DONESignal on 1 when all SW loading operations have been completed
satisfactorily.
S_RESET MW and MD variables reset request after logic Warm Start
S_REBOOTSignal 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-210 Series CNC WinPLUS Application Manual (03)
Chapter 3
I/O Processor /System Data Areas
SW 01S_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 03S_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 04S_HLS2
BIT
S 04,00
S 04,01
through
S 04,15
R/W SYSTEM VARIABLE SW 06S_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
SW7S_DELAY_BOOT
R/O SYSTEM VARIABLE SW 09S_PROCSEL
WORD
SW 09S_PROCSEL This word contains the number of the selected process. It is
R/O SYSTEM VARIABLE SW 10S_SCRNSEL
WORD
SW 10S_SCRNSELThis 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 NAMESCREEN 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 11S_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-410 Series CNC WinPLUS Application Manual (03)
Loading...
+ 204 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.