-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgcode-commons.h
79 lines (65 loc) · 2.43 KB
/
gcode-commons.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/*
============================================================================
Name : gcode-commons.h
Author : Radu - Eosif Mihailescu
Version : 1.0 (2012-08-11)
Copyright : (C) 2012 Radu - Eosif Mihailescu <[email protected]>
Description : Program-wide Generic Use Symbolic Constants
============================================================================
*/
#ifndef GCODE_COMMONS_H_
#define GCODE_COMMONS_H_
/* How many discrete O words we support */
#define GCODE_PROGRAM_CAPACITY 16
/* Where is our parameter store */
#define GCODE_PARAMETER_STORE "parameters.csv"
/* How many parameters we support */
#define GCODE_PARAMETER_COUNT 5400
/* How many parameter updates in a single line we support */
#define GCODE_PARAMETER_UPDATES 53
/* How many tools we support */
#define GCODE_TOOL_COUNT 100
/* Where is the tool data stored */
#define GCODE_TOOL_TYPE_BASE 3200
#define GCODE_TOOL_DIAM_BASE 3300
#define GCODE_TOOL_LEN_BASE 3400
/* Well known parameter numbers */
#define GCODE_PARM_SCALING 71
#define GCODE_PARM_FEED_HOME_X 2001
#define GCODE_PARM_FEED_HOME_Y 2002
#define GCODE_PARM_FEED_HOME_Z 2003
#define GCODE_PARM_BITFIELD1 3004
#define GCODE_PARM_BITFIELD2 3005
#define GCODE_PARM_CURRENT_PALLET 3007
#define GCODE_PARM_CURRENT_TOOL 3101
/* Absolute GCode coordinates at end of current block */
#define GCODE_PARM_FIRST_CEOB 5001
#define GCODE_PARM_FIRST_OFFSET 5081
#define GCODE_PARM_FIRST_HOME 5161
#define GCODE_PARM_FIRST_ZERO 5181
#define GCODE_PARM_FIRST_LOCAL 5211
#define GCODE_PARM_CURRENT_WCS 5220
#define GCODE_PARM_FIRST_WCS 5221
#define GCODE_PARM_WCS_SIZE 20
/* How many nested macro calls we support */
#define GCODE_MACRO_COUNT 16
/* How many nested subprogram calls we support */
#define GCODE_SUBPROGRAM_COUNT 16
/* Handy for trigonometry */
#define GCODE_DEG2RAD 0.0174532925199
#define GCODE_RAD2DEG 57.2957795131
/* Handy for measurements */
#define GCODE_INCH2MM 25.4
/* Handy for batch/vector processing */
#define GCODE_AXIS_X 0
#define GCODE_AXIS_Y 1
#define GCODE_AXIS_Z 2
/* Handy for feeding decimal values back to us */
#define GCODE_REAL_FORMAT "%4.4f"
/* How many moves will we ever queue before executing them */
#define GCODE_LOOKAHEAD_DEPTH 8
/* RS274NGC postulates that any floating-point value that is within 0.0001 of an
* integer, IS that integer for all intents and purposes where integers are
* expected. */
#define GCODE_INTEGER_THRESHOLD 0.0001
#endif /* GCODE_COMMONS_H_ */