Sie sind auf Seite 1von 30

display_err

Pgina 1 de 30

DISPLAY_ERR
PROTOTYPE DISPLAY_ERR (NUMBER NMSG, STRING SCT)

FUNCTION DISPLAY_ERR (NUMBER NMSG, STRING SCT);

Function description
This function allows you to place a message by the infrastructure of the TB_DECO error management. The message placed
will be taken from the message database according to its number and section.
The STRING SCT parameter allows you to specify a particular section. If you pass an empty string, then the default
section, namely "MACRO" will be active.
The type of message (alarm, warning or operator dialog) will be the one defined in the message database.
Depending on the type of message that is placed, the function will return the value of 1 in response to the "OK" and "YES"
selections and the value of 0 to the "CANCEL" and "NO" selections.

Description of Parameters
NMSG

Number of the message to place

SCT

Name of the section where the message is. If this string is empty (""), the message will be sought
in the "MACRO" section. This section is reserved exclusively for cycle messages.

Notes
The function will be automatically operated by the error management infrastructure in the silence mode.

See also: Other functions I/O

DISPLAY_MSG
PROTOTYPE DISPLAY_MSG (STRING MSG_ERR, NUMBER NTYPE)
FUNCTION DISPLAY_MSG (STRING MSG_ERR, NUMBER NTYPE);

Function description
This function allows you to place the MSG_ERR message by the infrastructure of the TB_DECO error management. The
message placing mode is defined by NTYPE. Depending on the type of message that is placed ( NTYPE), the function will
return the value of 1 in response to the "OK" and "YES" selections and the value of 0 to the "CANCEL" and "NO" selections.

Description of Parameters

file:///C:/Users/dpsilva/AppData/Local/Temp/~hh3828.htm

06/03/2015

display_err

MSG_ERR

Pgina 2 de 30

String that will be displayed in the message window


The parameter can take the values 1..4. With regard to these values, the following icons will be
displayed:

NTYPE
In addition, the type entered as a parameter selects the following reply buttons in addition to the
"HELP" button:
1 : "OK"
2 : "YES" and "NO"
3 : "OK"
4 : "OK"

Notes: The function will be automatically operated by the error management infrastructure in the silence mode.

See also:

Other functions I/O

DLG_INPUTF
PROTOTYPE DLG_INPUTF (STRING BOX_TITLE, STRING MSG_CAPT, FLOAT FINP)

FUNCTION DLG_INPUTF (STRING BOX_TITLE, STRING MSG_CAPT, FLOAT FINP);

Function description
This function opens a dialog box that allows you to enter a number. The number entered is returned on exiting the dialog box
if you quit via OK and, when quitting via "CANCEL", the default variable FINP is returned.
The default value, which is also displayed when the dialog box is opened is the one entered in variable FINP.
The title of the dialog box is entered in variable BOX_TITLE and the invitation text for the number entry is entered in
variable MSG_CAPT.
For a command:
#1019:=DLG_INPUTF ("My dialog box title", "Enter a Number", 12);
The following dialog box is displayed:

file:///C:/Users/dpsilva/AppData/Local/Temp/~hh3828.htm

06/03/2015

display_err

Pgina 3 de 30

Description of Parameters
BOX_TITLE

Dialog box title. If an empty string is passed, the text "DLG_INPUTF" is displayed.

MSG_CAPT

String that will be displayed for the invitation of a number entry. If an empty string is passed, the
text "FLOAT" will be displayed.

FINP

Default number that will be returned when quitting via "CANCEL" or in silence mode.

Notes
The function displays no dialog box and returns the initialisation value of FINP in silence mode.

See also: Other functions I/O

DLG_INPUTS
PROTOTYPE DLG_INPUTS (STRING BOX_TITLE, STRING MSG_CAPT, @STRING SINP)

FUNCTION DLG_INPUTS (STRING BOX_TITLE, STRING MSG_CAPT, @STRING SINP);

Function description
This function opens a dialog box that allows you to enter a string. The string entered is returned on exiting the dialog box
when quitting via OK in variable SINP.
The default value, which is also displayed when the dialog box is opened is the one entered in variable SINP.
The title of the dialog box is entered in variable BOX_TITLE and the invitation text for the number entry is entered in
variable MSG_CAPT The dialog box and its behaviour is similar to function DLG_INPUTF.

Description of Parameters
BOX_TITLE
MSG_CAPT
SINP

Dialog box title. If an empty string is passed, the text "DLG_INPUTS" is displayed.
String that will be displayed for the invitation of a number entry. If an empty string is passed, the
text "STRING..." will be displayed.
String entered in a reference. At the time of calling, this string contains the default text that will
be displayed in the edit field and, when exiting via "OK", this variable will contain the new value.

file:///C:/Users/dpsilva/AppData/Local/Temp/~hh3828.htm

06/03/2015

display_err

Pgina 4 de 30

Notes
The function does not display a dialog box and the STRING SINP will not be allocated.

See also: Other functions I/O

EXIST_SUPPID
PROTOTYPE EXIST_SUPPID (NUMBER)

FUNCTION EXIST_SUPPID (SUPP_ID);

Value returned
Returns 1 if the SUPP_ID support exists in the machine database and 0 if it does not.

Function description
This function allows you to determine whether a support exists in the machine database

Parameter description
SUPP_ID

Name, i.e. identifier of the support you wish to check the existence of.

Sample program:
....
....
IF (EXIST_SUPPID(11)) THEN
// You can request the parameters of this support
#1002:=GET_SUPP_INFO (11, OFFSET_X, OFFSET_Y, OFFSET_Z, AXE_X_ID,AXE_Y_ID,AXE_Z_ID);
ENDIF;
....

See also: Other functions I/O

GET_AXIS_INFO

file:///C:/Users/dpsilva/AppData/Local/Temp/~hh3828.htm

06/03/2015

display_err

Pgina 5 de 30

PROTOTYPE GET_AXIS_INFO (STRING, @NUMBER, @FLOAT, @FLOAT, @FLOAT)

FUNCTION GET_AXIS_INFO (AXNAME, AXID, POSREF, POSMIN, POSMAX);

Value returned
The function returns 1 if all the values returned are valid. Otherwise the function returns 0.

Function description
This function allows you to find the values described below for an axis entered as a parameter.

Description of Parameters
AXNAME
AXID
POSREF
POSMIN
POSMAX

Name of axis to find. For example: "X1", "Z2", etc...


Contains on return of the function the identifier of the requested AXNAME axis.
Contains on return of the function the reference position in [mm] for the requested AXNAME
axis.
Contains on return of the function the MIN soft limit position in [mm] for the requested
AXNAME axis.
Contains on return of the function the MAX soft limit position in [mm] for the requested
AXNAME axis.

Sample program:
....
NUMBER: NID;
FLOAT: POSREF_X1, POSMIN_X1, POSMAX_X1;
....
#1002:=GET_AXIS_INFO("X1", NID, POSREF_X1, POSMIN_X1, POSMAX_X1);
....

See also: Other functions I/O

GET_AXIS_NAME
PROTOTYPE GET_AXIS_NAME (NUMBER, @STRING)

FUNCTION GET_AXIS_NAME (NUM_AXIS, AX_PGM_NAME);

Value returned
Returns 1 if OK and data valid. Otherwise returns 0.

file:///C:/Users/dpsilva/AppData/Local/Temp/~hh3828.htm

06/03/2015

display_err

Pgina 6 de 30

Function description
This function allows you to find the name of the axis programming whose number was entered as a parameter.
Note: The axes are numbered from 1 to n in a contiguous manner, which is not the case for the identifiers.

Description of Parameters
NUM_AXIS

Number of the axis whose programming name you require.

AX_PGM_NAME

Return of the programming name of the axis concerned.

Sample program:
....
NUMBER: NUM;
STRING: PGM_NAME;
....
#1002:=GET_AXIS_NAME (NUM, PGM_NAME);
....

See also: Other functions I/O

GET_FIELD_VAL
PROTOTYPE GET_FIELD_VAL (STRING, STRING, NUMBER, STRING, @STRING)

FUNCTION GET_FIELD_VAL (TABLENAME, FIELDNAME, FIELDID, IDFIELDNAME, FIELDVALUE);

Value returned
The function returns 1 if the value was found in the machine database. Otherwise the function returns 0.

Function description
This function allows you to retrieve the value of a basic field in the active machine database. The parameters are described
below.

Description of Parameters
TABLENAME

Name of the table in the machine database

file:///C:/Users/dpsilva/AppData/Local/Temp/~hh3828.htm

06/03/2015

display_err

Pgina 7 de 30

FIELDNAME

Name of the desired field in the TABLENAME table

FIELDID

Identifier that allows you to select the correct entry

IDFIELDNAME

Name of the field containing the FIELDID identifier

FIELDVALUE

Contains on return of the function the value of the desired field.

Sample programming for the tables: Axes, Spindles, Collisions, Custom, ElemViews, Images, OpLine, Plane,
Support, ToolDualLink, Views:
....
STRING: strTableName, strFieldName, strIdFieldName, strFieldValue;
NUMBER: fFieldId;
....
STR_SET (strTableName,"Axes");
STR_SET (strFieldName,"UsualName");
fFieldId := 9;
STR_SET (strIdFieldName,"Axis ID");
GET_FIELD_VAL (strTableName, strFieldName,fFieldId,strIdFieldName,strFieldValue);
Pickoff-Spindle"

// strFieldValue => "X4

....

Sample programming for the tables: Global, GlobalSim, MacroCode:


....
STRING: strTableName, strFieldName, strFieldValue;
....
STR_SET (strTableName,"Global");
STR_SET (strFieldName,"DBTemplate");
GET_FIELD_VAL (strTableName, strFieldName,-1,"",strFieldValue);

// strFieldValue => "13.4"

....

See also: Other functions I/O

GET_MACH_INFO
PROTOTYPE GET_MACH_INFO (@NUMBER, @NUMBER, @NUMBER, @NUMBER, @NUMBER, @FLOAT)

file:///C:/Users/dpsilva/AppData/Local/Temp/~hh3828.htm

06/03/2015

display_err

Pgina 8 de 30

FUNCTION GET_MACH_INFO (NAXIS, NSPDLES, NPERIPH, NSUPP, NMACHID, FTEMPL);

Value returned
The function returns 1 if all the values returned are valid. Otherwise the function returns 0.

Function description
This function allows you to retrieve basic information in the active machine database. The values sought are described in the
parameters below.

Description of Parameters
NAXIS

Contains on return of the function the number of axes (linear and circular) of the machine.

NSPDLES

Contains on return of the function the number of spindles (real and analogue) of the machine.

NPERIPH

Contains on return of the function the type of machine feeder

NSUPP

Contains on return of the function the support number of the machine.

NMACHID

Contains on return of the function the identifier of the machine.

FTEMPL

Contains on return of the function the template of the machine.

Sample program:
....
NUMBER: NA, NS, NP, NSUPP, NIDMACH;
FLOAT: FTEMPL;
....
#1002:=GET_MACH_INFO(NA, NS, NP, NSUPP, NIDMACH, FTEMPL);
....

See also: Other functions I/O

GET_MACH_VAR
PROTOTYPE GET_MACH_VAR (NUMBER)

FUNCTION GET_MACH_VAR (NVID);

Value returned
Returns the value of the variable requested

file:///C:/Users/dpsilva/AppData/Local/Temp/~hh3828.htm

06/03/2015

display_err

Pgina 9 de 30

Function description
This function allows you to retrieve a customer variable in the machine database. An error message is displayed in the event
of an error.

Parameter description
NVID

Identifier (1..10) of the variable to find.

Sample program:
...
#2030:=GET_MACH_VAR (1);
....

See also: Other functions I/O

GET_PROFSTR
PROTOTYPE GET_PROFSTR (STRING FIELDNAME, @STRING ST_VALUE)
FUNCTION GET_PROFSTR (STRING FIELDNAME, @STRING ST_VALUE);

Function description
This function retrieves a variable saved previously in a permanent manner by the SET_PROFSTRING function under a general
name given by variable FIELDNAME.
If the general name is not found in the file, ST_VALUE keeps its initialisation value at the time of the function call.

Description of Parameters
FIELDNAME

General name given to the STRING variable for its persistence in the file.
At the time of a function call, this STRING contains the default value.

ST_VALUE
On the return of the function, this variable contains the value contained in the file.

Notes
This function retrieves a value contained in a file with an ".INI" format of Windows. These files have the following form:
...
[Section]

file:///C:/Users/dpsilva/AppData/Local/Temp/~hh3828.htm

06/03/2015

display_err

Pgina 10 de 30

FieldName= value saved


...
The name of the file is in variable $16. The default file name is "Mac_Prof.ini" in the main directory of the macro files.
The name of the section is in variable $14. This section is by default the template of the current machine database. A section
is therefore created per machine type. This implies that the general backup names must be unique even within the same type
of machine.
The FieldName field is the general name given to the persistence.
To save and retrieve FLOAT or NUMBER data, you have to use the conversion STRING functions.

See also: Other functions I/O

GET_SHARED_CAT_TOOL
PROTOTYPE GET_SHARED_CAT_TOOL(NUMBER KIND_RESULT, @STRING CAT_TOOL_NAME)
FUNCTION GET_SHARED_CAT_TOOL(NUMBER KIND_RESULT, @STRING CAT_TOOL_NAME);

Value returned
The function returns 1 if all the values returned are valid, if not the function returns 0.

Function description
This function retrieves the catalogue name of a shared tool.
If the tool catalogue is not shared, the returned character chain CAT_TOOL_NAME, is blank.

Description of Parameters
Indicates the form in which the shared catalogue name will be transmitted to the
CAT_TOOL_NAME.
KIND_RESULT

0: Only returns the name (without extension) CAT_NAME


1: returns the name with extension, but without the path CAT_ NAME.TOOL

2: returns the complete name with the path CAT_ NAME.TOOL


This STRING contains the shared catalogue name in the desired format. If the tool catalogue is not
CAT_TOOL_NAME
shared, this STRING remains blank.

Sample programming:
NUMBER Result;
STRING STR1;

file:///C:/Users/dpsilva/AppData/Local/Temp/~hh3828.htm

06/03/2015

display_err

Pgina 11 de 30

Result:=GET_SHARED_CAT_TOOL(0, STR1); // STR1 is for example CATTOOLNAME


Result:=GET_SHARED_CAT_TOOL(1, STR1); // STR1 is for example CATTOOLNAME.TOOL
Result:=GET_SHARED_CAT_TOOL(2, STR1); // STR1 is for example C:\Documents and settings\UserName\My
documents\My Parts\Deco13\CATTOOLNAME.TOOL

If there is no shared catalogue for this part, the variable STR1 will be blank.

See also: Other functions I/O (inputs/outputs).

GET_SPDL_...
GET_SP_INIT
GET_SPDLE_INFO
GET_SPDLE_NAME
GET_SPDL_SPEED
GET_SPDL_STATE
GET_SPDL_SPEED_ACT
GET_SPDL_STATE_ACT

See also: Other functions I/O (inputs/outputs).

GET_SP_INIT
PROTOTYPE GET_SP_INIT (STRING SNAME, @FLOAT SVAL)
FUNCTION GET_SP_INIT (STRING SNAME, @FLOAT SVAL);

Value returned
This function returns the value 1 (TRUE) if the spindle is defined as having to be enabled and 0 (FALSE) if not.

Description
This function allows you to retrieve the spindle initialisation values defined in the part.

Parameters
SNAME Name of spindle to find. For example: "S1", "S2", etc...

file:///C:/Users/dpsilva/AppData/Local/Temp/~hh3828.htm

06/03/2015

display_err

SVAL

Pgina 12 de 30

Initialisation speed defined for spindle SNAME.

Sample :
IF (GET_SP_INIT("S1", #1000)) THEN
]
M103 S#1000
[
ENDIF;

GET_SPDLE_INFO
PROTOTYPE GET_SPDLE_INFO (STRING, @NUMBER, @NUMBER, @FLOAT, @FLOAT)
FUNCTION GET_SPDLE_INFO (SPDLNAME, SPDLID, ISANAL, VMIN, VMAX);

Value returned
The function returns 1 if all the values returned are valid. Otherwise the function returns 0.

Description
This function allows you to find the spindle parameters described below for a spindle entered as a parameter.

Description of Parameters
SPDLNAME Name of spindle for the parameters to find. For example: "S1", "S2", etc...
SPDLID
ISANAL
VMIN
VMAX

Identifier of spindle SNAME.


Indicator of the type of spindle SNAME. Value 1 if the spindle is analogue and 0 otherwise.
Min authorised rotation speed for spindle SNAME.
Max authorised rotation speed for spindle SNAME.

Sample :
....
NUMBER: NSPDLID, NISANAL;
FLOAT: VMIN_S1, VMAX_S1;
....
#1002:=GET_SPDLE_INFO("S1", NSPDLID, NISANAL, VMIN_S1, VMAX_S1);

file:///C:/Users/dpsilva/AppData/Local/Temp/~hh3828.htm

06/03/2015

display_err

Pgina 13 de 30

....

GET_SPDLE_NAME
PROTOTYPE GET_SPDLE_NAME (NUMBER, @STRING)
FUNCTION GET_SPDLE_NAME (NUM_SPDLE, SPDLE_PGM_NAME);

Value returned
Returns 1 if OK and data valid. Otherwise returns 0.

Function description
This function allows you to find the name of the spindle programming whose number was entered as a parameter.
Note: The spindles are numbered from 1 to n in a contiguous manner, which is not the case for the identifiers.

Description of Parameters
NUM_SPDLE

Number of the axis whose programming name you require.

SPDLE_PGM_NAME Return of the programming name of the spindle concerned.

Sample :
....
NUMBER: NUM;
STRING: PGM_NAME;
....
#1002:=GET_SPDLE_NAME (NUM, PGM_NAME);
....

GET_SPDL_SPEED
PROTOTYPE GET_SPDL_SPEED (NUMBER)
FUNCTION GET_SPDL_SPEED (SPDLID);

file:///C:/Users/dpsilva/AppData/Local/Temp/~hh3828.htm

06/03/2015

display_err

Pgina 14 de 30

Value returned
The function returns the speed of a spindle determined by its identifier at operation input.

Function description
This function allows you to find the spindle speed at the operation input. The parameter is described below.

Parameter

SPDLID Spindle identifier

Sample to determine the speed of spindle S1:


....
FLOAT FSPEED_S1;
FSPEED_S1 := GET_SPDL_SPEED(1);
...

GET_SPDL_STATE
PROTOTYPE GET_SPDL_STATE(NUMBER )
FUNCTION GET_SPDL_STATE(SPDLID);

Value returned
The function returns the state of a spindle determined by its identifier at operation input. This state described in
M_FctModSpd (variable NUMBER, %8), represents the modal functions of the spindle.

Description
This function allows you to find the spindle speed at the operation input.

Parameter
SPDLID Spindle identifier

Sample programming to determine the state of spindle S1:

file:///C:/Users/dpsilva/AppData/Local/Temp/~hh3828.htm

06/03/2015

display_err

Pgina 15 de 30

....
NUMBER FSTATE_S1;
FSTATE_S1 := GET_SPDL_STATE(1);
...

GET_SPDL_SPEED_ACT
PROTOTYPE GET_SPDL_SPEED_ACT(NUMBER )
FUNCTION GET_SPDL_SPEED_ACT(SPDLID);

Value returned
The function returns the current speed of a spindle determined by its identifier. Unlike the function GET_SPDL_SPEED()
which indicates the value at operation input, GET_SPDL_SPEED_ACT() indicates the current value in the operation.

Description
This function allows you to find the current speed (possibly modified) of the spindle in the operation.

Parameter

SPDLID Spindle identifier

Sample programming to determine the state of spindle S1:


....
M103 S4500
[
FLOAT FSPEED_S1;
FSPEED_S1 := GET_SPDL_SPEED (1); // FSPEED_S1 {is for example 6000}
FSPEED_S1 := GET_SPDL_SPEED_ACT(1); // FSPEED_S1 {is 4500}
]

GET_SPDL_STATE_ACT
PROTOTYPE GET_SPDL_STATE_ACT(NUMBER )
FUNCTION GET_SPDL_STATE_ACT(SPDLID);

file:///C:/Users/dpsilva/AppData/Local/Temp/~hh3828.htm

06/03/2015

display_err

Pgina 16 de 30

Value returned
The function returns the current state of a spindle determined by its identifier. This state, described in M_FctModSpd
(variable NUMBER, %8), represents the modal functions of the spindle.
Unlike the function GET_SPDL_SPEED() which indicates the value at operation input GET_SPDL_SPEED_ACT()
indicates the current value in the operation.

Description
This function allows you to find the current state (possibly modified) of the spindle in the operation.

Parameter
SPDLID Spindle identifier

Sample programming to determine the state of spindle S1:


...
NUMBER FSTATE_S1;
FSTATE_S1 := GET_SPDL_STATE_ACT(1);

Use example of these functions

See also: Other functions I/O (inputs/outputs).

GET_SUPP_INFO
PROTOTYPE GET_SUPP_INFO (NUMBER, @FLOAT, @FLOAT, @FLOAT, @NUMBER, @NUMBER, @NUMBER)

FUNCTION GET_SUPP_INFO (SUPPID, OFFX, OFFY, OFFZ, AIDX, AIDY, AIDZ);

Value returned
The function returns 1 if all the values returned are valid. Otherwise the function returns 0.

Function description
This function allows you to find the parameters for the SUPPID support entered as a parameter. The values returned are
described below.

file:///C:/Users/dpsilva/AppData/Local/Temp/~hh3828.htm

06/03/2015

display_err

Pgina 17 de 30

Description of Parameters
SUPPID

Identifier of the support to find. For example: 11, 16, etc...

OFFX

Offset value in direction X for support SUPPID.

OFFY

Offset value in direction Y for support SUPPID.

OFFZ

Offset value in direction Z for support SUPPID.

AIDX

Axis identifier in direction X for support SUPPID.

AIDY

Axis identifier in direction Y for support SUPPID.

AIDZ

Axis identifier in direction Z for support SUPPID.

Sample program:
....
NUMBER: AXE_X_ID, AXE_Y_ID, AXE_Z_ID;
FLOAT: OFFSET_X, OFFSET_Y, OFFSET_Z;
....
#1002:=GET_SUPP_INFO (11, OFFSET_X, OFFSET_Y, OFFSET_Z, AXE_X_ID,AXE_Y_ID,AXE_Z_ID);
....

See also: Other functions I/O

GET_TBDECO_BUILD
PROTOTYPE GET_TBDECO_BUILD(@STRING, NUMBER)

FUNCTION GET_TBDECO_BUILD(STR_VERSION, WithPackageNumber);

Value returned
Returns 1 if OK and valid data. Returns 0 otherwise.

Function description
This feature allows you to find the version number in a string, if the second parameter is 1, the number of 'package' is added
with a '/' preceding the number.

Parameter description
STR_VERSION

Returns the version number. For example (8.02.039 or 8.02.039 / 2)

file:///C:/Users/dpsilva/AppData/Local/Temp/~hh3828.htm

06/03/2015

display_err

Pgina 18 de 30

Indicates whether it should add the number of setup package following version separated by a '/'
WithPackageNumber If the parameter is 0, no number of package Example: 8.02.039
If the parameter is an addition to the number. Example: 8.02.039 / 2

Sample program:
....
NUMBER: nResult;
STRING: strMsg, strTBDecoBuild;
....
STR_SET(strMsg,"Version number : %s");
nResult := GET_TBDECO_BUILD(strTBDecoBuild, 0);
IF(nResult)THEN
STR_FORM1( strMsg, strTBDecoBuild);
DISPLAY_MSG(strMsg, 1);
ENDIF;
....

See also: Other functions I/O

GET_TOOL_INFO
PROTOTYPE GET_TOOL_INFO (NUMBER, @FLOAT, @FLOAT, @FLOAT, @FLOAT, @NUMBER, @NUMBER, @NUMBER, @FLOAT)

FUNCTION GET_TOOL_INFO (TOOLID, OFFX, OFFY, OFFZ, RVAL, QACT, SUPPID, NTEETH, ANGLE);

Value returned
Returns 1 if OK and data valid. Otherwise returns 0.

Function description
This function allows you to find the parameters for a tool entered as a parameter.

Description of Parameters
TOOLID

Name of the tool whose parameters you wish to find. For example: 11, 15, etc...

file:///C:/Users/dpsilva/AppData/Local/Temp/~hh3828.htm

06/03/2015

display_err

Pgina 19 de 30

OFFX

Return of the offset in direction X of the tool. The value returned is always in the metric system
and includes the offset in the direction corresponding to the associated support.

OFFY

Return of the offset in direction Y of the tool. The value returned is always in the metric system
and includes the offset in the direction corresponding to the associated support.

OFFZ

Return of the offset in direction Z of the tool. The value returned is always in the metric system
and includes the offset in the direction corresponding to the associated support.

RVAL

Contains the value of the tool radius if the same is defined for the tool requested.

QACT

Contains the dial of the tool radius if the same is defined for the tool requested.

SUPPID

Contains the identifier of the support onto which the tool is associated.

NTEETH

Contains the value of field TEETH if it is a cutter type tool that is defined.

ANGLE

Contains the value of the angle field if this field can be defined in the tool requested.

Sample program:
....
NUMBER: CADRAN, SUPPID_T11, TEETH_T11;
FLOAT: OFF_X, OFF_Y, OFF_Z, RADIUS, ANGLE_T11;
....
#1002:=GET_TOOL_INFO (11, OFF_X, OFF_Y, OFF_Z, RADIUS, CADRAN, SUPPID_T11, TEETH_T11,
ANGLE_T11);
....

See also: Other functions I/O

MSG_CUSTBOX
PROTOTYPE MSG_CUSTBOX (STRING BOX_TITLE, STRING MSG_TEXT, NUMBER NBUTTONTYPE, NUMBER NICON)

FUNCTION MSG_CUSTBOX (BOX_TITLE, MSG_TEXT, NBUTTONTYPE, NICON);

Function description
The function returns a value that identifies the button pressed in the dialog box. This value will depend on parameter
NBUTTONTYPE that will be entered in the function.
For the following function call:
MSG_CUSTBOX ("My title", "My message", 2, 1);
The dialog box will appear as follows:

file:///C:/Users/dpsilva/AppData/Local/Temp/~hh3828.htm

06/03/2015

display_err

Pgina 20 de 30

This function allows you to exit with the all text screen and to retrieve an answer.

Description of Parameters
BOX_TITLE

MSG_TEXT

The string entered here will be displayed in the message title, i.e. "My title" in the example
below.
This is where the message will be displayed. If you wish to return to the line, you must specify
this by the sequence \n.
For example: "My message \n Is now on 2 lines!"
The number entered as a parameter here allows you to configure the buttons that will be active as
follows:
0: Only one "OK" button is displayed
1: The "OK" and "CANCEL" buttons are displayed

NBUTTONTYPE

2: The "YES" and "NO" buttons are displayed


Any other value: Display of "OK" button only
The texts appear in the Windows installation language.
The value 1 will be returned for buttons "OK" and "YES".
The value 0 will be returned for buttons "CANCEL" and "NO".
The number entered allows you to select the icon that will be displayed in the dialog box, as
follows:

NICON

All the other values are considered to be 0.

Notes
The dialog box will not be displayed if you are in silence mode. In this case, the function will return -1.

See also: Other functions I/O

file:///C:/Users/dpsilva/AppData/Local/Temp/~hh3828.htm

06/03/2015

display_err

Pgina 21 de 30

MSG_LOAD
PROTOTYPE MSG_LOAD (@STRING MSG_LOADED, NUMBER NMSG, STRING SCT, NUMBER NWT)
FUNCTION MSG_LOAD (MSG_LOADED, NUMBER NMSG, STRING SCT, NUMBER NWT);

Function description
The function allows you to retrieve in the STRINGMSG_LOADED parameter entered as a reference the NMSG text of the
message database.
The STRING SCT parameter allows you to specify a particular section. If you pass an empty string, then the default
section, namely "MACRO" will be active.

Description of Parameters
MSG_LOADED

String entered as a reference that will receive the message of the message database

NMSG

Number of the message to find

SCT

Name of the section where the message is. If this string is empty (""), the message will be sought
in the "MACRO" section. This section is reserved exclusively for cycle messages.

NWT

Indicator that allows you not to retrieve the message header that represents the section and the
message number that is used for the alarm display. By entering 0, you will get the following text
'SCTNMSG: Text'; by entering 1, you will simply get 'Text'.

See also: Other functions I/O

MSG_TRACE
PROTOTYPE MSG_TRACE (STRING MSG_TEXT, NUMBER NOUTTYPE)

FUNCTION MSG_TRACE (MSG_TEXT, NOUTTYPE);

Function description
The function takes out the message text MSG_TEXT in the window(s) entered as parameters.

Description of Parameters
MSG_TEXT

String that will be displayed in the desired window


Select output type, namely:
0: TB-DECO Output window (Docking)

file:///C:/Users/dpsilva/AppData/Local/Temp/~hh3828.htm

06/03/2015

display_err

Pgina 22 de 30

1: Output on the Pipe of TB-DECO, namely external application (TBTrace.exe).


NOUTTYPE

2: Simultaneous display on the two output devices.


All the other values are considered to be 0.

Notes
The function will be redirected automatically on the Pipe output if the silence mode is enabled.

See also: Other functions I/O

PARS_EXIT
PROTOTYPE PARS_EXIT (NUMBER EXIT_CODE, NUMBER DISP_MSG)

FUNCTION PARS_EXIT (NUMBER EXIT_CODE, NUMBER DISP_MSG);

Function description
This function stops the processing under way unconditionally. If the DISP_MSG parameter is 1, an error message is
displayed concerning the EXIT_CODE code entered as a parameter.

Parameter description
EXIT_CODE

Number containing the exit code that will be displayed in the error message.

DISP_MSG

If DISP_MSG is 1, error message display. If DISP_MSG is zero, no message is displayed.

See also: Other functions I/O

OP_...
The functions described below are used to access certain information on the operation in progress.
The function Mxx can be programmed in an ISO operation or a PTO operation for a PTO machine. It is possible to learn in
what type of operation the function ON_Mxx is called by using the function OP_IS_IN_ISO()..

OP_IS_IN_ISO
OP_IS_OPER_TORNOS

file:///C:/Users/dpsilva/AppData/Local/Temp/~hh3828.htm

06/03/2015

display_err

Pgina 23 de 30

OP_GET_NAME
OP_GET_PGM_NUMBER
OP_GET_PGM_NAME

See also: Other functions I/O (inputs/outputs).

OP_IS_IN_ISO
PROTOTYPE OP_IS_IN_ISO()
FUNCTION OP_IS_IN_ISO();

Value returned
The function returns 1 if the operation in progress is ISO type. If not, the function returns 0.

Function description
The function is used to learn whether the operation in progress is Special operation (ISO) type.

Sample programming:
....
NUMBER: bOpIsISO;
....
bOpIsISO := OP_IS_IN_ISO();
....

OP_IS_OPER_TORNOS
PROTOTYPE OP_IS_OPER_TORNOS()
FUNCTION OP_IS_OPER_TORNOS();

Value returned
The function returns 1 if the operation in progress is TORNOS OPERATION type. If not, the function returns 0.

Function description
The function is used to learn whether the operation in progress is System operation (TORNOS) type.

file:///C:/Users/dpsilva/AppData/Local/Temp/~hh3828.htm

06/03/2015

display_err

Pgina 24 de 30

Sample programming:
....
NUMBER: bOpIsTornos;
....
bOpIsTornos := OP_IS_OPER_TORNOS();
....

OP_GET_NAME
PROTOTYPE OP_GET_NAME(@STRING)
FUNCTION OP_GET_NAME(STR_OP_NAME);

Value returned
The function returns 1 if the operation in progress returns its name in the STR_OP_NAME parameter. The function returns 0
if an error has occurred.

Function description
This function is used to search the name of the operation in progress.

Description of Parameters

STR_OP_NAME

Name of the operation in progress. For example '1:3'

Sample programming:
....
STRING : strOpName ;
NUMBER : bResult;
....
bResult := OP_GET_NAME(strOpName);
....

OP_GET_PGM_NUMBER
PROTOTYPE OP_GET_PGM_NUMBER(@NUMBER)

file:///C:/Users/dpsilva/AppData/Local/Temp/~hh3828.htm

06/03/2015

display_err

Pgina 25 de 30

FUNCTION OP_GET_PGM_NUMBER(PgmSetNb);

Value returned
The function returns 1 if the operation in progress returns the number of the program in the PgmSetNb parameter. The
function returns 0 if an error has occurred.

Function description
This function is used to search the number of the program to which the operation in the progress belongs.

Description of Parameters

PgmSetNb

Number of the program to which the operation in the progress belongs. For example 2 (PNC) or
37 (PTO)

Sample programming:
...
NUMBER: nResult, nPgmSet;
STRING: strMsg;
...
STR_SET(strMsg,"Numro de programme : %i");
nResult := OP_GET_PGM_NUMBER(nPgmSet);
IF(nResult)THEN
STR_N2S( strMsg, nPgmSet);
DISPLAY_MSG(strMsg, 1);
ENDIF;
...

OP_GET_PGM_NAME
PROTOTYPE OP_GET_PGM_NAME(@STRING)
FUNCTION OP_GET_PGM_NAME(STR_PGM_NAME);

Value returned
The function returns 1 if the operation in progress returns the name of the program to which the operation belongs in the
STR_PGM_NAME parameter. The function returns 0 if an error has occurred.

file:///C:/Users/dpsilva/AppData/Local/Temp/~hh3828.htm

06/03/2015

display_err

Pgina 26 de 30

Function description
This function is used to search the name of the program to which the operation in progress belongs.

Description of Parameters

STR_PGM_NAME

Name of the program to which the operation in the progress belongs. For example '3600-MAIN'

Sample programming:
....
STRING : strPgmName ;
NUMBER : bResult;
....
bResult := OP_GET_PGM_NAME(strPgmName);
....

SET_PROFSTR
PROTOTYPE SET_PROFSTR (STRING FIELDNAME, STRING ST_VALUE)

FUNCTION SET_PROFSTR (STRING FIELDNAME, STRING ST_VALUE);

Function description
This function saves permanently in a file the FIELDNAME variable under a given general name.

Description of Parameters
FIELDNAME

General name given to the STRING variable for its persistence in the file.

ST_VALUE

STRING variable containing the value to save

Notes
This function saves ST_VALUE in a file with a ".INI" format of Windows. These files have the following form:

file:///C:/Users/dpsilva/AppData/Local/Temp/~hh3828.htm

06/03/2015

display_err

Pgina 27 de 30

...
[Section]
FieldName= value saved
...
The name of the file is in variable $16. The default file name is "Mac_Prof.inii" in the main directory of the macro files.
The name of the section is in variable $14. This section is by default the template of the current machine database. A section
is therefore created per machine type. This implies that the general backup names must be unique even within the same type
of machine.
The FieldName field is the general name given to the persistence.
To save and retrieve FLOAT or NUMBER data, you have to use the conversion STRING functions.

See also: Other functions I/O

SET_PARTID
PROTOTYPE SET_PARTID(STRING PARTID)

FUNCTION SET_PARTID(STRING PARTID);

Function description
This function has been developed in order to set PARTID= corresponding to Pgm ID of the dialogue box Part general
data for programming. This has become necessary for parameterised programming.

Parameter description

PRGNAME

Program identification name corresponding to the PARTID= indication shown in TRF or PTO

Notes
The information PARTLENGTH= and PARTDIAMETER= are linked to the Length and Diameter data in the Part
general data dialogue box, but they are also in the global variables #3003 and #3001.
Up to version 8.02.028, it was necessary to change the corresponding variables in the Part general data dialogue box or
with the Edit part global variables dialogue box so that this data was correctly reported in the TRF or PTO file.

However, certain customers when editing the global variables #3001 and #3003 based on a value introduced in part initialising thought they would
find these values in PARTDIAMETER= and PARTLENGTH=. This was not the case, BUG#257 was processed to correct this fact. In TB-DECO
version 8.02.029, editing of one of these variables #3001 or #3003 updates the PARTINFO data.

file:///C:/Users/dpsilva/AppData/Local/Temp/~hh3828.htm

06/03/2015

display_err

Pgina 28 de 30

In terms of PARTID=, it was not possible to change this value by programming. This is the reason why the SET_PARTID
(STRING PRGNAME) function was developed, it is part of the PELD library starting from TB-DECO version 8.02.029. In
addition in a parameterised programming, it will be possible to edit the 3 data set or displayed in General part data,
Length, Diameter and Pgm ID by programming and to have them in the TRF or PTO file in the information: 9998 or
O9998.

For example:
DLG_INPUTS("LOT NUMBER" , "Enter lot number", $33) ;
SET_PARTID($33) ;
Or
SET_PARTID(H12A3456) ;

Dialog box
Pgm ID : TEST 123
Diameter: 7
Length: 20

Programming
SET_PARTID(TEST
123) ;
#3001 := 7:
#3003 := 20;

TRF or PTO file


(PARTID= TEST 123 ) ;
(PARTDIAMETER= 7.000 );
(PARTLENGTH= 20.000 );

See also: Other functions I/O

SET_CPD_NAME
PROTOTYPE SET_CPD_NAME(STRING CPDNAME)

FUNCTION SET_CPD_NAME(STRING CPDNAME);

file:///C:/Users/dpsilva/AppData/Local/Temp/~hh3828.htm

06/03/2015

display_err

Pgina 29 de 30

Function description
Starting from TB-DECO build 8.02.029, it is now possible to modify the name of the CPD file and TRF, PTO and DNC files
based on a PELD function. This makes it possible to set a more specific TRF name in the case of parameterised
programming where the part file name (.PART) is general.

Parameter description

CPDNAME

CPD file name (without extension) which, by default, will change the name corresponding to the
part name. The TRF, PTO or DNC file will also have the new name.

Notes

The CPDNAME parameter must contain a text defining the name of the CPD file without extension.

The following characters are not authorised \/ :* ?<>| as well as all characters not between 0-9, A-Z, a-z or included in the
character set: +@#&=[] :,-_
If the length entered is longer than 250 characters or includes a character which is not one of the authorised characters, the
function returns 1 and the variable indicating that the CPD name has changed is forced to blank.
If not, the variable indicating that the CPD name has changed takes the value of the parameter text and the function returns
0.

When this function is used during part interpretation, TB-DECO memorises this name which will be used to generate the
CPD file name and then the file which will be changed on the machine (TRF for FANUC_PTO machine, PTO for
FANUC_PTO and DNC for FANUC_ISO).
The functions Simulate (F9) and Transfer the tables (F10) are adapted to call the corresponding file.
In terms of simulation, SimDeco is modified to be able to display the part name which generated the CPD file. For this, the
generated CPD file starting with TB-DECO 8.02.029 will contain this information in Info.txt with a new line containing
PART_Name=Nom_de_la_pice.PART

In addition starting from SimDeco 8.02.029, if the CPD file name is different from the PART file, the information PART
NAME ENABLED: of the Machine positions and part characteristics window displays the name of the PART file plus the
name of the CPD file between brackets.
For example:
ENABLED PART NAME : 420XXX2XINT~4332XXX.PART (4332614.CPD)
ENABLED DATABASE: V4_10_D20.MACH

For example:
DLG_INPUT(PART NUMBER , Enter the part name , $39) ;

file:///C:/Users/dpsilva/AppData/Local/Temp/~hh3828.htm

06/03/2015

display_err

Pgina 30 de 30

SET_CPD_NAME($39) ;
or
SET_CPD_NAME(4332614 ) ;

See also: Other functions I/O

file:///C:/Users/dpsilva/AppData/Local/Temp/~hh3828.htm

06/03/2015

Das könnte Ihnen auch gefallen