Trying to understand INI file content
19 May 2014 13:03 #47041
by Muzzer
Trying to understand INI file content was created by Muzzer
I've spent the last week or more digesting the various manuals that cover INI congfig, the HAL manual 2.5, getting started 2.5 etc. It's starting to make sense but there are some holes I just can't fathom out.
For instance, looking in the example HAL file generated by the Pncconf config wizard, I see in the 3 "AXIS" sections that there are entries such as:
setp hm2_5i25.0.stepgen.00.dirsetup [AXIS_0]DIRSETUP
setp hm2_5i25.0.stepgen.00.dirhold [AXIS_0]DIRHOLD
....etc
And when I look over in the INI file I can see those custom variables listed in the [AXIS_0] section, which is fair enough. But there are also some entries in the same section of the INI file such as:
MAX_LIMIT = 8.0
What is that used by? If I set it to zero, the simulation won't run, so it's clearly being picked up by something. There's no reference to MAX_LIMIT anywhere in the HAL file and I also checked the other HAL files to be sure.
The "INI configuration" doc seems to suggest that the [AXIS_X] sections "contain parameters for the individual components in the axis control module". Problem is, I can't see reference to any such module. Scanning the RT compts and drivers hasn't made me any the wiser.
I must have several inches of documents in front of me and yes, I read through all of them but I can't help thinking there's something missing, not just between my ears! Are these variables being picked up by one of the RT compts - and if so, how can I find out which one? I looked at motion earlier but that doesn't seem to be a suspect. Of course, axis is actually the gui, not axis control.
Can anyone put me on the right course here? Thanks!!
Murray (2.4 and 10.04)
For instance, looking in the example HAL file generated by the Pncconf config wizard, I see in the 3 "AXIS" sections that there are entries such as:
setp hm2_5i25.0.stepgen.00.dirsetup [AXIS_0]DIRSETUP
setp hm2_5i25.0.stepgen.00.dirhold [AXIS_0]DIRHOLD
....etc
And when I look over in the INI file I can see those custom variables listed in the [AXIS_0] section, which is fair enough. But there are also some entries in the same section of the INI file such as:
MAX_LIMIT = 8.0
What is that used by? If I set it to zero, the simulation won't run, so it's clearly being picked up by something. There's no reference to MAX_LIMIT anywhere in the HAL file and I also checked the other HAL files to be sure.
The "INI configuration" doc seems to suggest that the [AXIS_X] sections "contain parameters for the individual components in the axis control module". Problem is, I can't see reference to any such module. Scanning the RT compts and drivers hasn't made me any the wiser.
I must have several inches of documents in front of me and yes, I read through all of them but I can't help thinking there's something missing, not just between my ears! Are these variables being picked up by one of the RT compts - and if so, how can I find out which one? I looked at motion earlier but that doesn't seem to be a suspect. Of course, axis is actually the gui, not axis control.
Can anyone put me on the right course here? Thanks!!
Murray (2.4 and 10.04)
Please Log in or Create an account to join the conversation.
19 May 2014 20:32 #47048
by ArcEye
Replied by ArcEye on topic Trying to understand INI file content
Hi
Only a very small number of ini file settings are used directly in hal files, more are used internally.
MAX_LIMIT for example in iniaxis.cc and emcmotglb.c
To see what happens you need to download the source code
git clone git://git.linuxcnc.org/git/linuxcnc.git linuxcnc-dev
Then grep through linuxcnc-dev/src for the ini file parameters you are interested in
regards
Only a very small number of ini file settings are used directly in hal files, more are used internally.
MAX_LIMIT for example in iniaxis.cc and emcmotglb.c
To see what happens you need to download the source code
git clone git://git.linuxcnc.org/git/linuxcnc.git linuxcnc-dev
Then grep through linuxcnc-dev/src for the ini file parameters you are interested in
regards
Please Log in or Create an account to join the conversation.
19 May 2014 22:39 #47056
by andypugh
The INI file is a central repository for information for lots of info for more than just HAL. Some components (such as the motion controller) access it directly without going through HAL.
You can even access the INI file from your own custom HAL components and/or Python modules.
Replied by andypugh on topic Trying to understand INI file content
There's no reference to MAX_LIMIT anywhere in the HAL file
The INI file is a central repository for information for lots of info for more than just HAL. Some components (such as the motion controller) access it directly without going through HAL.
You can even access the INI file from your own custom HAL components and/or Python modules.
Please Log in or Create an account to join the conversation.
21 May 2014 13:46 #47139
by Muzzer
Replied by Muzzer on topic Trying to understand INI file content
I was clearly underestimating how powerful and capable the pncconfig configurator actually is. When I finally understood the various terms and studied the "Axis Configuration" sections of the PNCconf part of "Getting Started" and the "Homing Configuration" doc and was able to enter sensible values for positions and speeds, a lot of the HAL content appeared - and made sense.
However, one thing that still has me completely stumped is the connection of the limit switch pins. I have my max-x limit switch connected up to GPIO.018 (or is it input 01?) but something isn't right.
Looking at the HAL config when running linuxcnc, I can toggle the pin hm2_5i25.0.7i76.0.0.input-01 (I think). But when I configured the IO in PNCconfig, I selected the second line down ("018") to be "X Maximum Limit" and sure enough in the resulting HAL file I see:
# --- MAX-X ---
net max-x <= hm2_5i25.0.gpio.018.in
I assumed that PNCconfig would magically connect the pin to that net but it clearly hasn't. The term with hm2_5i25.0.gpio.018.in contains gpio, whereas the term with hm2_5i25.0.7i76.0.0.input-01 contains 7i76
Running linuxcnc shows that I can cause a limit switch error if I don't invert the inputs (tickboxes in PNCconfig) but actually toggling the real switch input does nothing even though examining the HAL config shows that the input-01 is changing state. How is the connection supposed to be made between these input and GPIO nodes?
Can anyone help me to figure out what's missing here?
Thanks!
However, one thing that still has me completely stumped is the connection of the limit switch pins. I have my max-x limit switch connected up to GPIO.018 (or is it input 01?) but something isn't right.
Looking at the HAL config when running linuxcnc, I can toggle the pin hm2_5i25.0.7i76.0.0.input-01 (I think). But when I configured the IO in PNCconfig, I selected the second line down ("018") to be "X Maximum Limit" and sure enough in the resulting HAL file I see:
# --- MAX-X ---
net max-x <= hm2_5i25.0.gpio.018.in
I assumed that PNCconfig would magically connect the pin to that net but it clearly hasn't. The term with hm2_5i25.0.gpio.018.in contains gpio, whereas the term with hm2_5i25.0.7i76.0.0.input-01 contains 7i76
Running linuxcnc shows that I can cause a limit switch error if I don't invert the inputs (tickboxes in PNCconfig) but actually toggling the real switch input does nothing even though examining the HAL config shows that the input-01 is changing state. How is the connection supposed to be made between these input and GPIO nodes?
Can anyone help me to figure out what's missing here?
Thanks!
Please Log in or Create an account to join the conversation.
21 May 2014 16:12 #47148
by andypugh
Yes, that isn't what you want.
the "gpio" pins are the actual pins on the DB25 connector. Even the output pins can be read as inputs (and this is sometimes useful). GPIO 18 is actually pin 1 on the second (internal) header, and would correspond to the DIR output for stepgen 6. (I think).
I have never used pncconf, so I am not sure how to configure the 7i76 field inputs. Is there a "daughter card" tab for the 7i76 perhaps?
Replied by andypugh on topic Trying to understand INI file content
I assumed that PNCconfig would magically connect the pin to that net but it clearly hasn't. The term with hm2_5i25.0.gpio.018.in contains gpio, whereas the term with hm2_5i25.0.7i76.0.0.input-01 contains 7i76
Yes, that isn't what you want.
the "gpio" pins are the actual pins on the DB25 connector. Even the output pins can be read as inputs (and this is sometimes useful). GPIO 18 is actually pin 1 on the second (internal) header, and would correspond to the DIR output for stepgen 6. (I think).
I have never used pncconf, so I am not sure how to configure the 7i76 field inputs. Is there a "daughter card" tab for the 7i76 perhaps?
Please Log in or Create an account to join the conversation.
21 May 2014 23:04 #47167
by Muzzer
Replied by Muzzer on topic Trying to understand INI file content
Thanks Andy - yes, not surprisingly the answer was staring me in the face. The rightmost tab is called something like "super serial IO" and lists the various terminal block numbers and their individual pin numbers for the 7i76. I should have gone into that. Just like the other tabs, you can specify what is required of each pin (home, limit switch etc), the difference is that these are 7i76 specific rather than just uncommitted GPIO. I guess the tab title put me off, as it's quite different to what the "getting started" manual shows (on page 41, which shows a 5i20 setup). Presumably "Super Serial" refers to a high speed serial link between the FPGA on the 5i25 and the IO devices on the 7i76 (which look like PICs).
Murray
Murray
Please Log in or Create an account to join the conversation.
22 May 2014 09:48 - 22 May 2014 09:50 #47184
by Muzzer
Replied by Muzzer on topic Trying to understand INI file content
Unless you tell it that you have one Smart Serial Port and click "accept changes", the 7i76 tab doesn't appear. Conversely (and more relevantly here) if you accidentally tell it you don't have any, it disappears. The array of GPIO pins is apparently the unused pins of the (not fitted) second 7i76 board which you would do well not to get confused by and shouldn't try to use. The driver supports two 7i76 cards and even if you tell it you only have one, this is what you get.
My limit switches now function correctly. Woohoo. Time to buy a couple more of those closed loop steppers ...
Merry
My limit switches now function correctly. Woohoo. Time to buy a couple more of those closed loop steppers ...
Merry
Last edit: 22 May 2014 09:50 by Muzzer. Reason: Wrong url
Please Log in or Create an account to join the conversation.
22 May 2014 19:25 #47199
by andypugh
You could support your local servo manufacturer instead:
www.dmm-tech.com/
Replied by andypugh on topic Trying to understand INI file content
Time to buy a couple more of those closed loop steppers ...
You could support your local servo manufacturer instead:
www.dmm-tech.com/
Please Log in or Create an account to join the conversation.
23 May 2014 01:11 #47211
by Muzzer
Replied by Muzzer on topic Trying to understand INI file content
Well spotted. They are indeed just up the road from here. The website has only very sketchy info - no torque speed curves and only partial datasheet, so I've asked them for something more meaty.
I've got nothing against proper servos, although they tend to be higher speed / lower torque machines and so will require a decent reduction ratio to get them into their comfort zone without over specifying them, whereas steppers tend to display a constant power characteristic which means that the reduction ratio (if any is required) actually makes very little difference to the max thrust x feed you can achieve at the tool.
And as I'm not planning on using my X and Y axes to do heavy blacksmith drilling operations and I don't spend much time down the pub these days talking about it, the stall torque value is less of a concern than the rapid speed which will suffer if I put in a silly large reduction ratio.
Murray
I've got nothing against proper servos, although they tend to be higher speed / lower torque machines and so will require a decent reduction ratio to get them into their comfort zone without over specifying them, whereas steppers tend to display a constant power characteristic which means that the reduction ratio (if any is required) actually makes very little difference to the max thrust x feed you can achieve at the tool.
And as I'm not planning on using my X and Y axes to do heavy blacksmith drilling operations and I don't spend much time down the pub these days talking about it, the stall torque value is less of a concern than the rapid speed which will suffer if I put in a silly large reduction ratio.
Murray
Please Log in or Create an account to join the conversation.
Time to create page: 0.134 seconds