Use this command to save a piece of G-code to PMC.
See also: G-code
Fieldbus Interface
PMC_GCode_SaveGCode
Inputs
|
Name
|
Data Type
|
Description
|
|
Execute
|
BOOL
|
Execution of the function block begins on a rising edge of this input. |
|
GCodeID
|
USINT
|
G-code ID, valid range is [1,64] |
|
nBytes
|
DINT
|
The size of the G-code file in bytes
|
|
Bytes
|
SINT[0..199999]
|
The byte array to store the G-code
|
|
PM_Controller
|
PMControllerType
|
Data structure that specifies which PMC to connect to. There should be only 1 instance of this variable for each connected PMC. |
Outputs
|
Name
|
Data Type
|
Description
|
|
Done
|
BOOL
|
Execution successful. Function block is finished. (Note: Done will not become TRUE if Execute is already FALSE) |
|
Busy
|
BOOL
|
Function block is active and must continue to be called. |
|
Aborted
|
BOOL
|
Command aborted by another command. |
|
Error
|
BOOL
|
If there is an error in processing the command, then Error = TRUE, otherwise, FALSE. |
|
ErrorID
|
UINT
|
0x0: All OK. Otherwise, please see Fieldbus Reply Codes. |
Ethernet Interface
PMCRTN SaveGCode(int gcodeID, string gcodeText)
Parameters
|
Name
|
Type
|
Description
|
|
gcodeID
|
int
|
G-code ID, valid range is [1,64] |
|
gcodeText
|
string
|
A G-code file parsed into string
|
Returns
|
Name
|
Type
|
Description
|
|
PMCRTN
|
PMCRTN enum
|
ALLOK (0): Command Accepted. Otherwise, please see Ethernet Reply Codes. |
Conditions
|
Operating Conditions
|
|
Preconditions
|
None
|
|
Postconditions
|
The G-code is saved to PMC with the specified ID
|
Description
Use this command to save a piece of G-code to PMC.
See also: G-code