× Forum Header

mesa 5i25/7i77 Yaskawa servo

More
04 Feb 2019 08:37 #125648 by PCW
Replied by PCW on topic mesa 5i25/7i77 Yaskawa servo
You also need to set the analog enable for analog channels 0..4:
hm2_5i25.0.7i77.0.1.analogena
The following user(s) said Thank You: IanK

Please Log in or Create an account to join the conversation.

More
10 Feb 2019 02:26 #126119 by IanK
Replied by IanK on topic mesa 5i25/7i77 Yaskawa servo
Thanks PCW. That’s great. It’s such a milestone for a beginner to get to the stage of sending a real measurable signal to the outside world! We’re probably ready to take it down to the workshop and hook it up for more debugging.

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.

More
10 Feb 2019 15:50 #126151 by PCW
Replied by PCW on topic mesa 5i25/7i77 Yaskawa servo
The difference in the pin names is that the encoder logic is entirely
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.

More
12 Feb 2019 13:10 #126263 by IanK
Replied by IanK on topic mesa 5i25/7i77 Yaskawa servo
Thanks again PCW. Hoping I can test your patience a bit more as I try and get familiar with the HAL system. Terms appear in the HAL files produced by pnconfwizard that I’m not yet sure of. I’m hoping you can confirm or otherwise as to whether I’m getting the picture.

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.

More
12 Feb 2019 15:23 #126272 by PCW
Replied by PCW on topic mesa 5i25/7i77 Yaskawa servo
x-pos-fb is a signal (a way of connecting pins)

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.

More
13 Feb 2019 23:26 #126418 by andypugh

For instance “x-pos-fb”. It appears to be a global variable? Is it a reserved word in the global HAL system?

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.

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?

Very nearly, though the actual syntax would be
net ians-arbitrary-signal-name hm2_5i25.0.encoder.03.position => pid.x.feedback

net x-pos-fb => axis.0.motor-pos-fb
What does the “axis” module do? It is not included in the servo thread.

"axis", "joint" and (in the dev version) "spindle" pins all belong to the "motion" HAL module.
linuxcnc.org/docs/2.7/html/man/man9/motion.9.html

Please Log in or Create an account to join the conversation.

More
14 Feb 2019 12:59 #126448 by IanK
Replied by IanK on topic mesa 5i25/7i77 Yaskawa servo
Thanks PCW and Andy. I went through the tutorial again. You do miss things. Yes variables are introduced on the fly. (I’ve programmed in Pascal where you have to be more particular about variables).

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.

More
14 Feb 2019 14:37 #126461 by andypugh

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
becomes
loadrt motmod
when substituted from an INI file:
github.com/LinuxCNC/linuxcnc/blob/master...sim/axis/axis_mm.ini

Please Log in or Create an account to join the conversation.

More
22 Mar 2019 07:10 #129244 by IanK
Replied by IanK on topic mesa 5i25/7i77 Yaskawa servo
hi there,

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.

More
22 Mar 2019 13:06 #129253 by Todd Zuercher
Somewhere in your hal file there should be another line something like “net x-neg-limit <= hm2...". That should tell you which pin it's connected to. You can also look up the signal name in Halshow and that will show you all the hal pins connected to it.

Please Log in or Create an account to join the conversation.

Time to create page: 0.149 seconds
Powered by Kunena Forum