<< Click to Display Table of Contents > G-Code Conversion |
![]() ![]() ![]() |
The following FCI commands are found in this chapter:
Command |
Description |
---|---|
Converts G-Code file (*.cnc) to *.unf file. |
|
Convert G-Code file. |
|
Returns status of current conversion. |
Table 8: Overview Commands G-Code Conversion
Converts G-Code file (*.cnc) to *.unf file |
|
|||
---|---|---|---|---|
Description |
The command CGF converts the G-Code file given by <Name> into an .unf file. The file name is case sensitive and has to exist already in the '\jobs' directory of the USC-2 card. <fast_mode> specifies if the G-Code Commands GOTOF and CALL will be ignored and if there will be a log file of the conversion. |
|||
<Name> |
Value: <string> |
Function |
||
empty |
Not available. This parameter is obligatory. |
|||
0 |
Abort a running conversion |
|||
Name |
Filename with extension. |
|||
<fast_mode> |
Value: <int> |
Function |
||
empty |
Only available if parameter 1 is "0". |
|||
0 |
Disables the fast mode. The full G-Code command set will be interpreted at the conversion. |
|||
1 |
Enables the fast mode. In fast mode the commands GOTOF and CALL will be ignored and there won't be a log file of the conversion. |
|||
Example |
Command |
Return |
Note |
|
CGF testfile.cnc 0 |
0: |
Convert file testfile.cnc |
||
CGF testfile.cnc |
2: |
Too few paramters
|
||
Notes |
•The command CGF generates a debug log file g_code_to_unf.log at the USC-2 FTP test folder. To look for compile errors, please search for "UNKNOWN" within g_code_to_unf.log file. •The file name is case sensitive and has to exist in the '\jobs' directory of the USC-2 card. •Assign converted job to the joblist via the command JLA. |
|||
Save |
N/A |
|||
Restriction |
•Command is not available for USC-3. •Set: not allowed during marking |
|||
Errors |
•2: Too few parameters •5: Not allowed during markingc •8: Parameter out of range •17: Wrong parameter type |
Table 9: CGF
Convert G-Code file |
|
|||
---|---|---|---|---|
Description |
The command GCF converts the G-Code file given by <Par1> into an .unf file. The file name is case sensitive and has to exist already in the '\jobs' directory of the USC-3 card. Parameter 2 specifies the conversion mode. With parameter 3, a log can be activated. |
|||
<Name>
|
Value: <string> |
Function |
||
empty |
Not available. This parameter is obligatory. |
|||
Name |
Name of the G-Code file (with extension) stored on the card which should be converted. The file name is case sensitive and has to exist in the '\jobs' directory of the USC-3 card. |
|||
<Mode> [optional]
|
Value: <int> |
Function |
||
empty |
Without this parameter, the default value is taken (0). Without this parameter, parameter 3 cannot be used. |
|||
0 |
Normal conversion mode. This is the default mode. The full G-Code command set will be interpreted at the conversion. |
|||
1 |
Fast conversion mode. In fast mode, the commands GOTOF and CALL will be ignored and there won't be a log file of the conversion. |
|||
<Log> [optional]
|
Value: <int> |
Function |
||
empty |
Without this parameter, the default value is taken (0). |
|||
0 |
No log will be written. This is the default setting. |
|||
1 |
A log will be written. Not available for <Mode> = 1. |
|||
Example |
Command |
Return |
Note |
|
GCF GCode.cnc |
0: |
The G-Code file "GCode" is converted into GCode.unf. |
||
GCF MyG.cnc |
4: |
Job not valid. Check if the file MyG.cnc exists in the \jobs directory of the USC-3 card. |
||
Notes |
•The command GCF generates a debug log file g_code_to_unf.log at the USC-3 FTP test folder. To look for compile errors, please search for "UNKNOWN" within g_code_to_unf.log file. •The conversion is finished when the return value 0: is received. • To be able to use the command GCF, the file sc_gcode_defines.cnc must be present in ftp://USC-3-IP/misc/. It can be empty. |
|||
Save |
N/A |
|||
Restriction |
•Command is not available for USC-2. |
|||
Errors |
•2: Too few parameters •4: Job not valid •8: Parameter out of range |
Table 10: GCF
Returns status of current conversion |
|
|||
---|---|---|---|---|
Description |
Returns the status of the current conversion. |
|||
<Mode>
|
Value: <int> |
Function |
||
empty |
Not available. This parameter is obligatory. |
|||
0 |
Returns the current line number of the *.cnc file which is been converted. If the conversion is complete this call returns the last line number of the last converted file, all lines without "$" at the beginning are counted. |
|||
1 |
Returns the progress of the conversion. If the return value is '1' the conversion is in progress, '0' indicates a completed conversion. |
|||
2 |
Returns the job number of the converted *.unf file. During the conversion the return value is '-1'. After the conversion the job number of the last converted *.unf file of the USC-2 Flash is returned. |
|||
3 |
Returns the name of the last converted *.cnc file. |
|||
Example |
Command |
Return |
Note |
|
GGI 0 |
0: 3023 |
Number of lines in file without "$" at the beginning is 3023 |
||
GGI 1 |
0: 1 |
Conversion in progress |
||
|
0: 0 |
gibt immer 0 zurück. |
||
GGI 3 |
0: testfile |
File name without extension. |
||
Notes |
- |
|||
Save |
N/A |
|||
Restriction |
•Command is not available for USC-3. •Not allowed during marking |
|||
Errors |
•2: Too few parameters •5: Not allowed during marking •8: Parameter out of range •17: Wrong parameter type |
Table 11: GGI