GO2cam Pascal API

Functions

PROCEDURE OutputCyclDef (str_CyclNo :TC255, int_ReadMessage :INTEGER)
 Output a Cycl def block for heidenhain CNC.
 
PROCEDURE OutputTchProbe (str_CyclNo :TC255, int_ReadMessage :INTEGER)
 Output a tch probe block for heidenhain CNC.
 
PROCEDURE ReadHeidenhainCyclName (int_MessageNum :INTEGER, VAR str_Message :TC255)
 Read the cycle name of Heidenhain cycle.
 
PROCEDURE ReadHeidenhainQName (int_MessageNum :INTEGER, VAR str_Message :TC255)
 Read a Q parameter name for Heidenhain cycle.
 
PROCEDURE UpdateFormatEndBlock (int_UpdateType:INTEGER)
 Modify the end of block for heidenhain.
 

Output a heidenhain cycle with good format

If some paramater must follow the line it must be output before the calling of this procedure
if the cycle number is an integer, it output ~ after the block
if the cycle number is real the number is output with a trailing 0

Parameters
[in]str_CyclNo: number of cycle to output
[in]str_KeyMessage: define the text that will be outputed before the cycle number
[in]int_ReadMessage: CONST_YES if a comment message must be read in the MSG_PROC file, CONST_NO otherwise The str_CyclNo can be used to output cycle not existing in the language in this case
strcpy(str_CyclNo,'200');
strcpy(str_KeyMessage,'CYCL DEF');
OutputCyclHeidenhain(str_CyclNo, str_KeyMessage, CONST_YES);
writeln('Should output CYCL DEF 200 DRILLING~');
strcpy(str_CyclNo,'200 TEST CYCL');
strcpy(str_KeyMessage,'CYCL DEF');
OutputCyclHeidenhain(str_CyclNo, str_KeyMessage, CONST_NO);
writeln('Should output CYCL DEF 200 TEST CYCL~');
PROCEDURE OutputCyclHeidenhain (str_CyclNo, str_KeyMessage :TC255, int_ReadMessage :INTEGER)
 

Format a string to output a cycl def or touch probe cycle of heidenhain

Warning
The chr(254) is used instead ~ because ~ is used internally. chr(254) will be replace by pp when processing
Parameters
[in]str_CyclNo: number of cycle to output
[in]str_KeyMessage: define the text that will be outputed before the cycle number
[in]int_ReadMessage: CONST_YES if a comment message must be read in the MSG_PROC file, CONST_NO otherwise The str_CyclNo can be used to output cycle not existing in the language in this case
[out]str_Ret: formated string
strcpy(str_CyclNo,'200');
strcpy(str_KeyMessage,'CYCL DEF');
FormatCyclHeidenhain(str_CyclNo, str_KeyMessage, CONST_YES,str_Ret);
writeln('str_Ret should be CYCL DEF 200 DRILLING~',str_Ret);
strcpy(str_CyclNo,'200 TEST CYCL');
strcpy(str_KeyMessage,'CYCL DEF');
FormatCyclHeidenhain(str_CyclNo, str_KeyMessage, CONST_NO,str_Ret);
writeln('str_Ret should be CYCL DEF 200 TEST CYCL~', str_Ret);
PROCEDURE FormatCyclHeidenhain (str_CyclNo, str_KeyMessage :TC255, int_ReadMessage :INTEGER, VAR str_Ret :TC255)
 
PROCEDURE OutputCyclDefQParam (int_NumberQParam :INTEGER, real_QValue :REAL, int_OutputTilde :INTEGER)
 Output cycle def Q parameter for heidenhain cycle.
 
PROCEDURE OutputCyclDefQParamFormat (int_NumberQParam :INTEGER, real_QValue :REAL, int_OutputTilde, int_FormatReal :INTEGER)
 Output cycle def Q parameter for heidenhain cycle.
 
PROCEDURE FormatCyclDefQParam (int_NumberQParam :INTEGER, str_Message :TC255, real_QValue :REAL, int_OutputTilde :INTEGER, VAR str_Ret:TC255)
 Format the line to output for a cycl def or tch probe cycle of heindenhain CNC.
 
PROCEDURE FormatCyclDefQParamFormat (int_NumberQParam :INTEGER, str_Message :TC255, real_QValue :REAL, int_OutputTilde :INTEGER, VAR str_Ret:TC255, int_FormatReal :INTEGER)
 Format the line to output for a cycl def or tch probe cycle of heindenhain CNC with the format of value to convert.
 
INTEGER FUNCTION GetFormatQParam (int_QParam :INTEGER) INTEGER
 Get the format of Q parameter for cycl def of heidenhain.
 

Detailed Description

Function Documentation

◆ FormatCyclDefQParam()

PROCEDURE FormatCyclDefQParam ( int_NumberQParam :INTEGER ,
str_Message :TC255 ,
real_QValue :REAL ,
int_OutputTilde :INTEGER ,
VAR str_Ret:TC255  )

Format the line to output for a cycl def or tch probe cycle of heindenhain CNC.

Parameters
[in]int_NumberQParam: The number of Q parameter
[in]str_Message: the comment to display after the Q parameter, if the sting if emtpy, the comment will be read int he msg_proc file of the current language
[in]real_QValue: The value to set in the Q parameter
[in]int_OutputTilde: Define if a tilde must be added at the end of line
[out]str_Ret: The formatted line
int_NumberQParam := 200;
str_Message[0] := chr(0);
real_QValue := 3.215;
int_OutputTilde := CONST_YES;
FormatCyclDefQParam(int_NumberQParam,str_Message,real_QValue,int_OutputTilde,str_Ret);
writeln('The output in english will be Q200=3.215 ;SET-UP CLEARANCE~ : ', str_Ret);
PROCEDURE FormatCyclDefQParam(int_NumberQParam :INTEGER, str_Message :TC255, real_QValue :REAL, int_OutputTilde :INTEGER, VAR str_Ret:TC255)
Format the line to output for a cycl def or tch probe cycle of heindenhain CNC.
Definition PP67_TOOLS.LIB:4328

◆ FormatCyclDefQParamFormat()

PROCEDURE FormatCyclDefQParamFormat ( int_NumberQParam :INTEGER ,
str_Message :TC255 ,
real_QValue :REAL ,
int_OutputTilde :INTEGER ,
VAR str_Ret:TC255 ,
int_FormatReal :INTEGER  )

Format the line to output for a cycl def or tch probe cycle of heindenhain CNC with the format of value to convert.

Parameters
[in]int_NumberQParam: The number of Q parameter
[in]str_Message: the comment to display after the Q parameter, if the sting if emtpy, the comment will be read int he msg_proc file of the current language
[in]real_QValue: The value to set in the Q parameter
[in]int_OutputTilde: Define if a tilde must be added at the end of line
[in]int_FormatReal: format of real used for the Q param to convert if necessary.See the available constant ConcatValFormat
[out]str_Ret: The formatted line
int_NumberQParam := 200;
str_Message[0] := chr(0);
real_QValue := 3.215;
int_OutputTilde := CONST_YES;
FormatCyclDefQParam(int_NumberQParam,str_Message,real_QValue,int_OutputTilde,str_Ret);
writeln('The output in english will be Q200=3.215 ;SET-UP CLEARANCE~ : ', str_Ret);

◆ GetFormatQParam()

INTEGER FUNCTION GetFormatQParam ( int_QParam :INTEGER )

Get the format of Q parameter for cycl def of heidenhain.

Parameters
[in]int_QParam: The number of the parameter
Returns
the format of parameter : See the list ConcatValFormat
Version
V6.10

◆ OutputCyclDef()

PROCEDURE OutputCyclDef ( str_CyclNo :TC255 ,
int_ReadMessage :INTEGER  )

Output a Cycl def block for heidenhain CNC.

If the cycle number is an integer like '200', it will output ~ after block
If the cycle number is a real number like 1.0, it will be output with trailing 0

Attention
If some parameters should follw the cycl def line, they must be output before
Parameters
[in]str_CyclNo: number of the cycle to output
[in]int_ReadMessage: CONST_YES to read a message in the MSG_PROC file, CONST_NO otherwise
strcpy(str_CyclNo,'1.1');
OutputCyclDef(str_CyclNo,CONST_YES);
writeln('should write CYCL DEF 1.1 SET UP');
PROCEDURE OutputCyclDef(str_CyclNo :TC255, int_ReadMessage :INTEGER)
Output a Cycl def block for heidenhain CNC.
Definition PP67_TOOLS.LIB:4074

◆ OutputCyclDefQParam()

PROCEDURE OutputCyclDefQParam ( int_NumberQParam :INTEGER ,
real_QValue :REAL ,
int_OutputTilde :INTEGER  )

Output cycle def Q parameter for heidenhain cycle.

If the parameter is the last of a cycle, it doesn't need a tilde at the end of line

Parameters
[in]int_NumberQParam: Number of Q parameter to output
[in]real_QValue: value to outuput for the Q parameter
[in]int_OutputTilde: CONST_YES to output a ~ at the end of the line, CONST_NO to not output
OutputCyclDefQParam(200,20,CONST_YES);
writeln('should output Q200=20 ;SET-UP CLEARANCE~')
PROCEDURE OutputCyclDefQParam(int_NumberQParam :INTEGER, real_QValue :REAL, int_OutputTilde :INTEGER)
Output cycle def Q parameter for heidenhain cycle.
Definition PP67_TOOLS.LIB:4253

◆ OutputCyclDefQParamFormat()

PROCEDURE OutputCyclDefQParamFormat ( int_NumberQParam :INTEGER ,
real_QValue :REAL ,
int_OutputTilde ,
int_FormatReal :INTEGER  )

Output cycle def Q parameter for heidenhain cycle.

If the parameter is the last of a cycle, it doesn't need a tilde at the end of line

Parameters
[in]int_NumberQParam: Number of Q parameter to output
[in]real_QValue: value to outuput for the Q parameter
[in]int_OutputTilde: CONST_YES to output a ~ at the end of the line, CONST_NO to not output
[in]int_FormatReal: format of real used for the Q param to convert if necessary.See the available constant ConcatValFormat
Version
V6.10

◆ OutputTchProbe()

PROCEDURE OutputTchProbe ( str_CyclNo :TC255 ,
int_ReadMessage :INTEGER  )

Output a tch probe block for heidenhain CNC.

If the cycle number is an integer like '200', it will output ~ after block
If the cycle number is a real number like 1.0, it will be output with trailing 0

Attention
If some parameters should follw the cycl def line, they must be output before
Parameters
[in]str_CyclNo: number of the cycle to output
[in]int_ReadMessage: CONST_YES to read a message in the MSG_PROC file, CONST_NO otherwise
strcpy(str_CyclNo,'412');
OutputTchProbe(str_CyclNo,CONST_YES);
writeln('should write TCH PROBE 412 DATUM INSIDE CIRCLE');
PROCEDURE OutputTchProbe(str_CyclNo :TC255, int_ReadMessage :INTEGER)
Output a tch probe block for heidenhain CNC.
Definition PP67_TOOLS.LIB:4108

◆ ReadHeidenhainCyclName()

PROCEDURE ReadHeidenhainCyclName ( int_MessageNum :INTEGER ,
VAR str_Message :TC255  )

Read the cycle name of Heidenhain cycle.

Read the cycle name in the section 22 of MSG_PROC.DAT file

Attention
All the cycle number cycle are multiply by 10
for exemple 1.1 will be 11 key or 200 will be 2000
it was because we can't have real number as key in file MSG_PROC
Parameters
[in]int_MessageNum: is the number of message to read
[out]str_Message: is the default message return if the int_MessageNum doesn't exist
strcpy(str_Message,'PECKING');
ReadHeidenhainCyclName(10, str_Message);
PROCEDURE ReadHeidenhainCyclName(int_MessageNum :INTEGER, VAR str_Message :TC255)
Read the cycle name of Heidenhain cycle.
Definition PP67_TOOLS.LIB:2063

◆ ReadHeidenhainQName()

PROCEDURE ReadHeidenhainQName ( int_MessageNum :INTEGER ,
VAR str_Message :TC255  )

Read a Q parameter name for Heidenhain cycle.

The message is read in the file MSG_PROC.DAT depending of the selected language in GO2cam

Attention
The section in the file is 23 although the number category is 13 in the procedure
Parameters
[in]int_MessageNum: is the number of message to read
[out]str_Message: is the default message return if the int_MessageNum doesn't exist
strcpy(str_Message,'SET-UP CLEARANCE');
ReadHeidenhainQName(200,str_Message);
PROCEDURE ReadHeidenhainQName(int_MessageNum :INTEGER, VAR str_Message :TC255)
Read a Q parameter name for Heidenhain cycle.
Definition PP67_TOOLS.LIB:2008

◆ UpdateFormatEndBlock()

PROCEDURE UpdateFormatEndBlock ( int_UpdateType:INTEGER )

Modify the end of block for heidenhain.

Parameters
[in]int_UpdateType: kinf of new ending
0 : standard end of block
1 : ~
2 : ;
3 : ;~
PROCEDURE UpdateFormatEndBlock(int_UpdateType:INTEGER)
Modify the end of block for heidenhain.
Definition PP67_TOOLS.LIB:2113