GO2cam Pascal API

Topics

 Panel Management
 
 Heidenhain functions
 
 Drill information management
 

Functions

PROCEDURE CheckOrigin ()
 Check if the origin name are coherent.
 
PROCEDURE ComputeDepthCycle (real_Depth:REAL, VAR real_Inc, real_End, real_Raison:REAL, VAR int_Nb:INTEGER)
 Compute the declining for a drilling operation.
 
PROCEDURE ConcatStrVal (VAR str_Ret:TC255, str_Code:TC255, real_Val:REAL, int_Precision :INTEGER)
 Add a real value after a string.
 
PROCEDURE ConcatStrValFormat (VAR str_Ret:TC255, str_Code:TC255, real_Val:REAL, int_FormatReal :INTEGER)
 Add a real value after a string. The real value will be converted to be output in correct unit.
 
PROCEDURE ConcatVal (VAR str_Ret:TC255, real_Val:REAL, int_Precision :INTEGER)
 Add a real value after a string in the same string.
 
PROCEDURE ConcatValFormat (VAR str_Ret:TC255, real_Val:REAL, int_FormatReal :INTEGER)
 Add a real value after a string in the same string. The real value will be converted to be output in correct unit.
 
PROCEDURE DebugBegin (str_ProcName :TC255, int_ResetIndent :INTEGER)
 Used at start of a procedure to display the name of it in the debugg mode.
 
PROCEDURE DecodeOriginName (VAR str_Ret:TC255)
 Decode the origin name from a string.
 
PROCEDURE FormatStrValue (VAR str_Val :TC255)
 Format a string value with deleting the trailing 0.
 
PROCEDURE FreeArrayTool ()
 Free the memory of the tool array.
 
PROCEDURE GetToolName (int_ToolNo :INTEGER, VAR str_ToolName :TC255)
 Return the tool name of a tool from its number.
 
INTEGER FUNCTION GetTurretKind () INTEGER
 Return a number that define the kind of turret where the active tool is mounted.
 
BOOLEAN FUNCTION HavePrimaryAxis () BOOLEAN
 Test if the machine have a primary axis.
 
BOOLEAN FUNCTION HaveSecondaryAxis () BOOLEAN
 Test if the machine have a secondary axis.
 
PROCEDURE InitArrayTool ()
 Initialize an array of all tools used in the channel.
 
BOOLEAN FUNCTION Is5AxisCNC () BOOLEAN
 Test if the machine have a primary and secondary axis.
 
INTEGER FUNCTION IsCharVarDat (str_Test :TC255, i :INTEGER) INTEGER
 Test if a character of a string is a character used for a variable name in .dat file.
 
BOOLEAN FUNCTION IsEqual (real_Value1, real_Value2:REAL) BOOLEAN
 Test if two values are equal.
 
BOOLEAN FUNCTION IsGCodeActivated (int_GCode :INTEGER) BOOLEAN
 Test if a G code is activated.
 
BOOLEAN FUNCTION IsInf (real_Value1, real_Value2:REAL) BOOLEAN
 Test if a value is striclty inferior to another one.
 
BOOLEAN FUNCTION IsInteger (real_Value:REAL) BOOLEAN
 Test if a real value is integer with 3 decimals.
 
BOOLEAN FUNCTION IsKeyActivated (str_Key :TC255, real_Value :REAL) BOOLEAN
 Test if a key is activated.
 
BOOLEAN FUNCTION IsMCodeActivated (int_MCode :INTEGER) BOOLEAN
 Test if a M code is activated.
 
BOOLEAN FUNCTION IsModalKeyInteger (str_Key:TC255) BOOLEAN
 Test if a key of GPP is modal.
 
BOOLEAN FUNCTION IsNotEqual (real_Value1, real_Value2:REAL) BOOLEAN
 Test if two values are not equal.
 
BOOLEAN FUNCTION IsNull (real_Value:REAL) BOOLEAN
 Test if a real value is equal to 0.
 
INTEGER FUNCTION IsNumberChar (str_Test :TC255, i :INTEGER) INTEGER
 Test if a character of a string is a number.
 
INTEGER FUNCTION IsNumericalChar (VAR str_Test:TC255, i:INTEGER) INTEGER
 Test if a character of a string is a numerical character.
 
BOOLEAN FUNCTION IsSameStr (str_1, str_2 :TC255) BOOLEAN
 Test if two string are the same.
 
BOOLEAN FUNCTION IsSup (real_Value1, real_Value2:REAL) BOOLEAN
 Test if a value is striclty superior to another one.
 
BOOLEAN FUNCTION IsTurretRack () BOOLEAN
 Test if the active tool is mounted on a rack.
 
BOOLEAN FUNCTION IsTurretSpindle () BOOLEAN
 Test if the active tool is mounted on a spindle.
 
BOOLEAN FUNCTION IsTurretTurret () BOOLEAN
 Test if the active tool is mounted on a turret.
 
PROCEDURE ListOrigin ()
 Output the list of origin used by the channel in the NC program.
 
PROCEDURE ListTool ()
 Output the list of tool used by a channel.
 
PROCEDURE MessageError (int_MessageNum :INTEGER, str_Message :TC255)
 Display an error box at the screen.
 
PROCEDURE MessageErrorCycle (int_MessageNum :INTEGER, str_Message, str_CycleName :TC255)
 Display an error box for an error in a cycle with the message read in the MSG_PROC.DAT.
 
PROCEDURE MessageWarning (int_MessageNum :INTEGER, str_Message :TC255)
 Display a warning box at the screen.
 
PROCEDURE MovePoint (tr3_PtBase, tr3_UnitVector :TR3, real_Length :REAL, VAR tr3_PtMoved:TR3)
 Move a point into a direction along a unit vector with a given length.
 
PROCEDURE ReadStockInformations ()
 Read the information about the stock and call the good procedrue to output NC code.
 
INTEGER FUNCTION ReadValKey (str_Find:TC255, str_Key:TC255, int_Ind:INTEGER, VAR real_Val:REAL) INTEGER
 Read the value of a key in a string.
 
PROCEDURE RenameNCFile (str_NewName:TC255)
 Rename the output NC file.
 
PROCEDURE StrConcatSpaces (VAR str_Line :TC255, int_LenMax :INTEGER)
 Cut or add some space to have a maximum length for a string following by a space and |.
 
PROCEDURE strcpyTestNull (VAR str_Ret :TC255, str_Test :TC255)
 Copy a string in another one only if not null.
 
PROCEDURE StringReplace (VAR str_Base:TC255, str_Search, str_Replace:TC255)
 Replace a part of string in a string by an other string.
 
PROCEDURE ToolRealString (VAR str_String :TC255)
 Replace 0 by spaces after . in a string like '12.00,' or '12.00)'.
 
PROCEDURE ToolSuppressSpace (VAR str_String :TC255)
 Suppress spaces in a string.
 
REAL FUNCTION VectorLength (tr3_Vector :TR3)
 Return the norm of a vector.
 

Detailed Description

This is the tools for all post pro-processors

Function Documentation

◆ CheckOrigin()

PROCEDURE CheckOrigin ( )

Check if the origin name are coherent.

If one of all origin use the codification between "$" and "_", all must use the same
So if one doesn't use, it occurs an error and the post will be stop with an error message

PROCEDURE CheckOrigin()
Check if the origin name are coherent.
Definition PP67_TOOLS.LIB:3260

◆ ComputeDepthCycle()

PROCEDURE ComputeDepthCycle ( real_Depth:REAL ,
VAR real_Inc,
real_End ,
real_Raison:REAL ,
VAR int_Nb:INTEGER  )

Compute the declining for a drilling operation.

The parameters real_Inc and real_End are memorized and not modified by the procedure

Parameters
[in]real_Depth: total depth of hole
[in,out]real_Inc: incremental depth
[in,out]real_End: final depth
[out]real_Raison: reason of declining
[out]int_Nb: number of passes
PROCEDURE ComputeDepthCycle(real_Depth:REAL, VAR real_Inc, real_End, real_Raison:REAL, VAR int_Nb:INTEGER)
Compute the declining for a drilling operation.
Definition PP67_TOOLS.LIB:4034

◆ ConcatStrVal()

PROCEDURE ConcatStrVal ( VAR str_Ret:TC255 ,
str_Code:TC255 ,
real_Val:REAL ,
int_Precision :INTEGER  )

Add a real value after a string.

If the Precision is under 0 we take the number of decimal of TOLERPP

Parameters
[out]str_Ret: string built with str_Code and real_Val
[in]str_Code: base string
[in]real_Val: value to concatenate with str_Code
[in]int_Precision: precison of real_value we want to have
strcpy(str_Code,'X');
real_Val := 2.123545;
int_Precision := 3;
ConcatStrVal(str_Ret,str_Code,real_Val,int_Precision);
writeln('dtring ret should be X2.124 : ', str_Ret);
PROCEDURE ConcatStrVal(VAR str_Ret:TC255, str_Code:TC255, real_Val:REAL, int_Precision :INTEGER)
Add a real value after a string.
Definition PP67_TOOLS.LIB:2939

◆ ConcatStrValFormat()

PROCEDURE ConcatStrValFormat ( VAR str_Ret:TC255 ,
str_Code:TC255 ,
real_Val:REAL ,
int_FormatReal :INTEGER  )

Add a real value after a string. The real value will be converted to be output in correct unit.

It will use a key from DPP to convert the value. The string is formated by the key settings.

Parameters
[out]str_Ret: string built with str_Code and real_Val
[in]str_Code: base string
[in]real_Val: value to concatenate with str_Code
[in]int_FormatReal: format of the real value passed
SPI_FORMAT_REAL_STD = 0 : no conversion
SPI_FORMAT_REAL_DISTANCE = 1 : distance conversion
SPI_FORMAT_REAL_ANGLE = 2 : no conversion
SPI_FORMAT_REAL_TEMPS = 3 : no conversion
SPI_FORMAT_REAL_DBL_DISTANCE = 4 : distance conversion
SPI_FORMAT_REAL_WEIGHT = 5 : no conversion
SPI_FORMAT_REAL_CURRENCY = 6 : no conversion
SPI_FORMAT_REAL_TEMPS_MINUTE = 7 : no conversion
SPI_FORMAT_REAL_DURATION = 8 : no conversion
SPI_FORMAT_REAL_ROTATION_SPEED = 9 : no conversion
SPI_FORMAT_REAL_CUTTING_SPEED = 10 : cutting speed conversion
SPI_FORMAT_REAL_FEEDRATE = 11 : distance conversion
SPI_FORMAT_REAL_FEEDRATE_TOOTH = 12 : distance conversion
SPI_FORMAT_REAL_POWER = 13 : no conversion
SPI_FORMAT_REAL_MASS_DENSITY = 14 : no conversion
SPI_FORMAT_REAL_ULTIMATE_STRENGTH = 15 : no conversion
SPI_FORMAT_REAL_TORQUE = 16 : no conversion
SPI_FORMAT_REAL_FEEDRATE_ROTATE = 17 : no conversion
SPI_FORMAT_REAL_FLOW = 18 : no conversion
Version
V6.10

◆ ConcatVal()

PROCEDURE ConcatVal ( VAR str_Ret:TC255 ,
real_Val:REAL ,
int_Precision :INTEGER  )

Add a real value after a string in the same string.

Parameters
[out]str_Ret: string to add a real_Val
[in]real_Val: value to concatenate with str_Code
[in]int_Precision: precison of real_value we want to have
strcpy(str_Ret,'X');
real_Val := 2.123545;
int_Precision := 3;
ConcatStrVal(str_Ret,real_Val,int_Precision);
writeln('dtring ret should be X2.124 : ', str_Ret);

◆ ConcatValFormat()

PROCEDURE ConcatValFormat ( VAR str_Ret:TC255 ,
real_Val:REAL ,
int_FormatReal :INTEGER  )

Add a real value after a string in the same string. The real value will be converted to be output in correct unit.

Parameters
[out]str_Ret: string to add a real_Val
[in]real_Val: value to concatenate with str_Code
[in]int_FormatReal: format of the real value passed
SPI_FORMAT_REAL_STD = 0 : no conversion
SPI_FORMAT_REAL_DISTANCE = 1 : distance conversion
SPI_FORMAT_REAL_ANGLE = 2 : no conversion
SPI_FORMAT_REAL_TEMPS = 3 : no conversion
SPI_FORMAT_REAL_DBL_DISTANCE = 4 : distance conversion
SPI_FORMAT_REAL_WEIGHT = 5 : no conversion
SPI_FORMAT_REAL_CURRENCY = 6 : no conversion
SPI_FORMAT_REAL_TEMPS_MINUTE = 7 : no conversion
SPI_FORMAT_REAL_DURATION = 8 : no conversion
SPI_FORMAT_REAL_ROTATION_SPEED = 9 : no conversion
SPI_FORMAT_REAL_CUTTING_SPEED = 10 : cutting speed conversion
SPI_FORMAT_REAL_FEEDRATE = 11 : distance conversion
SPI_FORMAT_REAL_FEEDRATE_TOOTH = 12 : distance conversion
SPI_FORMAT_REAL_POWER = 13 : no conversion
SPI_FORMAT_REAL_MASS_DENSITY = 14 : no conversion
SPI_FORMAT_REAL_ULTIMATE_STRENGTH = 15 : no conversion
SPI_FORMAT_REAL_TORQUE = 16 : no conversion
SPI_FORMAT_REAL_FEEDRATE_ROTATE = 17 : no conversion
SPI_FORMAT_REAL_FLOW = 18 : no conversion
Version
V6.10

◆ DebugBegin()

PROCEDURE DebugBegin ( str_ProcName :TC255 ,
int_ResetIndent :INTEGER  )

Used at start of a procedure to display the name of it in the debugg mode.

Parameters
[in]str_ProcName: Name of the procedure that call DebugBegin
[in]int_ResetIndent: CONST_YES to reset the identation in the debug window, CONST_NO otherwise

◆ DecodeOriginName()

PROCEDURE DecodeOriginName ( VAR str_Ret:TC255 )

Decode the origin name from a string.

The string must follow the coding rule. The origin name must be between "$" and "_"

Parameters
[out]str_Ret: the string to treat
strcpy(str_Ret,'$G54_');
writeln('string should be G54 : ',str_Ret);
strcpy(str_Ret,'$G55_plane test');
writeln('string should be G55 : ',str_Ret);
strcpy(str_Ret,'G54');
writeln('string should be empty : ',str_Ret);
PROCEDURE DecodeOriginName(VAR str_Ret:TC255)
Decode the origin name from a string.
Definition PP67_TOOLS.LIB:3221

◆ FormatStrValue()

PROCEDURE FormatStrValue ( VAR str_Val :TC255 )

Format a string value with deleting the trailing 0.

delete also the dot if there is no decimal

Parameters
[out]str_Val: string to modify
strcpy(str_Val,'8.000');
FormatStrValue(str_Val);
writeln('string should be 8 : ', str_Val);
strcpy(str_Val,'8.520');
FormatStrValue(str_Val);
writeln('string should be 8.52 : ', str_Val);
PROCEDURE FormatStrValue(VAR str_Val :TC255)
Format a string value with deleting the trailing 0.
Definition PP67_TOOLS.LIB:3121

◆ FreeArrayTool()

PROCEDURE FreeArrayTool ( )

Free the memory of the tool array.

PROCEDURE FreeArrayTool()
Free the memory of the tool array.
Definition PP67_TOOLS.LIB:2304

◆ GetToolName()

PROCEDURE GetToolName ( int_ToolNo :INTEGER ,
VAR str_ToolName :TC255  )

Return the tool name of a tool from its number.

Attention
To be use the procedure InitArrayTool must be call by PP_Begin
Parameters
[in]int_ToolNo: tool number we want to have the name
[out]str_ToolName: The name of the tool
GetToolName(1,str_ToolName);
PROCEDURE GetToolName(int_ToolNo :INTEGER, VAR str_ToolName :TC255)
Return the tool name of a tool from its number.
Definition PP67_TOOLS.LIB:2338

◆ GetTurretKind()

INTEGER FUNCTION GetTurretKind ( )

Return a number that define the kind of turret where the active tool is mounted.

Returns
Code for kind of turret
CONST_TURRET
CONST_SPINDLE
CONST_RACK
CONST_NO if it's undefine
int_TurretKind := GetTurretKind;
INTEGER FUNCTION GetTurretKind() INTEGER
Return a number that define the kind of turret where the active tool is mounted.
Definition PP67_TOOLS.LIB:4605

◆ HavePrimaryAxis()

BOOLEAN FUNCTION HavePrimaryAxis ( )

Test if the machine have a primary axis.

Returns
TRUE if there is a primary axis, FALSE otherwise
BEGIN
writeln('Machine have primary axis');
END
ELSE
BEGIN
writeln('Machine doesn't have primary axis);
*/
BOOLEAN FUNCTION HavePrimaryAxis() BOOLEAN
Test if the machine have a primary axis.
Definition PP67_TOOLS.LIB:4508

◆ HaveSecondaryAxis()

BOOLEAN FUNCTION HaveSecondaryAxis ( )

Test if the machine have a secondary axis.

Returns
TRUE if there is a secondary axis, FALSE otherwise
BEGIN
writeln('Machine have secondary axis');
END
ELSE
BEGIN
writeln('Machine doesn't have secondary axis);
*/
BOOLEAN FUNCTION HaveSecondaryAxis() BOOLEAN
Test if the machine have a secondary axis.
Definition PP67_TOOLS.LIB:4542

◆ InitArrayTool()

PROCEDURE InitArrayTool ( )

Initialize an array of all tools used in the channel.

The array contains the name of tool the key to access is the number of tool

Attention
This procedure must be called at the PP_Begin because it use UTIL_load_tool function
PROCEDURE InitArrayTool()
Initialize an array of all tools used in the channel.
Definition PP67_TOOLS.LIB:2227

◆ Is5AxisCNC()

BOOLEAN FUNCTION Is5AxisCNC ( )

Test if the machine have a primary and secondary axis.

Returns
TRUE if there is a primary and secondary axis, FALSE otherwise
IF Is5AxisCNC THEN
BEGIN
writeln('Machine have primary and secondary axis');
END
ELSE
BEGIN
writeln('Machine doesn't have primary and secondary axis);
*/
BOOLEAN FUNCTION Is5AxisCNC() BOOLEAN
Test if the machine have a primary and secondary axis.
Definition PP67_TOOLS.LIB:4575

◆ IsCharVarDat()

INTEGER FUNCTION IsCharVarDat ( str_Test :TC255 ,
i :INTEGER  )

Test if a character of a string is a character used for a variable name in .dat file.

Parameters
[in]str_Test: string to test
[in]i: number of character in the string
Returns
CONST_YES if the character is used for variable name, CONST_NO otherwise
strcpy(str_Test,'A1adB_');
IF IsCharVarDat(str_Test,1) THEN
BEGIN
writeln('The character is a .dat variable character');
END
ELSE
BEGIN
writeln('The character is not a .dat variable character');
*/
INTEGER FUNCTION IsCharVarDat(str_Test :TC255, i :INTEGER) INTEGER
Test if a character of a string is a character used for a variable name in .dat file.
Definition PP67_TOOLS.LIB:3994

◆ IsEqual()

BOOLEAN FUNCTION IsEqual ( real_Value1 ,
real_Value2:REAL  )

Test if two values are equal.

The test is done with a tolerance that is TOLERPP

Parameters
[in]real_Value1: First value to test
[in]real_Value2: Second value to test
Returns
True if the values are not equal, false otherwise
real_Value1 := 10;
real_Value2 := 12;
IF IsEqual(real_Value1,real_Value2) THEN
BEGIN
writeln('The two values are equal');
END
ELSE
BEGIN
writeln('The two values are not equal');
*/
BOOLEAN FUNCTION IsEqual(real_Value1, real_Value2:REAL) BOOLEAN
Test if two values are equal.
Definition PP67_TOOLS.LIB:3481

◆ IsGCodeActivated()

BOOLEAN FUNCTION IsGCodeActivated ( int_GCode :INTEGER )

Test if a G code is activated.

Parameters
[in]int_GCode: G code number to test
Returns
True if the G code is activated, False otherwise
int_GCode := 1;
IF IsMCodeActivated(int_GCode) THEN
BEGIN
writeln('The G code is activated');
END
ELSE
BEGIN
writeln('The G code is not activated');
*/
BOOLEAN FUNCTION IsMCodeActivated(int_MCode :INTEGER) BOOLEAN
Test if a M code is activated.
Definition PP67_TOOLS.LIB:3666

◆ IsInf()

BOOLEAN FUNCTION IsInf ( real_Value1 ,
real_Value2:REAL  )

Test if a value is striclty inferior to another one.

Parameters
[in]real_Value1: First value to test
[in]real_Value2: Second value to test
Returns
True if the value1 is inferior to value2, false otherwise
real_Value1 := 10;
real_Value2 := 12;
IF IsInf(real_Value1,real_Value2) THEN
BEGIN
writeln('The value1 is inferior of value2');
END
ELSE
BEGIN
writeln('The value1 is not inferior of value2');
*/
BOOLEAN FUNCTION IsInf(real_Value1, real_Value2:REAL) BOOLEAN
Test if a value is striclty inferior to another one.
Definition PP67_TOOLS.LIB:3519

◆ IsInteger()

BOOLEAN FUNCTION IsInteger ( real_Value:REAL )

Test if a real value is integer with 3 decimals.

Parameters
[in]real_Value: Value to test
Returns
True if the value is integer fasle otherwise
real_Value := 2;
IF IsInteger(real_Value) THEN
BEGIN
writeln('Is Integer');
END
ELSE
BEGIN
writeln('Not Integer');
*/
BOOLEAN FUNCTION IsInteger(real_Value:REAL) BOOLEAN
Test if a real value is integer with 3 decimals.
Definition PP67_TOOLS.LIB:2887

◆ IsKeyActivated()

BOOLEAN FUNCTION IsKeyActivated ( str_Key :TC255 ,
real_Value :REAL  )

Test if a key is activated.

Parameters
[in]str_Key: Key to test
[in]real_Value: value to test for the key
Returns
True if the key is activated with the real_Value, False otherwise
strcpy(str_Key,'X');
real_Value := 1;
IF IsKeyActivated(str_Key,real_Value) THEN
BEGIN
writeln('The key is activated');
END
ELSE
BEGIN
writeln('The key is not activated');
*/
BOOLEAN FUNCTION IsKeyActivated(str_Key :TC255, real_Value :REAL) BOOLEAN
Test if a key is activated.
Definition PP67_TOOLS.LIB:3746

◆ IsMCodeActivated()

BOOLEAN FUNCTION IsMCodeActivated ( int_MCode :INTEGER )

Test if a M code is activated.

Parameters
[in]int_MCode: M code number to test
Returns
True if the M code is activated, False otherwise
int_MCode := 51;
IF IsMCodeActivated(int_MCode) THEN
BEGIN
writeln('The M code is activated');
END
ELSE
BEGIN
writeln('The M code is not activated');
*/

◆ IsModalKeyInteger()

BOOLEAN FUNCTION IsModalKeyInteger ( str_Key:TC255 )

Test if a key of GPP is modal.

Parameters
[in]str_Key: key to test
Returns
True if key is defined as modal in the GPP
strcpy(str_Key,'X');
IF IsModalKeyInteger(str_Key) THEN
BEGIN
writeln('The key is modal');
END
ELSE
BEGIN
writeln('The key is not modal');
*/
BOOLEAN FUNCTION IsModalKeyInteger(str_Key:TC255) BOOLEAN
Test if a key of GPP is modal.
Definition PP67_TOOLS.LIB:3629

◆ IsNotEqual()

BOOLEAN FUNCTION IsNotEqual ( real_Value1 ,
real_Value2:REAL  )

Test if two values are not equal.

The test is done with a tolerance that is TOLERPP

Parameters
[in]real_Value1: First value to test
[in]real_Value2: Second value to test
Returns
True if the values are not equal, false otherwise
real_Value1 := 10;
real_Value2 := 12;
IF IsNotEqual(real_Value1,real_Value2) THEN
BEGIN
writeln('The two values are not equal');
END
ELSE
BEGIN
writeln('The two values are equal');
*/
BOOLEAN FUNCTION IsNotEqual(real_Value1, real_Value2:REAL) BOOLEAN
Test if two values are not equal.
Definition PP67_TOOLS.LIB:3441

◆ IsNull()

BOOLEAN FUNCTION IsNull ( real_Value:REAL )

Test if a real value is equal to 0.

The test is done with a tolerance that is TOLERPP

Parameters
[in]real_Value: value to test
Returns
True is the value is equal to 0 false otherwise
real_Value := 0.1;
IF IsNull(real_Value) THEN
BEGIN
writeln('The value is null');
END
ELSE
BEGIN
writeln('The value is not null');
*/
BOOLEAN FUNCTION IsNull(real_Value:REAL) BOOLEAN
Test if a real value is equal to 0.
Definition PP67_TOOLS.LIB:3401

◆ IsNumberChar()

INTEGER FUNCTION IsNumberChar ( str_Test :TC255 ,
i :INTEGER  )

Test if a character of a string is a number.

Parameters
[in]str_Test: string to test
[in]i: number of character in the string
Returns
CONST_YES if the character is a number, CONST_NO otherwise
strcpy(str_Test,'a1b2');
IF IsNumberChar(str_Test,1) THEN
BEGIN
writeln('The character is a number');
END
ELSE
BEGIN
writeln('The character is not a number');
*/
INTEGER FUNCTION IsNumberChar(str_Test :TC255, i :INTEGER) INTEGER
Test if a character of a string is a number.
Definition PP67_TOOLS.LIB:3891

◆ IsNumericalChar()

INTEGER FUNCTION IsNumericalChar ( VAR str_Test:TC255 ,
i:INTEGER  )

Test if a character of a string is a numerical character.

Parameters
[in]str_Test: string to test
[in]i: number of character in the string
Returns
CONST_YES if the character is a numerical character, CONST_NO otherwise
strcpy(str_Test,'a1+b2.');
IF IsNumbericalChar(str_Test,1) THEN
BEGIN
writeln('The character is a numerical character');
END
ELSE
BEGIN
writeln('The character is not a numerical character');
*/

◆ IsSameStr()

BOOLEAN FUNCTION IsSameStr ( str_1 ,
str_2 :TC255  )

Test if two string are the same.

Parameters
[in]str_1: first string to compare
[in]str_2: second string to compare
Returns
True is the two string are the same, false otherwise
strcpy(str_1,'abcde');
strcpy(str_2,'abcde');
IF IsSameStr(str_1,str_2) THEN
BEGIN
writeln('the two strings are the same');
END
ELSE
BEGIN
writeln('the two strings are not the same');
*/
BOOLEAN FUNCTION IsSameStr(str_1, str_2 :TC255) BOOLEAN
Test if two string are the same.
Definition PP67_TOOLS.LIB:3357

◆ IsSup()

BOOLEAN FUNCTION IsSup ( real_Value1 ,
real_Value2:REAL  )

Test if a value is striclty superior to another one.

Parameters
[in]real_Value1: First value to test
[in]real_Value2: Second value to test
Returns
True if the value1 is superior to value2, false otherwise
real_Value1 := 10;
real_Value2 := 12;
IF IsSup(real_Value1,real_Value2) THEN
BEGIN
writeln('The value1 is superior to value2');
END
ELSE
BEGIN
writeln('The value1 is not superior to value2');
*/
BOOLEAN FUNCTION IsSup(real_Value1, real_Value2:REAL) BOOLEAN
Test if a value is striclty superior to another one.
Definition PP67_TOOLS.LIB:3557

◆ IsTurretRack()

BOOLEAN FUNCTION IsTurretRack ( )

Test if the active tool is mounted on a rack.

Returns
TRUE if the tool is mounted on a rack, FALSE otherwise
BEGIN
writeln('Tool is mounted on a rack');
END
ELSE
BEGIN
writeln('Tool isn't mounted on a rack');
*/
BOOLEAN FUNCTION IsTurretTurret() BOOLEAN
Test if the active tool is mounted on a turret.
Definition PP67_TOOLS.LIB:4643

◆ IsTurretSpindle()

BOOLEAN FUNCTION IsTurretSpindle ( )

Test if the active tool is mounted on a spindle.

Returns
TRUE if the tool is mounted on a spindle, FALSE otherwise
BEGIN
writeln('Tool is mounted on a spindle');
END
ELSE
BEGIN
writeln('Tool isn't mounted on a spindle');
*/

◆ IsTurretTurret()

BOOLEAN FUNCTION IsTurretTurret ( )

Test if the active tool is mounted on a turret.

Returns
TRUE if the tool is mounted on a turret, FALSE otherwise
BEGIN
writeln('Tool is mounted on a turret');
END
ELSE
BEGIN
writeln('Tool isn't mounted on a turret');
*/

◆ ListOrigin()

PROCEDURE ListOrigin ( )

Output the list of origin used by the channel in the NC program.

it will call the procedure OutputLineListOrigin. This procedure must be implemented in the post-processor

Attention
The origin array must be initialize with the procedure InitArrayOrigin
PROCEDURE ListOrigin()
Output the list of origin used by the channel in the NC program.
Definition PP67_TOOLS.LIB:3172

◆ ListTool()

PROCEDURE ListTool ( )

Output the list of tool used by a channel.

Call the procedure OutputLineListTool for each tool used in the channel
The procedure OutputLineListTool must be implemented in the post-processor to format it

PROCEDURE ListTool()
Output the list of tool used by a channel.
Definition PP67_TOOLS.LIB:2183

◆ MessageError()

PROCEDURE MessageError ( int_MessageNum :INTEGER ,
str_Message :TC255  )

Display an error box at the screen.

Parameters
[in]int_MessageNum: number of the message read in MSG_PROC.DAT
[in]str_Message: Default message if the number is not in the MSG_PROC.DAT
strcpy(str_Message,'Be careful behind you');
MessageError(102,str_Message);
PROCEDURE MessageError(int_MessageNum :INTEGER, str_Message :TC255)
Display an error box at the screen.
Definition PP67_TOOLS.LIB:95

◆ MessageErrorCycle()

PROCEDURE MessageErrorCycle ( int_MessageNum :INTEGER ,
str_Message ,
str_CycleName :TC255  )

Display an error box for an error in a cycle with the message read in the MSG_PROC.DAT.

Parameters
[in]int_MessageNum: number of the message read in MSG_PROC.DAT
[in]str_Message: Default message if the number is not in the MSG_PROC.DAT
[in]str_CycleName: Name of the cycle occurs the error
strcpy(str_Message,'Be careful behind you');
strcpy(str_CycleName,'Milling');
MessageErrorCycle(100, str_Message, strCycleName);
PROCEDURE MessageErrorCycle(int_MessageNum :INTEGER, str_Message, str_CycleName :TC255)
Display an error box for an error in a cycle with the message read in the MSG_PROC....
Definition PP67_TOOLS.LIB:123

◆ MessageWarning()

PROCEDURE MessageWarning ( int_MessageNum :INTEGER ,
str_Message :TC255  )

Display a warning box at the screen.

Parameters
[in]int_MessageNum: number of the message read in MSG_PROC.DAT
[in]str_Message: Default message if the number is not in the MSG_PROC.DAT
strcpy(str_Message,'Be careful behind you');
MessageWarning(100,str_Message);
PROCEDURE MessageWarning(int_MessageNum :INTEGER, str_Message :TC255)
Display a warning box at the screen.
Definition PP67_TOOLS.LIB:70

◆ MovePoint()

PROCEDURE MovePoint ( tr3_PtBase ,
tr3_UnitVector :TR3 ,
real_Length :REAL ,
VAR tr3_PtMoved:TR3  )

Move a point into a direction along a unit vector with a given length.

Parameters
[in]tr3_PtBase: start point
[in]tr3_UnitVector: direction to moved
[in]real_Length: distance to move
[out]tr3_PtMoved: point moved
tr3_PtBase[0] := 2;
tr3_PtBase[1] := 2;
tr3_PtBase[2] := 2;
tr3_PtMoved[0] := 0;
tr3_PtMoved[1] := 0;
tr3_PtMoved[2] := 0;
tr3_UnitVector[0] := 1;
tr3_UnitVector[1] := 0;
tr3_UnitVector[2] := 0;
real_Length := 5;
MovePoint(tr3_PtBase,tr3_UnitVector,real_Length,tr3_PtMoved);
writeln('Pt mmoved should be 7,2,2 : ', tr3_PtMoved[0], tr3_PtMoved[1], tr3_PtMoved[2]);
PROCEDURE MovePoint(tr3_PtBase, tr3_UnitVector :TR3, real_Length :REAL, VAR tr3_PtMoved:TR3)
Move a point into a direction along a unit vector with a given length.
Definition PP67_TOOLS.LIB:236

◆ ReadStockInformations()

PROCEDURE ReadStockInformations ( )

Read the information about the stock and call the good procedrue to output NC code.

the procedure will call the OutputRoundStock or OutputParallelStock
Those procedures must be implemented in the post-processor
For Parallel stock :
width is on the X axis
Length is on the Y axis
Height is on the Z axis

PROCEDURE ReadStockInformations()
Read the information about the stock and call the good procedrue to output NC code.
Definition PP67_TOOLS.LIB:2825

◆ ReadValKey()

INTEGER FUNCTION ReadValKey ( str_Find:TC255 ,
str_Key:TC255 ,
int_Ind:INTEGER ,
VAR real_Val:REAL  )

Read the value of a key in a string.

Parameters
[in]str_Find: the string inside find the key value
[in]str_Key: the key we are looking
[in]int_Ind: the repetition we search, 0 to don't use, so we return the first
[out]real_Val: the read value
Returns
CONST_YES if a value is read, CONST_NO otherwise
strcpy(str_Find,'M10 M11 M12');
strcpy(str_Search,'M');
int_Ret := ReadValKey(str_Find,str_Search,0,real_Val);
writeln('int_Ret should be 1 : ', int_Ret);
writeln('real_Val should be 10 : ', real_Val);
int_Ret := ReadValKey(str_Find,str_Search,2,real_Val);
writeln('int_Ret should be 1 : ', int_Ret);
writeln('real_Val should be 12 : ', real_Val);
int_Ret := ReadValKey(str_Find,str_Search,3,real_Val);
writeln('int_Ret should be 1 : ', int_Ret);
writeln('real_Val should be 0 : ', real_Val);
INTEGER FUNCTION ReadValKey(str_Find:TC255, str_Key:TC255, int_Ind:INTEGER, VAR real_Val:REAL) INTEGER
Read the value of a key in a string.
Definition PP67_TOOLS.LIB:3794

◆ RenameNCFile()

PROCEDURE RenameNCFile ( str_NewName:TC255 )

Rename the output NC file.

Parameters
[in]str_NewName: the nex name of the NC program
strcpy(str_NewName,'Name Of Prog');
RenameNCFile(str_NewName);
PROCEDURE RenameNCFile(str_NewName:TC255)
Rename the output NC file.
Definition PP67_TOOLS.LIB:3310

◆ StrConcatSpaces()

PROCEDURE StrConcatSpaces ( VAR str_Line :TC255 ,
int_LenMax :INTEGER  )

Cut or add some space to have a maximum length for a string following by a space and |.

Parameters
[out]str_Line: Line to treat
[in]int_LenMax: maximum length
strcpy(str_String,'Test');
StrConcatSpaces(str_String, 8);
writeln('str_String should be Test | : ', str_String);
PROCEDURE StrConcatSpaces(VAR str_Line :TC255, int_LenMax :INTEGER)
Cut or add some space to have a maximum length for a string following by a space and |.
Definition PP67_TOOLS.LIB:3850

◆ strcpyTestNull()

PROCEDURE strcpyTestNull ( VAR str_Ret :TC255 ,
str_Test :TC255  )

Copy a string in another one only if not null.

Parameters
[out]str_Ret: return string
[in]str_Test: string to copy
strcpy(str_Test,'My Text');
strcpyTestNull(str_Ret,str_Test);
writeln('str_Ret should contain My Text : ', str_Ret);
strcpy(str_Ret,'Text 2')
str_Test[0] := chr(0);
strcpyTestNull(str_Ret,str_Test);
writeln('str_Ret should contain Text 2 : ', str_Ret);
PROCEDURE strcpyTestNull(VAR str_Ret :TC255, str_Test :TC255)
Copy a string in another one only if not null.
Definition PP67_TOOLS.LIB:3592

◆ StringReplace()

PROCEDURE StringReplace ( VAR str_Base:TC255 ,
str_Search ,
str_Replace:TC255  )

Replace a part of string in a string by an other string.

Parameters
[out]str_Base: string will be treat by procedure
[in]str_Search: the string that will be search
[in]str_Replace: the string that will be replace
strcpy(str_Base,'abcdefcdgh');
strcpy(str_Search,'cd');
strcpy(str_Replace,'123');
StringReplace(str_Base, str_Search,str_Replace);
writeln('str_Base should be ab123ef123gh : ', str_Base);
PROCEDURE StringReplace(VAR str_Base:TC255, str_Search, str_Replace:TC255)
Replace a part of string in a string by an other string.
Definition PP67_TOOLS.LIB:2775

◆ ToolRealString()

PROCEDURE ToolRealString ( VAR str_String :TC255 )

Replace 0 by spaces after . in a string like '12.00,' or '12.00)'.

Parameters
[out]str_String: string to treat
strcpy(str_String,'12.00)');
ToolRealString(str_String);
writeln('sting should be 12. ) ', str_String);
PROCEDURE ToolRealString(VAR str_String :TC255)
Replace 0 by spaces after . in a string like '12.00,' or '12.00)'.
Definition PP67_TOOLS.LIB:617

◆ ToolSuppressSpace()

PROCEDURE ToolSuppressSpace ( VAR str_String :TC255 )

Suppress spaces in a string.

Parameters
[out]str_String: string to treat
strcpy(str_String,'My string with spaces);
ToolSuppressSpace(str_String);
writeln('string result should be Mystringwithspaces : ', str_String);

◆ VectorLength()

REAL FUNCTION VectorLength ( tr3_Vector :TR3 )

Return the norm of a vector.

Parameters
[in]tr3_Vector: Vector to compute the length
Returns
The norm of a vector
tr3_Vector[0] := 2;
tr3_Vector[1] := 3;
tr3_Vector[2] := 4;
real_Norm := VectorLength(tr3_Vector);
writeln('real norm should be 5.385 : ', real_Norm);
REAL FUNCTION VectorLength(tr3_Vector :TR3)
Return the norm of a vector.
Definition PP67_TOOLS.LIB:154

Normalize a vector

Parameters
[out]rt3_Vector: Vector that will be normalize
tr3_Vector[0] := 2;
tr3_Vector[1] := 2;
tr3_Vector[2] := 2;
NormalizeVector(tr3_Vector);
writeln('normalized vector component should be 0.577 : ',tr3_Vector[0], tr3_Vector[1], tr3_Vector[2]);