Last modified by writer on 2023/09/08 19:06

Show last authors
1 ===== bool IsGCodeRunning () =====
2
3 Checks if PUMOTIX is in G-code execution mode.
4
5 Return value:
6
7 * true - if PUMOTIX is in G-code execution mode.
8
9 ===== bool IsMDIRunning () =====
10
11 Checks if PUMOTIX is in manual command execution mode.
12
13 Return value:
14
15 * true - if PUMOTIX is in the execution mode of the manual input command.
16
17 ===== bool IsRunning () =====
18
19 Checks if PUMOTIX is in G-code or manual entry mode.
20
21 Return value:
22
23 * true - if either of the two IsGCodeRunning () or IsMDIRunning () modes is active.
24
25 ===== bool IsIdle () =====
26
27 Allows you to check whether the PUMOTIX is in standby mode ("on" state of the power button).
28
29 Return value:
30
31 * true - if PUMOTIX is in standby mode.
32
33 ===== bool IsEStop () =====
34
35 Checks if PUMOTIX is in EStop mode ("off" state of the power button).
36
37 Return value:
38
39 * true - if PUMOTIX is in EStop mode.
40
41 ===== void FloodEnable () =====
42
43 Turn on the flood coolant.
44
45 ===== void FloodDisable () =====
46
47 Turn off the flood coolant.
48
49 ===== void MistEnable () =====
50
51 Turn on spray coolant.
52
53 ===== void MistDisable () =====
54
55 Switch off the spray coolant.
56
57 ===== void Stop () =====
58
59 G-code execution stop.
60
61 ===== void EStop () =====
62
63 Emergency stop execution of the G-code and putting the system in Off mode.
64
65 ===== void Sleep (number milliseconds) =====
66
67 Waiting for the specified number of milliseconds.
68
69 Options:
70
71 * number milliseconds - the number of milliseconds during which the execution of the background macro will be suspended.
72
73 ===== void DisplayMessage (string message) =====
74
75 Display in the user interface of a message from a background macro.
76
77 Options:
78
79 * string message - the text of the message that should be shown to the user.
80
81 ===== string Get_Message (number messageId) =====
82
83 Getting one of predefined localized text messages.
84
85 Options:
86
87 * number messageId – message ID (one of the constants defined in the [[**Messages**>>doc:Руководство пользователя.Описание M-кодов.Описание функций макроязыка.Другие команды.WebHome]] list must be passed as this parameter).
88
89 Return value:
90
91 * localized text message.
92
93 ===== bool IsRealDeviceConnected () =====
94
95 Allows you to check device connection.
96
97 Return value:
98
99 * true – if a real device (not a simulator) is selected and connected.
100
101 ===== number GetExecutingMCode () =====
102
103 Getting an executing macro code. It returns -1 if no one macro is executed.
104
105 Return value:
106
107 * macro code.
108
109 ===== string str (number value) =====
110
111 Convert a real number to a string.
112
113 The Lua language supports implicit conversion of a number into a string, but by default for a very small real number the conversion result can have an exponential format, which does not allow using the string as part of a G-code string. For convenience, you can use the str function, which ensures that the number has a decimal representation.
114
115 Options:
116
117 * number value - a real number to be converted.
118
119 Return value:
120
121 * string representation of a given number.
122
123 ===== number GetSystemTickCount () =====
124
125 Getting the number of milliseconds since the operating system started. It can be used to measure time intervals. To get the current calendar date and time in UnixTime, you need to use the standard Lua **os.time()** function.
126
127 Return value:
128
129 * the number of milliseconds since the operating system started.
130
131 ===== void SetUserVariable (number index, number value) =====
132
133 Setting the value of a user variable. This value can be read when another macro is executed, including after restarting PUMOTIX.
134
135 Options:
136
137 * number index - variable number, integer from 0 to 99;
138 * number value - the value of the user variable (real number) that must be set.
139
140 ===== number GetUserVariable (number index) =====
141
142 Getting the value of a user variable.
143
144 Options:
145
146 * number index - the number of the variable, an integer from 0 to 99.
147
148 Return value:
149
150 * current value of the user variable (real number).
151
152 ===== bool GetLedUserValue (number index) =====
153
154 Getting a value of user led (boolean).
155
156 Options:
157
158 * number index – variable number, integer from 0 to 29.
159
160 Return value:
161
162 * bool - user variable value.
163
164 ===== void SetLedUserValue (number index, bool a_value) =====
165
166 Setting a user variable value. This value can be read in another macro, including after PUMOTIX rebooting.
167
168 Options:
169
170 * number index – variable number, integer from 0 to 29;
171 * bool a_value – user variable value.
172
173 ===== number GetNumUserValue (number index) =====
174
175 Getting a user number value (real).
176
177 Options:
178
179 * number index – variable number, integer from 0 to 29.
180
181 Return value:
182
183 * number - user variable value.
184
185 ===== void SetNumUserValue (number index, number value) =====
186
187 Setting a user variable value. This value can be read in another macro, including after PUMOTIX rebooting.
188
189 Options:
190
191 * number index – variable number, integer from 0 to 29;
192 * number value – user variable value (real number) to set.
193
194 ===== string GetStrUserValue (number index) =====
195
196 Getting a user string value.
197
198 Options:
199
200 * number index – variable number, integer from 0 to 29.
201
202 Return value:
203
204 * string – user variable value.
205
206 ===== void SetStrUserValue (number index, string value) =====
207
208 Setting a user variable value. This value can be read in another macro, including after PUMOTIX rebooting.
209
210 Options:
211
212 * number index – variable number, integer from 0 to 29;
213 * string value – user variable value (string) to set.
214
215 ===== void RunGCode () =====
216
217 Start G-code running (similar to pressing the Start button).
218
219 ===== void RunMDI (string command) =====
220
221 Execute a given string of G-code. The function returns immediately after the call and execution of the background operation continues.
222
223 Options:
224
225 * string command – G-code string to execute.
226
227 ===== void WeldOscillatorEnable () =====
228
229 Oscillator on.
230
231 ===== void WeldOscillatorDisable () =====
232
233 Oscilator off.