Component: G Code Parser (Mechatronics)

From Flowcode Help
Jump to navigationJump to search


Author Matrix Ltd
Version 1.1 (Development)
Category Mechatronics
This inherits from 3D Printer


Image G Code Parser component

A set of routines to allow a G-Code type file to be parsed a line at a time and the coordinates to be collected. Simulates the G commands via a simulation only 3D printer component but can also be used to pass values to actual hardware.

Examples

No additional examples


Downloadable macro reference

GetAxis

Returns the value of the Axis generated from the ParseCommand function.

0 = Read X, 1 = Read Y, 2 = Read Z

Parameters

BYTE Axis
Specifies which axis to read 0/'x'/'X' - 1/'y'/'Y' - 2/'z'/'Z'


Return value

FLOAT


GetCoordinateMode

Returns the current coordinate mode.

0 = Absolute

1 = Relative

Parameters

This macro has no parameters


Return value

BYTE


Parse_G_Command

No additional information


Parameters

<- STRING Command
This parameter may be returned back to the caller


Return value

This call does not return a value


Initialise

No additional information


Parameters

This macro has no parameters


Return value

This call does not return a value


Simulation macro reference

This component inherits simulation macros from 3D Printer

ClearPrevPrint

Clears all of the content from any previous print cycles.

This call is provided by 3D Printer

Parameters

This macro has no parameters


Return value

This call does not return a value


ControlPrintHead

Controls the print extruder which plots the location of the print head as the head moves.

If Enable = 0 then the extruder is disabled

If Enable != 0 then the extruder is enabled

This call is provided by 3D Printer

Parameters

BYTE Enable
Controls if the extruder is active or not


Return value

This call does not return a value


MoveByXYZ

Moves the print head by the amount specified in the axis variables using linear interpolation.

This call is provided by 3D Printer

Parameters

INT X
INT Y
INT Z


Return value

This call does not return a value


SetMovementSpeed

Allows the movement speed to be set progmatically.

Range 0 - 100

This call is provided by 3D Printer

Parameters

BYTE Speed
Speed control (0 - 100)


Return value

This call does not return a value


MoveToHome

Returns the print head to the start position (0,0,0)

This call is provided by 3D Printer

Parameters

This macro has no parameters


Return value

This call does not return a value


MoveToXYZ

Moves the print head to the specific location specified in the axis variables using linear interpolation.

This call is provided by 3D Printer

Parameters

UINT X
UINT Y
UINT Z


Return value

This call does not return a value


MoveByXYZReal

Moves the print head by the amount specified in the axis variables using linear interpolation.

This call is provided by 3D Printer

Parameters

FLOAT X
FLOAT Y
FLOAT Z


Return value

This call does not return a value


SetMovementSpeedReal

Allows the movement speed to be set progmatically.

Range 0.0 - 100.0

This call is provided by 3D Printer

Parameters

FLOAT Speed
Speed control (0 - 100)


Return value

This call does not return a value


MoveToXYZReal

Moves the print head to the specific location specified in the axis variables using linear interpolation.

This call is provided by 3D Printer

Parameters

FLOAT X
FLOAT Y
FLOAT Z


Return value

This call does not return a value


Initialise

Sets up the 3D printer component by homing, clearing old print data and assigning the movement speed.

This call is provided by 3D Printer

Parameters

This macro has no parameters


Return value

This call does not return a value



Property reference

Bed Color

This property is of type Color picker and can be referenced with the variable name Col_Bed.

No additional information


Print Color

This property is of type Color picker and can be referenced with the variable name Col_Print.

No additional information


Print Speed

This property is of type Unsigned integer and can be referenced with the variable name print_speed.

No additional information


Print Type

This property is of type Fixed list of ints and can be referenced with the variable name PrintType.

No additional information


Print Size

This property is of type Floating point and can be referenced with the variable name Print_Size.

No additional information


Print Shape

This property is of type Fixed list of ints and can be referenced with the variable name Shape.

No additional information


X Width

This property is of type Unsigned integer and can be referenced with the variable name X_Width.

No additional information


Y Length

This property is of type Unsigned integer and can be referenced with the variable name Y_Length.

No additional information


Z Height

This property is of type Unsigned integer and can be referenced with the variable name Z_Height.

No additional information