Hal2Arduino

More
11 years 8 months ago #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.

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

More
11 years 8 months ago - 11 years 8 months ago #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

the user loaded module

for anyone to have any idea what exactly you are doing.

regards
Last edit: 11 years 8 months ago by ArcEye.

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

More
11 years 8 months ago #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.

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

More
11 years 8 months ago #55736 by ArcEye
Replied by ArcEye on topic Hal2Arduino

barjunk wrote: 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.

More
11 years 8 months ago #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.

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

More
11 years 8 months ago #55774 by ArcEye
Replied by ArcEye on topic Hal2Arduino
Hi

I don't believe there are any modules, since I'm only using the "default" config.

The python module is in the config folder, I meant the actual code that is uploaded onto the arduino

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'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.

The python module is full of debugging prints already.
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.

Time to create page: 0.628 seconds
Powered by Kunena Forum