mesa 5i25/7i77 Yaskawa servo
hm2_5i25.0.7i77.0.1.analogena
Please Log in or Create an account to join the conversation.
I have a few questions on the HAL format as I try and understand how the encoder signals are handled.
the line “ net x-output => hm2_5i25.0.7i77.0.1.analogout0 “ sends the x-output as a voltage to the appropriate pin on the 7i77 where it can be hooked to the servo driver. Fair enough
the line “ net x-pos-fb <= hm2_5i25.0.encoder.03.position” appears to read a position signal from the encoder. It won’t be the raw signal from pins on the 7i77 that are connected to the physical encoder but a signal that has gone through a further processing in something also known as the “encoder”.
I’m curious as to why the 7i77 is not explicitly mentioned in the encoder addressing as it was for the output. Where are the encoder signals processed? In the 7i77 or the 5i25? Why the 03?
Cheers Ian
Please Log in or Create an account to join the conversation.
contained in the FPGA (a 5I25 in this case), whereas the 7I77 analog and
digital I/O logic is implemented in external processors
The .03. in the encoder name is the encoder number ( The 6 encoders on the first 7I77 are numbered 00 through 05 )
Please Log in or Create an account to join the conversation.
For instance “x-pos-fb”. It appears to be a global variable? Is it a reserved word in the global HAL system? If so is there a list of all such variables somewhere?
In the test piece of HAL code pnconfwizard has produced for me it appears first in the line.
net x-pos-fb => pid.x.feedback
we then have a line
net x-pos-fb <= hm2_5i25.0.encoder.03.position
at first glance wouldn’t
net hm2_5i25.0.encoder.03.position => pid.x.feedback
do the same job? Or do we need a temporary variable x-pos-fb to hold the value from the previous running of the thread for programming stability? Maybe I’ve answered my own question.
Further on x-pos-fb gets another reference
net x-pos-fb => axis.0.motor-pos-fb
What does the “axis” module do? It is not included in the servo thread. The drive for the x axis, the whole point of the exercise, seems to be passed out via the pid module.
Cheers Ian
Please Log in or Create an account to join the conversation.
I think of signals as wire names
signal names are complete arbitrary:
"blue_wire_1066" would do the same job as
"x-pos-fb" if it was connected to the same pins
(though a bit harder to read)
The axis.xxxx pins are exported from the motion module
man motion
in a terminal window will list all of motions exported pins and their function
I think referring to the hal tutorial here, will answer most of your questions
linuxcnc.org/docs/html/hal/tutorial.html
Please Log in or Create an account to join the conversation.
No, the _signal_ names are entirely arbitrary. The signal name is the first thing after a "net" statement. The _pin_ names exported by the various functions are not arbitrary, those have to exist.For instance “x-pos-fb”. It appears to be a global variable? Is it a reserved word in the global HAL system?
Very nearly, though the actual syntax would beIn the test piece of HAL code pnconfwizard has produced for me it appears first in the line.
net x-pos-fb => pid.x.feedback
we then have a line
net x-pos-fb <= hm2_5i25.0.encoder.03.position
at first glance wouldn’t
net hm2_5i25.0.encoder.03.position => pid.x.feedback
do the same job?
net ians-arbitrary-signal-name hm2_5i25.0.encoder.03.position => pid.x.feedback
"axis", "joint" and (in the dev version) "spindle" pins all belong to the "motion" HAL module.net x-pos-fb => axis.0.motor-pos-fb
What does the “axis” module do? It is not included in the servo thread.
linuxcnc.org/docs/2.7/html/man/man9/motion.9.html
Please Log in or Create an account to join the conversation.
Yes I can now see that axis pins are all listed in the “HAL Configuration” window and are “owned” by 9, the Real Time motmod component. Although it appears in the list of loaded components, motmod is not explicitly loaded at the top of the HAL code. Must be linked in with one of the loadrt instructions I presume.
Please Log in or Create an account to join the conversation.
Although it appears in the list of loaded components, motmod is not explicitly loaded at the top of the HAL code.
It normally is, but is often abstracted to the INI.
github.com/LinuxCNC/linuxcnc/blob/master.../hallib/core_sim.hal
loadrt [EMCMOT]EMCMOT
loadrt motmod
github.com/LinuxCNC/linuxcnc/blob/master...sim/axis/axis_mm.ini
Please Log in or Create an account to join the conversation.
back onto it and wiring it in down at the workshop. Thanks for the great help so far, we’ll need a bit more! Another question on the HAL syntax. (I cpuld just hop in and fiddle but I’m thinking getting a good grasp of HAL operation will help in the long run.)
the HALcode produced by the config wizard has the line
“net x-neg-limit => axis.0.neg-lim-sw-in “
but I can find no hint as to what terminal on the 7i77 the axis module might be looking at.
I assume it will be one of the 0 to 31 inputs of the TB7 and TB8 terminals. Pins/axis of the HAL configuration gives no clues whereas Pins/hm2_5i25 seems to explicitly refer to TB7 and TB8 having pins hm2-5i25.0.7i77.0.0 to 0.31 covered! Is there a bit of cross talk going on? I suppose I could tickle all 32 pins on the blocks with field voltage while watching the HAL config window, but there must be a better way of finding where to wire in the limit switches?
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
- Posts: 5007
- Thank you received: 1441
Please Log in or Create an account to join the conversation.