You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/hal/rtcomps.adoc
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -262,7 +262,7 @@ The component exports two functions. Each function acts on all of the PWM genera
262
262
The high speed function `pwmgen.make-pulses` should be run in the base (fastest) thread, from 10 to 50 µs depending on the capabilities of the computer.
263
263
That thread's period determines the maximum PWM carrier frequency, as well as the resolution of the PWM or PDM signals.
264
264
If the base thread is 50,000 ns then every 50 µs the module decides if it is time to change the state of the output.
265
-
At 50% duty cycle and 25␗Hz PWM frequency this means that the output changes state every (1/25) s / 50 µs * 50% = 400 iterations.
265
+
At 50% duty cycle and 25 Hz PWM frequency this means that the output changes state every (1/25) s / 50 µs * 50% = 400 iterations.
266
266
This also means that you have a 800 possible duty cycle values (without dithering).
267
267
* (funct) `pwmgen.update` - Low speed function to scale and limit value and handle other parameters.
268
268
This is the function of the module that does the more complicated mathematics to work out how many base-periods the output should be high for, and how many it should be low for.
@@ -346,7 +346,7 @@ halcmd: unloadrt encoder
346
346
It is also unaffected by reset or the index pulse.
347
347
* `encoder._<chan>_.reset` (bit, In) - When True, force 'counts' and 'position' to zero immediately.
348
348
* `encoder._<chan>_.velocity` (float, Out) - Velocity in scaled units per second.
349
-
`encoder' uses an algorithm that greatly reduces quantization noise as compared to simply differentiating the 'position' output.
349
+
`encoder` uses an algorithm that greatly reduces quantization noise as compared to simply differentiating the 'position' output.
350
350
When the magnitude of the true velocity is below min-speed-estimate, the velocity output is 0.
@@ -13,50 +13,42 @@ hy_gt_vfd - HAL non-realtime component for Huanyang GT-series VFDs
13
13
14
14
== DESCRIPTION
15
15
16
-
The hy_gt_vfd component interfaces a Huanyang GT-series VFD to the
17
-
LinuxCNC HAL. The VFD is connected via RS-485 serial to the LinuxCNC
18
-
computer.
16
+
The hy_gt_vfd component interfaces a Huanyang GT-series VFD to the LinuxCNC HAL.
17
+
The VFD is connected via RS-485 serial to the LinuxCNC computer.
19
18
20
19
21
20
== Hardware setup
22
21
23
-
At least some Huanyang GT VFDs must be physically modified to enable
24
-
Modbus communication.
22
+
At least some Huanyang GT VFDs must be physically modified to enable Modbus communication.
25
23
26
-
The circuit board location marked "SW1" is identified in the manual as
27
-
"Switch of terminal resistor for RS485 communication". On the only
28
-
VFD I have experience with, the circuit board contained no switch at
29
-
that location, instead holding a pair of crossed jumper wires (top-left
30
-
pad connected to bottom-right pad, top-right to bottom-left). In this
31
-
configuration, no Modbus communication is possible. We had to desolder
32
-
the two crossed jumper wires and re-solder them parallel to each other
33
-
(top-left to bottom-left, top-right to bottom-right).
24
+
The circuit board location marked "SW1" is identified in the manual as "Switch of terminal resistor for RS485 communication".
25
+
On the only VFD I have experience with, the circuit board contained no switch at that location, instead holding a pair of crossed jumper wires (top-left pad connected to bottom-right pad, top-right to bottom-left).
26
+
In this configuration, no Modbus communication is possible.
27
+
We had to desolder the two crossed jumper wires and re-solder them parallel to each other (top-left to bottom-left, top-right to bottom-right).
34
28
35
29
36
30
== Firmware setup
37
31
38
-
The Huanyang GT VFD must be configure via the faceplate to talk Modbus
39
-
with LinuxCNC. Consult the Operation section of the Huanyang GT-series
40
-
Inverter Manual for details. Set the following parameters:
32
+
The Huanyang GT VFD must be configure via the faceplate to talk Modbus with LinuxCNC.
33
+
Consult the Operation section of the Huanyang GT-series Inverter Manual for details.
34
+
Set the following parameters:
41
35
42
36
P0.01 = 2::
43
37
44
38
Set Run Command Source to Modbus serial port.
45
39
46
40
P0.03::
47
41
48
-
Set Maximum Frequency to the maximum frequency you want the VFD to
49
-
output, in Hz.
42
+
Set Maximum Frequency to the maximum frequency you want the VFD to output, in Hz.
50
43
51
44
P0.04::
52
45
53
-
Set Upper Frequency Limit to the maximum frequency you want the VFD
54
-
to output, in Hz. This should be the same as the value in P0.03.
46
+
Set Upper Frequency Limit to the maximum frequency you want the VFD to output, in Hz.
47
+
This should be the same as the value in P0.03.
55
48
56
49
P0.05::
57
50
58
-
Set Lower Frequency Limit to the minimum frequency you want the VFD
59
-
to output, in Hz.
51
+
Set Lower Frequency Limit to the minimum frequency you want the VFD to output, in Hz.
60
52
61
53
P0.07 = 7::
62
54
@@ -72,8 +64,7 @@ P2.02 = ???::
72
64
73
65
P2.03 = ???::
74
66
75
-
Set Motor Rated Speed to the motor's speed in RPM at its rated
76
-
maximum frequency.
67
+
Set Motor Rated Speed to the motor's speed in RPM at its rated maximum frequency.
77
68
78
69
P2.04 = ???::
79
70
@@ -85,13 +76,13 @@ P2.05 = ???::
85
76
86
77
PC.00 = 1::
87
78
88
-
Set Local Address to 1. This matches the default in the hy_gt_vfd
89
-
driver, change this if your setup has special needs.
79
+
Set Local Address to 1.
80
+
This matches the default in the hy_gt_vfd driver, change this if your setup has special needs.
90
81
91
82
PC.01 = 5::
92
83
93
-
Set Baud Rate Selection to 5 (38400 bps). This matches the default
94
-
in the hy_gt_vfd driver, change this if your setup has special needs.
84
+
Set baud rate selection to 5 (38400 bps).
85
+
This matches the default in the hy_gt_vfd driver, change this if your setup has special needs.
95
86
96
87
0 = 1200
97
88
1 = 2400
@@ -102,181 +93,167 @@ PC.01 = 5::
102
93
103
94
PC.02 = 0::
104
95
105
-
Set Data Format (8n1 RTU). This matches the default in the hy_gt_vfd
106
-
driver, change this if your setup has special needs.
96
+
Set Data Format (8n1 RTU).
97
+
This matches the default in the hy_gt_vfd driver, change this if your setup has special needs.
107
98
108
99
PC.03 = 1::
109
100
110
-
Set Communication Delay Time to 1 ms. This is expected by the
111
-
hy_gt_vfd driver.
101
+
Set Communication Delay Time to 1 ms.
102
+
This is expected by the hy_gt_vfd driver.
112
103
113
104
114
105
== OPTIONS
115
106
116
107
*-b*, *--bits* _N_::
117
108
118
-
(default 8) For Modbus communication. Set number of data bits
119
-
to _N_. _N_ must be between 5 and 8 inclusive.
109
+
(default 8) For Modbus communication.
110
+
Set number of data bits to _N_.
111
+
_N_ must be between 5 and 8 inclusive.
120
112
121
113
*-p*, *--parity* [Even,Odd,None]
122
114
123
-
(default None) For Modbus communication. Set serial parity to Even,
124
-
Odd, or None.
115
+
(default None) For Modbus communication.
116
+
Set serial parity to Even, Odd, or None.
125
117
126
118
*-r*, *--rate* _N_::
127
119
128
-
(default 38400) For Modbus communication. Set baud rate to _N_.
129
-
It is an error if the rate is not one of the following: 1200,
130
-
2400, 4800, 9600, 19200, 38400
120
+
(default 38400) For Modbus communication.
121
+
Set baud rate to _N_.
122
+
It is an error if the rate is not one of the following: 1200, 2400, 4800, 9600, 19200, 38400
131
123
132
124
*-s*, *--stopbits* [1,2]::
133
125
134
-
(default 1) For Modbus communication. Set serial stop bits to 1
135
-
or 2.
126
+
(default 1) For Modbus communication.
127
+
Set serial stop bits to 1 or 2.
136
128
137
129
*-t*, *--target* _N_::
138
130
139
-
(default 1) For Modbus communication. Set Modbus target (slave)
140
-
number. This must match the device number you set on the Huanyang
141
-
GT VFD.
131
+
(default 1) For Modbus communication.
132
+
Set Modbus target (slave) number.
133
+
This must match the device number you set on the Huanyang GT VFD.
142
134
143
135
*-d*, *--device* _PATH_::
144
136
145
-
(default /dev/ttyS0) For Modbus communication. Set the name of
146
-
the serial device node to use.
137
+
(default /dev/ttyS0) For Modbus communication.
138
+
Set the name of the serial device node to use.
147
139
148
140
*-v*, *--verbose*::
149
141
150
-
Turn on verbose mode.
142
+
Turn on verbose mode.
151
143
152
144
*-S*, *--motor-max-speed* _RPM_::
153
145
154
-
The motor's max speed in RPM. This must match the motor speed value
155
-
configured in VFD register P2.03.
146
+
The motor's max speed in RPM.
147
+
This must match the motor speed value configured in VFD register P2.03.
156
148
157
149
*-F*, *--max-frequency* _HZ_::
158
150
159
-
This is the maximum output frequency of the VFD in Hz. It should
160
-
correspond to the motor's rated max frequency, and to the maximum
161
-
and upper limit output frequency configured in VFD register P0.03
162
-
and P0.04.
151
+
This is the maximum output frequency of the VFD in Hz.
152
+
It should correspond to the motor's rated max frequency, and to the maximum and upper limit output frequency configured in VFD register P0.03 and P0.04.
163
153
164
154
*-f*, *--min-frequency* _HZ_::
165
155
166
-
This is the minimum output frequency of the VFD in Hz. It should
167
-
correspond to the minimum output frequency configured in VFD
168
-
register P0.05.
156
+
This is the minimum output frequency of the VFD in Hz.
157
+
It should correspond to the minimum output frequency configured in VFD register P0.05.
169
158
170
159
171
160
== PINS
172
161
173
162
174
163
*hy_gt_vfd.period* (float, in)::
175
164
176
-
The period for the driver's update cycle, in seconds. This is
177
-
how frequently the driver will wake up, check its HAL pins, and
178
-
communicate with the VFD. Must be between 0.001 and 2.000 seconds.
179
-
Default: 0.1 seconds.
165
+
The period for the driver's update cycle, in seconds. This is
166
+
how frequently the driver will wake up, check its HAL pins, and
167
+
communicate with the VFD. Must be between 0.001 and 2.000 seconds.
168
+
Default: 0.1 seconds.
180
169
181
170
*hy_gt_vfd.speed-cmd* (float, in)::
182
171
183
-
The requested motor speed, in RPM.
172
+
The requested motor speed, in RPM.
184
173
185
174
*hy_gt_vfd.speed-fb* (float, out)::
186
175
187
-
The motor's current speed, in RPM, reported by the VFD.
176
+
The motor's current speed, in RPM, reported by the VFD.
188
177
189
178
*hy_gt_vfd.at-speed* (bit, out)::
190
179
191
-
True when the drive is on and at the commanded speed (within 2%),
192
-
False otherwise.
180
+
True when the drive is on and at the commanded speed (within 2%),
181
+
False otherwise.
193
182
194
183
*hy_gt_vfd.freq-cmd* (float, out)::
195
184
196
-
The requested output frequency, in Hz. This is set from the
197
-
.speed-cmd value, and is just shown for debugging purposes.
185
+
The requested output frequency, in Hz.
186
+
This is set from the .speed-cmd value, and is just shown for debugging purposes.
198
187
199
188
*hy_gt_vfd.freq-fb* (float, out)::
200
189
201
-
The current output frequency of the VFD, in Hz. This is reported
202
-
from the VFD to the driver.
190
+
The current output frequency of the VFD, in Hz.
191
+
This is reported from the VFD to the driver.
203
192
204
193
*hy_gt_vfd.spindle-on* (bit, in)::
205
194
206
-
Set this pin True to command the spindle on, at the speed requested
207
-
on the .speed-cmd pin. Set this pin False to command the spindle
208
-
off.
195
+
Set this pin True to command the spindle on, at the speed requested on the .speed-cmd pin.
196
+
Set this pin False to command the spindle off.
209
197
210
198
*hy_gt_vfd.output-voltage* (float, out)::
211
199
212
-
The voltage that the VFD is current providing to the motor,
213
-
in Volts.
200
+
The voltage that the VFD is current providing to the motor, in Volts.
214
201
215
202
*hy_gt_vfd.output-current* (float, out)::
216
203
217
-
The current that the motor is currently drawing from the VFD,
218
-
in Amperes.
204
+
The current that the motor is currently drawing from the VFD, in Ampères.
219
205
220
206
*hy_gt_vfd.output-power* (float, out)::
221
207
222
-
The power that the motor is currently drawing from the VFD,
223
-
in Watts.
208
+
The power that the motor is currently drawing from the VFD, in Watts.
224
209
225
210
*hy_gt_vfd.dc-bus-volts* (float, out)::
226
211
227
-
The current voltage of the VFD's internal DC power supply, in Volts.
212
+
The current voltage of the VFD's internal DC power supply, in Volts.
228
213
229
214
*hy_gt_vfd.modbus-errors* (u32, out)::
230
215
231
-
A count of the number of modbus communication errors between the
232
-
driver and the VFD. The driver is resilient against communication
233
-
errors, but a large or growing number here indicates a problem
234
-
that should be investigated.
216
+
A count of the number of modbus communication errors between the driver and the VFD.
217
+
The driver is resilient against communication errors, but a large or growing number here indicates a problem that should be investigated.
235
218
236
219
*hy_gt_vfd.input-terminal* (float, out)::
237
220
238
-
The VFD's input terminal register.
221
+
The VFD's input terminal register.
239
222
240
223
*hy_gt_vfd.output-terminal* (float, out)::
241
224
242
-
The VFD's output terminal register.
225
+
The VFD's output terminal register.
243
226
244
227
*hy_gt_vfd.AI1* (float, out)::
245
228
246
-
The VFD's AI1 register.
229
+
The VFD's AI1 register.
247
230
248
231
*hy_gt_vfd.AI2* (float, out)::
249
232
250
-
The VFD's AI2 register.
233
+
The VFD's AI2 register.
251
234
252
235
*hy_gt_vfd.HDI-frequency* (float, out)::
253
236
254
-
The VFD's HDI-frequency register.
237
+
The VFD's HDI-frequency register.
255
238
256
239
*hy_gt_vfd.external-counter* (float, out)::
257
240
258
-
The VFD's external counter register.
241
+
The VFD's external counter register.
259
242
260
243
*hy_gt_vfd.fault-info* (float, out)::
261
244
262
-
The VFD's fault info register.
245
+
The VFD's fault info register.
263
246
264
247
265
248
== ISSUES
266
249
267
-
The VFD produces the output frequency that it sends to the motor by adding
268
-
a manually specified offset to the frequency command it gets over modbus.
250
+
The VFD produces the output frequency that it sends to the motor by adding a manually specified offset to the frequency command it gets over modbus.
269
251
270
-
The manual offset is controlled by pressing the Up/Down arrows on the
271
-
faceplate while the VFD is turning the motor.
252
+
The manual offset is controlled by pressing the Up/Down arrows on the faceplate while the VFD is turning the motor.
272
253
273
-
If you command a speed on the .speed-cmd pin and get a different speed
274
-
reported on the .speed-fb pin, first verify that the VFD registers
275
-
listed in the FIRMWARE SETUP section above and the driver's command-line
276
-
arguments all agree with the info on the motor's name plate. If you
277
-
still aren't getting the speed you expect, zero the VFD's frequency
278
-
offset by starting the motor running, then pressing the Up/Down buttons
279
-
to zero the offset.
254
+
If you command a speed on the .speed-cmd pin and get a different speed reported on the .speed-fb pin, first verify that the VFD registers listed in the FIRMWARE SETUP section above and
255
+
the driver's command-line arguments all agree with the info on the motor's name plate.
256
+
If you still aren't getting the speed you expect, zero the VFD's frequency offset by starting the motor running, then pressing the Up/Down buttons to zero the offset.
0 commit comments