Hal2Arduino
05 Feb 2015 14:04 #55707
by barjunk
Hal2Arduino was created by barjunk
I'm trying to use linuxcnc and Hal2Arduino to control an arduino uno and some motors connected to it. In the end it will be a hobby foam cutter.
I'm fully aware of the issues around using an arduino for this purpose and for the time being, I'm ok with those limitations.
However, things are working as expected.
Although I can manually control the motors by talking directly to the serial port, for some reason, when using linuxcnc to drive he motors it doesn't seem to work.
I've set the debug line to report information, but I'm looking for how I can get the user loaded module to show me how to display what it is receiving.
My experience with python is limited, (I'm more familiar with Ruby) so I was wondering if anyone would be able to provide some hints about how to troubleshoot this.
The issue seems to lay within the user loaded python module.
Thoughts?
Ideas?
Suggestions on how to troubleshoot this?
Mike B.
I'm fully aware of the issues around using an arduino for this purpose and for the time being, I'm ok with those limitations.
However, things are working as expected.
Although I can manually control the motors by talking directly to the serial port, for some reason, when using linuxcnc to drive he motors it doesn't seem to work.
I've set the debug line to report information, but I'm looking for how I can get the user loaded module to show me how to display what it is receiving.
My experience with python is limited, (I'm more familiar with Ruby) so I was wondering if anyone would be able to provide some hints about how to troubleshoot this.
The issue seems to lay within the user loaded python module.
Thoughts?
Ideas?
Suggestions on how to troubleshoot this?
Mike B.
Please Log in or Create an account to join the conversation.
05 Feb 2015 17:19 - 05 Feb 2015 17:19 #55713
by ArcEye
Replied by ArcEye on topic Hal2Arduino
Hi
Hal2Arduino is not part of the Linuxcnc project and you assume a familiarity that I doubt many possess.
If you cannot get help from the project itself emc2arduino.wordpress.com/category/hal2arduino/
you will have to attach your full config including
regards
Hal2Arduino is not part of the Linuxcnc project and you assume a familiarity that I doubt many possess.
If you cannot get help from the project itself emc2arduino.wordpress.com/category/hal2arduino/
you will have to attach your full config including
for anyone to have any idea what exactly you are doing.the user loaded module
regards
Last edit: 05 Feb 2015 17:19 by ArcEye.
Please Log in or Create an account to join the conversation.
06 Feb 2015 11:03 #55732
by barjunk
Replied by barjunk on topic Hal2Arduino
Thanks for the advice.
What would you consider the "full config"?
My assumption is all the .hal files and .ini files?
Mike B.
What would you consider the "full config"?
My assumption is all the .hal files and .ini files?
Mike B.
Please Log in or Create an account to join the conversation.
06 Feb 2015 15:22 #55736
by ArcEye
Best to zip the whole config folder and include any modules etc that are located elsewhere.
(Will need the arduino script too, to see what that is doing.)
regards
Replied by ArcEye on topic Hal2Arduino
Thanks for the advice.
What would you consider the "full config"?
My assumption is all the .hal files and .ini files?
Mike B.
Best to zip the whole config folder and include any modules etc that are located elsewhere.
(Will need the arduino script too, to see what that is doing.)
regards
Please Log in or Create an account to join the conversation.
07 Feb 2015 12:13 #55765
by barjunk
Replied by barjunk on topic Hal2Arduino
Here is the entire directory.
I don't believe there are any modules, since I'm only using the "default" config.
Let me know if there is any other information that would be useful.
Mike B.
I don't believe there are any modules, since I'm only using the "default" config.
Let me know if there is any other information that would be useful.
Mike B.
Please Log in or Create an account to join the conversation.
07 Feb 2015 20:05 #55774
by ArcEye
Replied by ArcEye on topic Hal2Arduino
Hi
The custom.hal file seems to set the pins to connect the stepgens to HAL-2-Arduino.axis_N_joint-pos-cmd pins, so the steps should get through
I don't have any way to test this, although I have a couple of arduinos around, even if I located the arduino script for them and installed it, I have nothing for them to move.
I think you need to run this from a terminal and you should get a view of what data is being sent and received.
If you need more, you can just add a line in, at the same indentation as the line above, following the format of the others eg
print "commandHandler: interpreted as %d %d %d %d" % (int(dataSet[0]), int(dataSet[1]), int(dataSet[2]), buildSum)
python print is similar to C printf formatting, you should be familiar with something like it in ruby.
Although there does not appear to be any work on the project for the last 3 years, your best option if you cannot make sense of it, might be to try to contact the author through the site
Good Luck
The python module is in the config folder, I meant the actual code that is uploaded onto the arduinoI don't believe there are any modules, since I'm only using the "default" config.
The custom.hal file seems to set the pins to connect the stepgens to HAL-2-Arduino.axis_N_joint-pos-cmd pins, so the steps should get through
I don't have any way to test this, although I have a couple of arduinos around, even if I located the arduino script for them and installed it, I have nothing for them to move.
The python module is full of debugging prints already.I've set the debug line to report information, but I'm looking for how I can get the user loaded module to show me how to display what it is receiving.
I think you need to run this from a terminal and you should get a view of what data is being sent and received.
If you need more, you can just add a line in, at the same indentation as the line above, following the format of the others eg
print "commandHandler: interpreted as %d %d %d %d" % (int(dataSet[0]), int(dataSet[1]), int(dataSet[2]), buildSum)
python print is similar to C printf formatting, you should be familiar with something like it in ruby.
Although there does not appear to be any work on the project for the last 3 years, your best option if you cannot make sense of it, might be to try to contact the author through the site
Good Luck
Please Log in or Create an account to join the conversation.
08 Feb 2015 04:12 #55795
by barjunk
Replied by barjunk on topic Hal2Arduino
Thanks for at least taking a look at it.
I have run this from a terminal but none of those print statements actually show. It is possible they don't show because the user module goes into its own process(s).
You can see I added some print to file type statements, but the file doesn't seem to get the data either.
It seems like for some reason, the data isn't actually getting processed by the user module at all, although the 'debug.txt' file i have in there does get created.
I have reached out to the Hal2arduino forum and will continue to do so.
Can you point me to some documentation on writing my own user module? I've been through a good deal of the documentation on this site, but just can't seem to find anything around this particular subject.
My main goal was to try and get information on how to debug a loaded user module....any loaded user module...so I can try and debug the issue I have.
Thanks for taking your time to look at it.
I have run this from a terminal but none of those print statements actually show. It is possible they don't show because the user module goes into its own process(s).
You can see I added some print to file type statements, but the file doesn't seem to get the data either.
It seems like for some reason, the data isn't actually getting processed by the user module at all, although the 'debug.txt' file i have in there does get created.
I have reached out to the Hal2arduino forum and will continue to do so.
Can you point me to some documentation on writing my own user module? I've been through a good deal of the documentation on this site, but just can't seem to find anything around this particular subject.
My main goal was to try and get information on how to debug a loaded user module....any loaded user module...so I can try and debug the issue I have.
Thanks for taking your time to look at it.
Please Log in or Create an account to join the conversation.
08 Feb 2015 13:15 #55801
by barjunk
Replied by barjunk on topic Hal2Arduino
After reaching out to the folks on the forum at emc2arduino.wordpress.com/category/hal2arduino/, the software was updated to version 0.6d. It can be found here: drive.google.com/folderview?id=0Bw8NV8qo...3NVdvMUE&usp=sharing
This works for me.
Thanks for at least looking at things and providing some suggestions.
This works for me.
Thanks for at least looking at things and providing some suggestions.
Please Log in or Create an account to join the conversation.
Time to create page: 0.107 seconds