osai 10 CNC ASSET Reference Manual

4.4 (9)

10 Series CNC

ASSET

Reference Manual

Code: 45004472R

Rev. 07

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-2006 by OSAI

All rights reserved

Edition: May 2006

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.

UPDATE

10 Series CNC ASSET – Reference Manual

SUMMARY OF CHANGES

General

This publication was issued together with the release of version 7.5.

CHAPTER

UPDATING TYPE

 

 

INDEX

updated

CHAPTER 3

 

Page 6

Changed description of “SCR - Screen Selection”

CHAPTER 4

 

Page 6

Changed description of “REA (RED) - Reading a file”

CHAPTER 5

 

Page 3

Changed description of “RTP – Reading the number of the programmed or

 

active tool”

10 Series CNC ASSET Reference Manual (07)

Preface

10 Series CNC ASSET – Reference Manual

PREFACE

This manual is intended for 10 Series CNC programmers.

It describes the standard language extensions provided with the ASSET option.

REFERENCES

This publication constitutes an extension of the 10 Series CNC standard programming language. Further information may be found in the other manuals of the 10 Series:

10 Series CNC Programming Manual

10 Series CNC User Manual

10 Series CNC AMP - SW Characterisation Manual

10 Series CNC PLUS Lybrary - User Manual

10 Series CNC PLUS Application Manual

10 Series CNC PLUS Language and PLUSEDIT

10 Series CNC ASSET Reference Manual (01)

1

Preface

10 Series CNC ASSET – Reference Manual

SUMMARY

1.General

This chapter provides an introduction to the ASSET language and lists the complete set of ASSET variables.

2.Input commands

This chapter discusses the commands that permit to define and handle manual data entry windows.

3.Screen management commands

This chapter discusses the commands used for configuring and handling configurable video screens.

4.File management commands

This chapter describes the ASSET commands used for opening, reading, writing, closing, deleting and saving ASCII files in the directory of programs.

5.Process management commands

This chapter deals with ASSET commands that permit to read process parameters such as current and programmed tool number, current and programmed tool offset number, process state, sub-state and mode, and axes coordinates.

6.Serial line management commands

This chapter describes the commands for management of the serial line: modes of configuration and operation of the triliteral functions for data reception/transmission.

7.Operating commands

This chapter describes the commands by way of which a process can be issued operating commands such as CYCLE ON, CYCLE OFF, HOLD, etc.

Appendix A - ASSET error messages

This appendix lists the error messages that may be displayed by the system when executing ASSET commands.

Appendix B - Error management from part program

This appendix contains information on how to manage certain types of error from the part program so as not to interrupt execution of the part program itself.

Appendix C - ASSET triliterals table

This appendix provides the complete list of ASSET triliteral functions.

2

10 Series CNC ASSET Reference Manual (01)

Preface

10 Series CNC ASSET – Reference Manual

WARNINGS

For correct use of the system, it is important to follow the indications given in the manual, and in particular those items marked: WARNING, CAUTION or IMPORTANT.

Indicating facts or circumstances that may cause damage to the system, items of equipment or operators.

Indicating information to be taken into consideration in order to avoid damage to the equipment in general.

Indicating operations to be carried out with particular care to ensure full success of the application.

10 Series CNC ASSET Reference Manual (01)

3

Preface

10 Series CNC ASSET – Reference Manual

END OF PREFACE

4

10 Series CNC ASSET Reference Manual (01)

Index

10 Series CNC ASSET - Reference Manual

INDEX

GENERAL

INTRODUCTION .............................................................................................................

1-1

VARIABLES ....................................................................................................................

1-3

User Table Variables .............................................................................................

1-4

PLUS Tables Variables .........................................................................................

1-5

Axes Table.............................................................................................................

1-6

Tools Table ............................................................................................................

1-7

Tool Offsets Table .................................................................................................

1-8

PLUS I/O..........................................................................................................................

1-9

Inputs (the first 85 arrays)......................................................................................

1-9

Inputs (after the 85th array) ...................................................................................

1-10

Outputs (the first 85 arrays)...................................................................................

1-11

Outputs (after 85th array) ......................................................................................

1-12

FILE .................................................................................................................................

1-13

ASCII files ..............................................................................................................

1-13

Binary files .............................................................................................................

1-14

COMMANDS ...................................................................................................................

1-15

LCK - Locking/Unlocking PLUS tables ..................................................................

1-16

INPUT COMMANDS

DIF - Definition of a data field ................................................................................

2-2

INP - Manual data input.........................................................................................

2-7

SCREEN MANAGEMENT COMMANDS

OUT - Screen line parameters...............................................................................

3-3

SCR - Screen selection .........................................................................................

3-6

FILE MANAGEMENT COMMANDS

OPN - Opening a file..............................................................................................

4-2

WRT - Writing a file................................................................................................

4-4

REA (RED) - Reading a file ...................................................................................

4-6

CLO - Closing a channel .......................................................................................

4-8

DEL (CAN) - Deleting a file....................................................................................

4-9

10 Series CNC ASSET Reference Manual (07)

i

osai 10 CNC  ASSET Reference Manual

Index

10 Series CNC ASSET - Reference Manual

INS - Saving an ASCII file in the directory of programs.........................................

4-11

CPY - Copy a file....................................................................................................

4-12

PROCESS MANAGEMENT COMMANDS

PRO - Definition of the default process .................................................................

5-2

RTP -Reading the number of the programmed or active tool................................

5-3

ROP -Reading the number of the programmed or active tool offset .....................

5-4

GPS -Reading the process state, sub-state or mode ............................................

5-5

RAP -Reading the axis coordinates.......................................................................

5-7

PLS -Reading PLUS SW variables ........................................................................

5-9

SERIAL LINE MANAGEMENT COMMANDS

SOP - Activate and configure the serial port..........................................................

6-2

GET - Data reception from serial line....................................................................

6-6

PUT - Data transmission on serial line .................................................................

6-8

SCL - Close the serial port.....................................................................................

6-10

EPS - Execute part program from serial line .........................................................

6-11

OPERATING COMMANDS

CON - CYCLE ON command.................................................................................

7-2

COF - CYCLE OFF command ...............................................................................

7-3

HON - HOLD ON command...................................................................................

7-4

HOF - HOLD OFF command .................................................................................

7-5

RES - RESET command........................................................................................

7-6

SMD - Set operating mode ....................................................................................

7-7

SAX - Select axis for manual movement ...............................................................

7-8

DIR - Direction of manual movements...................................................................

7-9

JOG - Jog step value .............................................................................................

7-10

FHO - Enable/Disable FEEDHOLD .......................................................................

7-11

ASSET ERROR MESSAGES

Description of messages and remedial action.......................................................

A-1

ERROR MANAGEMENT FROM PART PROGRAM

ERR - Enabling/disabling automatic error management from part program .........

B-2

Manual data input errors ........................................................................................

B-3

File management errors.........................................................................................

B-3

Locked table condition ...........................................................................................

B-4

Serial line management errors...............................................................................

B-4

ASSET TRILITERALS TABLE

List of the Asset Triliterals

...................................................................................... C-1

 

END OF INDEX

ii

10 Series CNC ASSET Reference Manual (07)

Chapter 1

GENERAL

INTRODUCTION

ASSET (Advanced Super Set Extension Tool) is a programming language that enhances 10 Series standard programming capabilities. It provides a set of instructions, variables and variables handling rules that facilitate customisation of 10 Series functions.

In particular, ASSET permits to:

create personalised video screens.

create data entry windows and personalise their size, position, graphic layout, background and foreground colors, and the number and length of the various data entry fields.

open, read, write and close ASCII files.

manage PLUS tables and read and/or write accessible parameters.

read and/or write PLUS I/O variables.

handle a series of process commands used for reading the process status, the axes position, the tool parameters, etc.

handle the serial line from part programs.

send out operating commands in emulation of the Front Panel/Teach Pendant.

These operations can be carried out by means of specific 3-letter ASSET codes or by writing in the program blocks the ASSET variables that provide access to parameters that are normally inaccessible to the programming environment. These commands can be given by the part program or entered from keyboard, i.e. written by the operator when the system is in MDI mode.

For example, ASSET can be used for programming a machining operation that needs to be automatically interrupted and kept on hold by the system until the operator fills in a given data entry window. Each ASSET command described in the manual is supplied with application examples.

10 Series CNC ASSET Reference Manual (06)

1-1

Chapter 1

General

Like all high level languages, ASSET must also be used by adequately trained personnel that are also well acquainted with the characteristics of the system. If inappropriate alterations are made to the system and logic parameters accessible via ASSET, serious system errors and malfunctions may occur.

ASSET instructions can be easily combined with the traditional 10 Series programming language. Actually, ASSET enhances 10 Series programming capabilities by making it possible for 10 Series commands to handle ASSET variables.

In addition to standard commands, functions and variables, ASSET uses 10 Series syntactic rules and conventions. For more information about these programming rules and conventions, please refer to 10 Series CNC Programming Manual.

1-2

10 Series CNC ASSET Reference Manual (06)

Chapter 1

General

VARIABLES

ASSET permits to write, read and alter any system variable, with the exception of those to which special restrictions apply. In doing so it applies the same syntactic rules and conventions as the standard 10 Series programming language. For more information about standard programming, please refer to Chapter 7 of 10 Series Programming Manual.

Here is a list of variables handled by ASSET:

Local variables: E and H.

System variables: SN and SC.

User variables: They are identified by an exclamation mark followed by a name. For example, !USER1. They can contain long real numerical formats and alphanumeric characters.

PLUS variables: They are identified by an @ followed by a name. For example, @PROG They can contain short, long or boolean numerical values.

User Table variables: They are identified by an L followed by a numerical index from 0 through 399 which indicates the table cell. The index-cell relationship will be discussed in a later chapter.

PLUS Table variables: They are identified by the $ character followed by the name given to the variable in the table and an index enclosed between brackets which provides the axes ID (axes table), the record number (tools table) or the tool offset number (tool offsets table).

Examples:

 

$AXORIG(2)

Identifies the current origin of the axis whose ID is 2 (read only)

$TSTATUS(25)

Identifies the condition of the tool stored in record 25 of the tools table

$TACTL1(125)

Identifies the current length of the tool stored in record 125 of the tools offset

 

table.

User Table and PLUS variables are described later in this chapter. For more information about local, system user variables, please refer to the following 10 Series documents: Programming Manual, Characterisation Manual, and PLUS Library Manual.

10 Series CNC ASSET Reference Manual (06)

1-3

Chapter 1

General

User Table Variables

The User Table (refer to Chapter 3 in the "PLUS Application Manual") has 100 records, each one of which is made up of 4 variables, for a total 400 variables. The variable index ranges from 0 to 399.

The records and the variables stored in them are arranged sequentially, as shown in the following table:

Record N°

Variable 1

Variable 2

Variable 3

Variable 4

 

 

 

 

 

000001

L0

L1

L2

L3

 

 

 

 

 

000002

L4

L5

L6

L7

 

 

 

 

 

000003

L8

L9

L10

L11

 

 

 

 

 

000004

L12

L13

L14

L15

 

 

...............

 

 

 

 

...............

 

 

 

 

 

 

 

000099

L392

L393

L394

L395

 

 

 

 

 

000100

L396

L397

L398

L399

 

 

 

 

 

To calculate the index when the position of the cell in the table and the variable are known, the following formula can be used:

Index = (Record Number - 1) x 4 + (Number of the variable in the record - 1)

For example, the index of the highlighted cell in the table is as follows:

Index = (4 - 1) x 4 + (3 - 1) = 14

To calculate the record number and the variable when the index is known, the following formula may be used:

Record = (Index / 4) + 1

Variable = [Remainder of (Index / 4)] + 1

For example, L145 addresses record 37 (145 / 4 + 1) and variable 2 (remainder of the division + 1 = 1 + 1).

1-4

10 Series CNC ASSET Reference Manual (06)

Chapter 1

General

PLUS Tables Variables

PLUS Tables include the Axes Tables, the Tools Tables and the Tools Offsets Tables. The contents of these tables are normally handled by the machine logic. Each PLUS Table is made up of a given number of pages which contain the parameters that describe the object of the table. The number of pages in each table is as follows:

Table

N° of Pages

Contents

 

 

 

Axes table

32

Axes identification

Tools Table

250

Record number in the table

Tool OffsetsTable

300

Tool offsets number

 

 

 

The table page number coincides with the index that follows the variable name.

The type, number and symbol of a parameter vary from table to table. The sections that follow illustrate a typical page of each table. For further information about these tables, refer to Chapter 3 of the "PLUS Application Manual".

The ASSET instruction LCK permits to write protect PLUS tables. When write protection is active, PLUS tables may be accessed only via ASSET. More information about the LCK triliteral is provided in the final section of this chapter.

Values read or written in PLUS tables using ASSET are not affected by the current unit of measure (G70/G71) but are considered as absolute values. It should be remembered therefore that any numeric values representing lengths are with reference to the machine's unit of measure configured in AMP; it is up to the operator to perform any conversion required.

10 Series CNC ASSET Reference Manual (06)

1-5

Chapter 1

General

Axes Table

Each of the 32 pages in this table is made up of 19 fields identified by a name, as shown in the example below. The index of each variable can range from 1 through 32 and corresponds to the axes ID. The index may be a numerical value or another variable.

Field

Type

Variable name

Format

Meaning

 

 

 

 

 

reserved

reserved

---

---

---

 

 

 

 

 

AXNAME

read only

$AXNAME(x)

S

axis name in ASCII

 

 

 

 

 

AXORIG

read only

$AXORIG(x)

D

value of current origin

 

 

 

 

 

reserved

reserved

---

---

---

 

 

 

 

 

AXOFG92

read only

$AXOFG92(x)

D

current G92 offset value

 

 

 

 

 

AXTOFF

read only

$AXTOFF(x)

D

current tool offset value

 

 

 

 

 

PRO_OFFS

read only

$PRO_OFFS (x)

D

total current corrector value

 

 

 

 

applied by the process when an 'h'

 

 

 

 

is enabled

TOT_OFFS

read only

$TOT_OFFS(x)

D

total offset of the current axis

 

 

 

 

 

ORIG1

read/write

$ORIG1(x)

D

value of origin # 1

 

 

 

 

 

ORIG2

read/write

$ORIG2(x)

D

value of origin # 2

 

 

 

 

 

ORIG3

read/write

$ORIG3(x)

D

value of origin # 3

 

 

 

 

 

ORIG4

read/write

$ORIG4(x)

D

value of origin # 4

 

 

 

 

 

ORIG5

read/write

$ORIG5(x)

D

value of origin # 5

 

 

 

 

 

ORIG6

read/write

$ORIG6(x)

D

value of origin # 6

 

 

 

 

 

ORIG7

read/write

$ORIG7(x)

D

value of origin # 7

 

 

 

 

 

ORIG8

read/write

$ORIG8(x)

D

value of origin # 8

 

 

 

 

 

ORIG9

read/write

$ORIG9(x)

D

value of origin # 9

 

 

 

 

 

ORIG10

read/write

$ORIG10(x)

D

value of origin # 10

 

 

 

 

 

reserved

reserved

---

---

 

 

 

 

 

 

x = page number or axis identification number S = short, D = double

Example:

To write into variable E1 the value of the current total offset of the axis identified by ID4, which is the sum of the axis origin, the G92 offset and the tool offset, key in the following instruction:

E1 = $TOT_OFFS(4)

To assign to the origin # 1 of the axis identified by ID 5 the numerical value 1.4, key in the following:

$ORIG1(5) = 1.4

1-6

10 Series CNC ASSET Reference Manual (06)

Chapter 1

General

Tools Table

Each of the 250 records of the table has 13 fields whose ID's are shown in the following diagram. Each variable can take an index from 1 to 250. They can be expressed by a number or an E parameter.

Field

Type

Variable name

Format

Meaning

 

 

 

 

 

TCODE

read/write

$TCODE(x)

T**

tool code

 

 

 

 

 

TOOLPOS*

read/write

$TOOLPOS(x)

S

Information regarding the tool position

 

 

 

 

 

TFAMCOL

read/write

$TFAMCOL(x)

S

reserved

 

 

 

 

 

TOOLTYPE*

read/write

$TOOLTYPE(x)

S

Information regarding the type of tools

 

 

 

 

 

TSTATUS

read/write

$TSTATUS(x)

S

tool status

 

 

 

 

 

TCNTRL

read/write

$TCNTRL(x)

S

tool control word

 

 

 

 

 

MAXLIFE

read/write

$MAXLIFE(x)

D

Initial life

 

 

 

 

 

REMLIFE

read/write

$REMLIFE(x)

D

real life

 

 

 

 

 

TUSER1

read/write

$TUSER1(x)

D

User variable # 1 for tool

 

 

 

 

 

TUSER2

read/write

$TUSER2(x)

D

User variable # 2 for tool

 

 

 

 

 

TUSER3

read/write

$TUSER3(x)

D

User variable # 3 for tool

 

 

 

 

 

TUSER4

read/write

$TUSER4(x)

D

User variable # 4 for tool

 

 

 

 

 

TOLOFNR

read/write

$TOLOFNR(x)

S

default tool offset number

 

 

 

 

 

x = page number or tool record number S = short, D = double

*= these fields of the table may have various meanings depending on the configuration and on how they are used by the machine logic (see the 10 Series User Manual for details).

**= integer number (max. 12 digits)

Example:

To read the code of the tool stored in record 35 key in the following function: (DIS, $TCODE(35))

To assign to the tool stored in record 42 a life equal to 500 cycles, key in the following:

$LIFETYPE(42) = 3

$MAXLIFE(42) = 500

10 Series CNC ASSET Reference Manual (06)

1-7

Chapter 1

General

Tool Offsets Table

Each of the 300 pages or tool offsets in this table is made up of 9 fields. Each field is identified by a name which is shown in the table below. Variable indexes range from 1 to 300. An index may be a numerical value or another variable.

Field

Type

Variable name

Format

Meaning

 

 

 

 

 

TACTL1

read/write

$TACTL1(x)

D

current tool length # 1

 

 

 

 

 

TCMAXL1

read/write

$TCMAXL1(x)

D

maximum offset for length # 1

 

 

 

 

 

TCACTL1

read/write

$TCACTL1(x)

D

current offset for length # 1

 

 

 

 

 

TACTL2

read/write

$TACTL2(x)

D

current tool length # 2

 

 

 

 

 

TCMAXL2

read/write

$TCMAXL2(x)

D

maximum offset for length # 2

 

 

 

 

 

TCACTL2

read/write

$TCACTL2(x)

D

current offset for length # 2

 

 

 

 

 

TDIAMETER

read/write

$TDIAMETER(x)

D

tool diameter

 

 

 

 

 

TCACDIAM

read/write

$TCACDIAM(x)

D

diameter offset value

 

 

 

 

 

TORIENT

read/write

$TORIENT(x)

S

tool orientation

 

 

 

 

 

x = page number or offset number S = short, D = double

Example:

If you want to supply the maximum requalification of the length # 1 of the corrector 137 with the value in the user # 3 variable in the Tool Table at record 35, write:

$TCMAXL1(137) = $TUSER3(35)

If the value of process variable TTR (Thoroidal Tool Radius) has been set or configured as 1, the fields relating to length # 2 are assumed to coincide with the size of the tool tip radius (in TCP and HSM applications).

1-8

10 Series CNC ASSET Reference Manual (06)

Chapter 1

General

PLUS I/O

PLUS inputs are arranged in 85 11-bit arrays followed by 427 16-bit arrays; outputs are arranged in 85 6-bit arrays followed by 427 16-bit arrays. Accordingly, a total of 7767 inputs and 7342 outputs has to be managed.

An array and its Input or Output are identified by an I or an O preceded by $ and followed by the bit index between brackets: $I(index) or $O(index), as in the User Table. For example, $I(35), $O(812).

The Input/Output arrays can be pictured as tables, as shown in the figures below.

Inputs (the first 85 arrays)

Arrays or groups of inputs may be numbered from 00 to 84, whereas the 11 bits in the array are numbered from 0 to 10. The index of the first input variable will be 0, whereas the index of the last input variable will be 934, as shown in the table below:

Array

bit 0

bit 1

bit 2

bit 3

bit 4

bit 5

bit 6

bit 7

bit 8

bit 9

bit 10

 

 

 

 

 

 

 

 

 

 

 

 

00

$I(0)

$I(1)

$I(2)

$I(3)

$I(4)

$I(5)

$I(6)

$I(7)

$I(8)

$I(9)

$I(10)

 

 

 

 

 

 

 

 

 

 

 

 

01

$I(11)

$I(12)

$I(13)

$I(14)

$I(15)

$I(16)

$I(17)

$I(18)

$I(19)

$I(20)

$I(21)

 

 

 

 

 

 

 

 

 

 

 

 

02

$I(22)

$I(23)

$I(24)

$I(25)

$I(26)

$I(27)

$I(28)

$I(29)

$I(30)

$I(31)

$I(32)

 

 

 

 

 

 

 

 

 

 

 

 

03

$I(33)

$I(34)

$I(35)

$I(36)

$I(37)

$I(38)

$I(39)

$I(40)

$I(41)

$I(42)

$I(43)

 

 

 

 

 

.........................

 

 

 

 

 

 

 

 

 

 

.........................

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

83

$I(913)

$I(914)

$I(915)

$I(916)

$I(917)

$I(918)

$I(919)

$I(920)

$I(921)

$I(922)

$I(923)

 

 

 

 

 

 

 

 

 

 

 

 

84

$I(924)

$I(925)

$I(926)

$I(927)

$I(928)

$I(929)

$I(930)

$I(931)

$I(932)

$I(933)

$I(934)

 

 

 

 

 

 

 

 

 

 

 

 

To calculate the index from the cell position, i.e. when the array and bit numbers are known, use this formula:

Index = array number x 11 + bit number

For example, to address bit 7 from array 03, the $I variable must be assigned the following index: Index = 3 x 11 + 7 = 40

The resulting variable will be $I(40), as shown in the table.

To calculate the array and bit numbers from the index, divide the index by 11: the ---- will be the array number and the remainder will indicate the bit number.

For example, the $I(172) variable will address the 15 (172 / 11) array and the 7 (172 - 15 x 11) bit.

10 Series CNC ASSET Reference Manual (06)

1-9

Chapter 1

General

Inputs (after the 85th array)

The numbering of the individual input arrays or input groups goes from 85 to 511; the 16 bits within an array are numbered from 0 to 15. In these conditions the index of the first input variable will be 935, the index of the last variable will be 7766, as can be seen from the table below:

Array

bit 0

bit 1

bit

bit

bit

bit

bit

bit

bit

bit

bit

bit

bit

bit

bit

bit 15

 

 

 

 

2

3

4

5

6

7

8

9

10

11

12

13

14

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

85

$I(935)

$I(936)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

$I(950)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

86

$I(951)

$I(952)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

$I(966)

 

 

 

 

 

 

 

..........................

 

 

 

 

 

 

 

 

 

 

 

 

 

 

..........................

 

 

 

 

 

 

 

Array

bit 0

bit 1

bit

bit

bit

bit

bit

bit

bit

bit

bit

bit

bit

bit

bit

bit 15

 

 

 

2

3

4

5

6

7

8

9

10

11

12

13

14

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

510

$I(7735)

$I(7736)

 

 

 

 

 

 

 

 

 

 

 

 

 

$I(7750)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

511

$I(7751)

$I(7752)

 

 

 

 

 

 

 

 

 

 

 

 

 

$I(7766)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The formula used to define an index starting from the position of the cell (i.e., the array number and the bit number), is as follows:

index = (array number – 85) X 16 + 935 + bit number

For example, if we want to address bit 13 in array 86 (i.e., the grey-coloured cell), the index of variable $I must be determined as follows:

Index = (86 – 85) X 16 + 935 +13 = 964

In this case, the variable will therefore turn out to be $I(964), as shown in the table. Conversely, if we want to determine an array and a bit, knowing the relative index, we must subtract 935 from the index and then divide the value obtained by 16. By adding 85 to the whole number determined in this manner, we get the array number, while the difference will identify the bit within the array. For example: for variable $I (7736) we get array 510 ((7736-935)/16+85) and bit 1 ((7736-935) / 16).

1-10

10 Series CNC ASSET Reference Manual (06)

Chapter 1

General

Outputs (the first 85 arrays)

Arrays or groups of outputs may be numbered from 00 to 84, whereas the 6 bits in the array are numbered from 0 to 5. The index of the first output variable will be 0, whereas the index of the last output variable will be 509, as shown in the table below:

Array

bit 0

bit 1

 

bit 2

bit 3

bit 4

bit 5

 

 

 

 

 

 

 

 

00

$O(0)

$O(1)

 

$O(2)

$O(3)

$O(4)

$O(5)

 

 

 

 

 

 

 

 

01

$O(6)

$O(7)

 

$O(8)

$O(9)

$O(10)

$O(11)

 

 

 

 

 

 

 

 

02

$O(12)

$O(13)

 

$O(14)

$O(15)

$O(16)

$O(17)

 

 

 

 

 

 

 

 

03

$O(18)

$O(19)

 

$O(20)

$O(21)

$O(22)

$O(23)

 

 

 

...................

 

 

 

 

 

....................

 

 

 

 

 

 

 

 

 

 

83

$O(498)

$O(499)

 

$O(500)

$O(501)

$O(502)

$O(503)

 

 

 

 

 

 

 

 

84

$O(504)

$O(505)

 

$O(506)

$O(507)

$O(508)

$O(509)

 

 

 

 

 

 

 

 

To calculate the index from the cell position, i.e. when the array and bit numbers are known, use this formula:

Index = array number x 6 + bit number

Examples:

1.To address bit 2 from array 03, the $O variable must be assigned the following index: Index = 3 x 6 + 2 = 20

The resulting variable will be $O(20), as shown in the table.

2.To calculate the array and bit numbers from the index, divide the index by 16: the integer value obtained through the division will be the array number and the remainder will indicate the bit number.

For example, the $O(214) variable will address the 35 (214/6) array and the 4 (214 - 35 x 6) bit.

10 Series CNC ASSET Reference Manual (06)

1-11

Chapter 1

General

Outputs (after 85th array)

The numbering of the individual output arrays or output groups goes from 85 to 511; the 16 bits within an array are numbered from 0 to 15. In these conditions the index of the first output variable will be 510, the index of the last variable will be 7341, as can be seen from the table below:

Ar

bit 0

bit 1

bit

bit

bit

bit

bit

bit

bit

bit

bit

bit

bit

bit

bit

bit 15

ray

 

 

2

3

4

5

6

7

8

9

10

11

12

13

14

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

85

$O(510)

$O(511)

 

 

 

 

 

 

 

 

 

 

 

 

 

$I(525)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

86

$O(526)

$I(527)

 

 

 

 

 

 

 

 

 

 

 

 

 

$I(541)

 

 

 

 

 

 

..........................

 

 

 

 

 

 

 

 

 

 

 

 

 

..........................

 

 

 

 

 

 

 

Ar

bit 0

bit 1

bit

bit

bit

bit

bit

bit

bit

bit

bit

bit

bit

bit

bit

bit 15

ray

 

 

2

3

4

5

6

7

8

9

10

11

12

13

14

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

510

$O(7310)

$O(7311)

 

 

 

 

 

 

 

 

 

 

 

 

 

$O(7325)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

511

$O(7326)

$O(7327)

 

 

 

 

 

 

 

 

 

 

 

 

 

$0(7341)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The formula used to define an index starting from the position of the cell (i.e., the array number and the bit number), is as follows:

index = (array number – 85) X 16 + 510 + bit number

For example, if we want to address bit 7 in array 86 (i.e., the grey-coloured cell), variable $O must be assigned the following index:

Index = (86 – 85) X 16 + 510 + 7 = 533

In this case, the variable will therefore turn out to be $O(533), as shown in the table. Conversely, if we want to determine an array and a bit, knowing the relative index, we must subtract 510 from the index and then divide the value obtained by 16. By adding 85 to the whole number determined in this manner, we get the array number, while the difference will identify the bit within the array. For example: for variable $O (680) we get array 95 ((680-510)/16+85) and bit 10 ((680-510) / 16).

1-12

10 Series CNC ASSET Reference Manual (06)

Chapter 1

General

FILE

10 Series ASSET can manage two types of files:

ASCII files

Binary (data) files

Except where otherwise stated, these files are located in default directory E:\FILE or F:\FILE, which ASSET can access. However it is also possible to read or write with ASSET in files belonging to other directories. In this case, the full pathname and extension of the file in question must be specified (e.g. E:\USER\FILE|FILE1.DAT).

These files are located in the E:\FILE or F:\FILE directories, which are accessible to ASSET. Their main characteristics are discussed in the sections that follow.

ASCII files

ASCII files may contain part programs, messages, etc. They are not formatted and have records of undefined length that must be written and read sequentially. ASCII files are given the .ASC extension by the system by default, in cases where the file was opened in read or write mode without the full pathname and extension being specified.

In an ASCII file it is not possible to read, write or search for a specific record. Maximum record length is 127 characters.

The system always starts reading an ASCII file from the first record, on which it positions automatically as it opens the file.

Writing an ASCII file means adding a new record after the last record in the file. To edit an ASCII file it is necessary to read it sequentially, make the necessary alterations and write a new file that will replace the old one.

10 Series CNC ASSET Reference Manual (06)

1-13

Chapter 1

General

Binary files

Binary files are formatted files that are used for storing the parameters managed by the system, i.e. variables, numbers, parameters, etc. Records have a fixed length that is declared when the first record is written. Binary files are given the .DAT extension by the system by default, in cases where the file was opened in read or write mode without the full pathname and extension being specified.

For example, to write into a file the tool code with the relevant TUSER1-4 user variables the binary file record will be as follows:

TCODE TUSER1 TUSER2 TUSER3 TUSER4

When the system writes the first record it automatically creates a header that is invisible to the user and defines the format of all the file records.

Binary file records can be searched for and addressed for reading and writing operations.

A record can be up to 300 bytes long.

To calculate the record length in bytes it is necessary to know the length of each of the variables stored in the record. This information is listed in the table below:

Variable

Length in bytes

Boolean

1

Byte

1

Short

2

Long

4

Real

4

Long Real (Double)

8

String

Number of characters in the string.

 

For example: SC0.4 --> 4 characters --> 4 bytes

 

 

Example:

if you write the following variables into a table:

(WRT,1,E1,E5,L3)

The record will occupy 24 bytes because there are 3 double variables and 3 x 8 = 24

For the following writing command:

(WRT,1,SC0.60,L5,"TEST")

the record length will be 72 bytes (60 + 8 + 4).

Unless otherwise specified in the reading or writing command, access to the file occurs at the first record for reading and after the last record for writing. After a record has been read or written the cursor will position to the subsequent record.

When reading or writing commands including ASSET binary files it is possible to declare a parameter that specifies the number of the target record.

1-14

10 Series CNC ASSET Reference Manual (06)

Chapter 1

General

COMMANDS

ASSET ensures full compatibility with the commands and instructions typical of the standard programming environment. For more information about parametric programming, please refer to Chapter 7 of the 10 Series Programming Manual.

Here is a list of syntactic and typographical conventions used throughout the manual:

The function name and the mandatory signs will be printed in boldface type. Mandatory parameters associated to a function will be indicated by an italicised mnemonics. Parameters may be enclosed between brackets.

[ ] Square brackets enclose optional parameters that may be omitted. Do not write these brackets into the block.

{} Graphs enclose parameters that are alternative to one another and are separated by a |. Do not write graphs into the block.

| The vertical bar is the separator between two alternative parameters. Do not write this bar into the block.

Parameters may be expressed by letters, alphanumeric characters and numbers. Letters are used as keys or to identify the characteristic of a command. Alphanumeric characters identify file and variable names and are used for messages. Numbers identify parameters, multiple elements, etc. Non significant zeroes can be omitted.

Example:

(OPN, channel, filename, {A|B}, {R|W})

The three-letter code, the commas and the brackets are mandatory. A is alternative to B and R is alternative to W.

The sections that follow describe ASSET functions. For each function the following information is provided:

Function name

Meaning

Syntax

Mandatory and optional parameters

Other characteristics and notes

Examples.

10 Series CNC ASSET Reference Manual (06)

1-15

Chapter 1

General

LCK - Locking/Unlocking PLUS tables

This instruction permits to inform the logic or other applications that the specified table is being edited and is not accessible to them. After the table has been edited it is necessary to give another LCK in order to indicate that the table is available.

Syntax:

(LCK, table number, {0 | 1})

where:

table number Is a number from 1 to 4 that identifies the write protected table. It can be expressed as a numerical value, a local variable or a system variable with the following mening:

1axes table (origins)

2tools table

3tool offsets table

4user table (L variables).

0 | 1 Write 1 to indicate that the specified table is write protected by ASSET. If the table is already reserved by another user, such as PLUS or Table Editor, an error message will be displayed:

NC270 PLUS Table already locked

This error can be managed from program by setting ERR = 1. For more information refer to Appendix B.

Write 0 to indicate that the table is no longer reserved for ASSET and can be accessed by other users.

Characteristics

$xxxxxx or L variables are always accessible and need not be write protected with ASSET. However, it is recommended to lock the table to make sure that no other user has access to the memory area written by ASSET.

Use LCK to unprotect a table only when it has been write protected from part program. Otherwise, you may unprotect a table that was reserved for other users (such as the machine logic).

1-16

10 Series CNC ASSET Reference Manual (06)

Chapter 1

General

Example:

The following example shows how to write variables into the Tools Table:

. . .

. . .

ERR = 1

enables error management from part program

"LOOP"

 

(LCK,2,1)

 

(GTO,LOOP,STE=45)

45 = write protected table; waiting for unlocking command

$TCODE(1) = 12

 

$TUSER1(1) = 3.45

 

$TCODE(2) = 13

 

$TUSER1(2) = 6.21

 

(LCK,2,0)

unprotected tools table

ERR = 0

disables error management from part program

. . .

 

. . .

 

10 Series CNC ASSET Reference Manual (06)

1-17

Chapter 1

General

END OF CHAPTER

1-18

10 Series CNC ASSET Reference Manual (06)

Chapter 2

INPUT COMMANDS

Input commands permit to create, customise and manage data entry windows. In particular, they make it possible to:

Define the labels of the data entry fields and the destination of input data;

Define the layout of the data entry window: window size and position, text position, etc.

Define the background, foreground and text colors.

The three-letter codes that allow to program these features are as follows:

DIF

INP

10 Series CNC ASSET Reference Manual (04)

2-1

Chapter 2

Input Commands

DIF - Definition of a data field

DIF permits to define the size and color of a data entry window that has been programmed with the INP command. It must be used when the characteristics to be configured are different from the default ones.

Syntax

(DIF, window number, first line, first column, first field line, first field column, empty lines, number of fields [,background color, text color, field color])

where:

 

window number

identifies a predefined window. It is an integer from 1 to 10. DIF,0 invokes the

 

default window, which cannot be modified.

first line

is the screen line where the data entry window starts. It is an integer from 0 to

 

18.

 

Line 19 is always reserved for error messages.

first column

is the screen column where the border of the window is positioned. It is an

 

integer from 0 to 79 which must obviously be selected according to the length of

 

the displayed data.

first field line

is the line occupied by the first window field declared in the INP block. This field

 

may be the name of the window or a data field.

 

It is a value in the 0 to 18 range which depends on the value of the first line

 

parameter.

first field column

is the screen column occupied by the first INP field and measures the distance

 

from the screen border to the window border in characters. If programmed with

 

the INP command the field will be automatically centered.

 

It is an integer from 0 to 79 which must obviously be selected according to the

 

length of the displayed data.

empty lines

is the number of empty lines that separates two subsequent comment or field

 

lines.

 

It is an integer from 0 to 18 which must obviously be selected according to the

 

available space and the length of the displayed data. If you write 0 there will be

 

no empty lines.

 

If INP programs only one data entry field, the empty lines value is use for

 

positioning the lower border with respect to the last displayed line.

number of fields

specifies the number of fields to be displayed on the same line. It ranges from 1

 

to 4. The distance between two fields is 3 characters.

background color

(optional) Defines the color of the data entry window background. If it is omitted,

 

the default background color is blue. Allowed values are between 0 and 7. The

 

meaning of these values is shown in the Characteristics section.

2-2

10 Series CNC ASSET Reference Manual (04)

Loading...
+ 78 hidden pages