HAL2Arduino 0.5 – Released.

Happy Holidays everyone! 😀

With that said, I would like to introduce you to a new version of HAL2Arduino version 0.5.

Our shiny new version has added support for:

  • Quadrature encoders for precise position control.
  • PID Servo control. For fine grain tuning.
  • Basic Jog Wheel support.
  • Internal and/or external feedback support. Allows servos/steppers to auto-correct positional errors.

Improvements:

  • Faster PC-Host side script.
  • Lock-step synchronization between microcontroller clients.

In the pipe-line:

  • I2C support for mcp23017 IO expander chips. To allow up to 112 additional pins, per client. Very useful for matrix keypads.
  • Analog joystick input. Some people prefer these to jog wheels, especially scrap-bot builders.
  • User definable M-Codes. This will allow users to add special commands right in to their G-Code that can signal the microcontroller(s) to perform specific tasks. (Like ‘Brew Coffee’, ‘tweet when complete’ etc.)

Enjoy the holidays.

dewy721

88 Responses to HAL2Arduino 0.5 – Released.

  1. Adam says:

    Thank you for your holiday gift for us. Your work is very important for me for connecting LINUXCNC and complicated 3d printer that I build.
    Adam

  2. arne says:

    Another big thank you from me for your holiday gift 🙂 I’ll test it soon 🙂 2014 looks more interesting now 🙂

  3. arne says:

    Hi Dewy,

    tried out the Hal 0.5 version today, and it works fine. But I had to comment out lines 52-54 of the custom.hal file in my working directory:

    net getXspeed Hal2Arduino.axis_0_joint-vel-cmd
    net getXspeed Hal2Arduino.axis_1_joint-vel-cmd
    net getXspeed Hal2Arduino.axis_2_joint-vel-cmd

    As these lines were in the 0.4 version, I wonder why there is the need to comment them out.

    If not commented out the error file says: custom.hal:52: Pin ‘Hal2Arduino.axis_0_joint-vel-cmd’ does not exist 9041

    Best regards
    Arne

    • dewy721 says:

      Sorry, I at some point had been experimenting with remote velocity control. While it is supported; I concluded that the additional expense was less productive than just re-tuning the host-side script to update faster. (I forgot to remove it from the .hal file.)

      Many thanks Duane

  4. Gava says:

    Hi, congratulations on your work is really excellent

    My question is whether there is any pin came out for handling the spindle motor?

    I might say that part of the programming is in located?

    Thank you.

    • dewy721 says:

      The code for it has not been made yet. Hence there is no pin assignment for it.

      However, the framework is in place to add it easily.

      Spindle codes are 129~138 and ideally they would be called from line #63 under the ‘program’ tab.

      From there, perhaps a function call could be crafted to accept 2 variables: SindleAxis and SpindleData (aka. RPM).

      Something like:

       byte spindleOutputPin={3,5,6,9,10,11}; // Six separate spindles for example. (ie. Turret lathe.) 
      #define spindleDriveType pwm 
      #define ratedSpindleSpeedMin 0 
      #define ratedSpindleSpeedMax 3260 // A common U.S. single-phase 120vac/60hz motor speed. 
      #define spindlePwmMin 50 // minimum power to rotate spindle. 
      #define spindlePwmMax 255 // full speed. 
      
      void setSpindleSpeed(byte axis, long speed){
         storedSpindleSpeed[axis]=speed;
         if(spindleEnabled[axis] && spindleDriveType==pwm){ // Did we receive code 133 to enable this spindle? // To be set by some other hypothetical function.
           byte spindleOutput=constrain(map(speed,ratedSpindleSpeedMin,ratedSpindleSpeedMax,spindlePwmMin,spindlePwmMax),spindlePwmMin,spindlePwmMax);
           analogWrite(spindleOutputPin[axis],output); // Apply the value to the motor drive pin.
         }else{
           // spindle is disabled, so do nothing here.
         }
       }
      

      I will try to get it added into the next release, this weekend.

      On Thu, Jan 30, 2014 at 10:24 PM, Emc2Arduino

  5. Robert Burns says:

    I am looking to use a Mega 2560 and RAMPS 1.4 with LinuxCNC, Will HAL2Arduino or EMC2Arduino do that?

    • dewy721 says:

      While yes, it ‘can’ be made to work for basic 3axis control (think simple router table).

      If you already own a mega2560 and just want make use of it that’s not a bad idea at all.

      However, if you’re still shopping for a microcontroller there is a much better solution for the same amount of money. For example the “BeagleBone Black” from beagleboard.org is the same price and can run LinuxCNC right on the microcontroller itself, which is a huge speed boost.

      • Robert Burns says:

        yes,BBB is cheap, but the io capes are like $150-$180. I’d like to get my feet wet with linuxCNC before buying one if possible….and practicable.

        a Deltabot would not be basic 3 axis though. I have the 2560/ramps combo, but it is underpowered cpu/memory wise for a kossel. I want to try EMC2Arduino, but I don’t know what have the stuff the config is asking for is, much less what to set them to. All the pin configs and such are kept in parts of the firmware the user never has to modify.

        I posted a thread on the Deltabot Google Group to see if someone more experienced then me would take a whack at it. I think there are a ton of people there running Marlin or Repetier that would love to run linuxCNC.

        I saw how helpful you are on shapeko and other CNC forums, My hope is you can help our group the same.
        -GRB352

      • dewy721 says:

        Well, actually HAL2Arduino is just a bridge to get linuxcnc to talk to an arduino. Effectively what it does is listen to a serial stream (ticker-tape style) for commands from a pc running linuxcnc.

        With that in mind, it’s not realtime. There is about a 10~50ms lead-time for communications overhead.

        With that said however, it does use the accelstepper library for movement.

        Some of its features: Has user selectable modules, cut out the stuff you don’t want. Allows ganging multiple arduinos to one pc. Each arduino can be configured to handle different sections of the machine. Can support multiple slave machines. (Farming) Supports multiple arduino types simultaneously, tested so far: Uno, Mege2560 and Due.

        Compared to the Uno & 2560, the Due will run circles around them. Uno = Run up to two steppers. Best used for buttons/lcds, not much else. 2560 = 3 steppers ok, 4 at best. Due = 9 or more steppers + cpu power to spare for encoder feedback etc.

        There are way too many configuration options to offer you any ‘silver bullet’ “copy & paste” config.

        The version I’m slowly developing (0.6a) as time permits (fulltime job +2hr commute +family +active developer for PocketNC.com) will adapt to varying speed/acceleration that linuxcnc likes to throw around. This solves a studdering issue that earlier versions have where the arduino races into a slowly moving set of coordinates, stops, races to the next coordinates, stops, repeat.

        So in a nut-shell if you like modifying code then HAL2Arduino might be what your looking for, however if your seeking a silver bullet solution then what your after is still yet beyond the level of what H2A currently is at the moment.

        Although, if your intent on running linuxcnc you’ll still have to roll up your sleeves and get your hands dirty, hand editing files regardless.

        The BBB can run generic stepper driver boards, can be loaded linuxcnc on-board and can also run the pc-side of H2A to control one or more arduinos. But the learning curve is high.

        That’s really the best answer I can provide you at the moment, since I don’t have a delta bot myself. That is unless you really, really wanna send me one to develop with that is. 😉

        On Wed, May 28, 2014 at 5:15 AM, Emc2Arduino wrote:

        >

      • dewy721 says:

        Oh, and a far as EMC2Arduino. Its depreciated as I haven’t looked at that code for over a year now.

  6. Jose San says:

    Hi Dewy, I am using a Arduino Uno board but I have problems. I could start linuxCNC. It works but I don’t have communication with arduino board through the serial port. The lights Rx y Tx don’t turn on when I put play in the program and the motors don’t work too. I just changed the digital outputs for stepPin and dirPin for each motor in the program modAccelStepper but I don’t know what should do it now.

    • dewy721 says:

      Hello Jose, I’m sorry for taking so long to respond. (Been buried with a new job, cnc collaboration project and helping Wife with med-school.) *:-)

      The problem is that the link between the computer running Linux and the Arduino are not talking.

      Try the following:
      Install the Arduino IDE for Linux and see if you can upload/run the “blink” sketch. This will verify that Linux has the ability to link with it.

      Let me know if you can get that established so I can help you further.

      I’ll try to respond faster this time tho. 😉

      • Don´t worry Dewy,

        I probed with 0.4 version and it works well. I have some problem with the continue speed but I hope to resolve that reducing the baud rate.

        Thanks for you reponse. Bye

  7. Adrien G. says:

    Hi,
    I’m a part of a FRENCH robotic club and I want to try H2A to run our CNC on USB with a laptop.
    I just have a doubt on the right card I have to choose. I want to manage 3 steppers, a LCD, 5 relays, 5 buttons and 3 sensor inputs (home position). I want to stay with an Arduino board. Is a Mega is sufficient or I should buy a Due board ?
    I’m quite new in arduino world but I’m familiar with PIC uC and C language so I’m not afraid to have hands dirty 😉
    Thank you !

    • Duane Bishop says:

      Hello Adrien, It is nice to hear from someone in Europe again. 🙂

      An Arduino Mega2560 could do what you want, and it is better supported by the community than the Arduino Due.

      However, the Arduino Due would be slightly faster than a Mega2560 for moving 3 steppers.

      With 4 or more steppers the Mega2560 will become slower for each additional stepper, this is where the Due becomes the better choice.

      Either way, H2A supports multiple simultaneous Arduino connections (even different kinds) at the same time. You could have one Arduino running an entire machine, or several Arduinos working to run the machine, together in concert.

      I have tested the Uno, Mega2560 and the Due. I can say that I know that all 3 or these will work, possibly other types as well.

      One performance challenge for you will be the LCD screen, the library for using the LCD is considered of a “blocking” type of code. It will cause the Arduino “wait for completion” and/or not allow it to move in a smooth fashion when updating the screen. I have tried to accommodate for this by setting the LCD updates to an IDLE priority. But the best solution would be to use a dedicated Arduino just for the LCD. That way all the motion control is smooth and proper.

      If you have yet to buy a uC, and can write some code…. I have been working on a newer project using the more powerful “BeagleBone Black” (same price as Mega2560/Due) to both run LinuxCNC AND move the steppers!

      The BBB can be found at http://beagleboard.org/
      The software at http://blog.machinekit.io/
      The new project I am working on is at http://www.pocketnc.com/

      • Adrien G; says:

        Thank you very much for your reply !
        I will buy an extra UNO board for the lcd screen, just to be sure. For now I still want to keep a computer to manage our CNC.

        I looked at your new project, it’s amazing ! Well designed, cute, I will follow this new project closely and share it with my friends !

      • Adrien G says:

        Hi,

        I received everything and I make some tests since a few day : it’s working !!

        Now I want to add some panel controls, a file “modControls” exists, but it is not complete, is that correct ?

        The Arduino software seems clear and pretty easy to modify, but and the python script it’s not that clear to me. So, for an “estop-indicator”, what should I do ?

        In HAL2Arduino-0.5.py, add a command like :
        if command = 320:
        c[‘ioncontrol_estop-indicator’] = val

        and after :
        if codesAcceptes.find(“320”) > -1:
        if simulation == True
        printf “creating : ioncontrol_estop-indicator”
        else:
        print “makePins: creating: %r % pinLabel
        c.newpin(“ioncontrol_estop-indicator”,hal.HAL_BIT,hal.HAL_OUT)
        Is that ok ?

        After, I should add something in custom.hal, but everything I have tried provokes an “KeyboardIterrupt, Error in sys.excepthook”

        Thanks

        Adrien G.

  8. Adrien G says:

    Hi,

    I received everything and I make some tests since a few day : it’s working !!

    Now I want to add some panel controls, a file “modControls” exists, but it is not complete, is that correct ?

    The Arduino software seems clear and pretty easy to modify, but and the python script it’s not that clear to me. So, for an “estop-indicator”, what should I do ?

    In HAL2Arduino-0.5.py, add a command like :
    if command = 320:
    c[‘ioncontrol_estop-indicator’] = val

    and after :
    if codesAcceptes.find(“320″) > -1:
    if simulation == True
    printf “creating : ioncontrol_estop-indicator”
    else:
    print “makePins: creating: %r % pinLabel
    c.newpin(“ioncontrol_estop-indicator”,hal.HAL_BIT,hal.HAL_OUT)
    Is that ok ?

    After, I should add something in custom.hal, but everything I have tried provokes an “KeyboardIterrupt, Error in sys.excepthook”

    Thanks

    Adrien G.

  9. Dimitris says:

    Hi Dewy,congratulations for your project..! I used emc2arduino and its worked fine, now i tried with hal2arduino, i put everything together,emc start, but i dont get anything when moving the axis. And arduino’s tx-rx dont blink at all,like not communicating. Witch commands should i enable for axis movement? Or something else maybe.. thanks and sorry for my english..

    • dewy721 says:

      Hello Dimitris! 🙂

      It sounds like the pc/arduino handshake is failing.

      There is likely one of four reasons for this:

      1. Your linux machine is not setup for playing with arduinos. (Not likely since you said that you used EMC2Arduino successfully already.)

      2. Your old EMC2Arduino install is conflicting with you new install.
      Check your custom.hal file for:
      loadusr -Wn arduino 9axis_arduino
      If present, then your trying to load linuxcnc with the old config files. Unfortunately, that won’t work!

      3. Check that your arduino is on comport:
      /dev/ttyS0~9
      -or-
      /dev/ttyACM0~9
      HAL2Arduino scans the first ten ports of each looking for a connection.
      However you can change it on lines 1976 or 1980 in the HAL2Arduino-0.5.py file.

      4. Unlikely, but it might just be slow hardware. If this is the case, take a look at the HAL2Arduino-0.5.py file with a ‘LINUX’ (as in not a windows) text editor.
      On line 121 you should see:
      ser = Serial(port, 115200) #, timeout=0.06)

      The timeout of 0.06 usually works reliably but if you have a sleepy Arduino (or PC for that matter) it may need to be set is little higher. Like 0.07 or 0.08 etc. Beware this data speed down very easily, so adjust slowly.

      Let me know if that works for you.

      • Dimitris says:

        Hi Dewy..! Thanks for the reply. I tried with version 4 and it worked fine. I’ll try again with version 5 and i’ll post the results. And of course hal2arduino is much better than emc2arduino, especially in the very smoother and faster stepper movement.. Congratulations again..!!

  10. Vitor says:

    Hi dewy,
    Thanks for sharing this amazing code!
    I’m making a CNC Lathe with it, but I’m having some problems. I’ve changed the files to leave it only with X and Z, but the infarce of the program doesn’t looks like a lathe and it still have the 3 Axis and when I try to home the axis a warning pops up with a error on joint 2.
    Can you help me?
    Once again Thanks for all!!!

    • dewy721 says:

      Hey Vitor!

      For your ‘error on joint 2’:
      Sounds like the the Z axis limit switch is set to the opposite polarity, by default it looks for a ‘normally closed’ switch to trigger when opened. The easiest way to solve it is to move the wire connected to the switch’s N.O. terminal to the N.C. terminal. (Or was it the other way around?)

      As for changing the interface to look more like a lathe, for that you’d benefit from adding
      LATHE = 1
      to the [DISPLAY]
      section of your .ini file.
      At least, that’s what page-14 of the LinuxCNC integrator’s guide says to do.
      http://linuxcnc.org/docs/2.5/pdf/LinuxCNC_Integrator_Manual.pdf

  11. powercycle says:

    I’m trying your version 0.5, but I can’t seem to get it to move the motors. I don’t have any limit switches connected up, maybe that is the problem?

    I know it sees the Arduino board because if I unplug the USB cable, it fails to load linuxcnc.

    What steps can I take to figure out?

    Also, I’ve loaded GRBL to the arduino board and it works as expected.

    I’m using the Protoneer shield with A4988 drivers…are the pins different maybe?

    That is the next thing I’m going to try, but I’m still learning all this stuff.

    Thanks for any guidance.

    • dewy721 says:

      HAL2Arduino can fake having switches. But it is HIGHLY recommended that you at least use some real homing switches. Without them your machine has no way to know where it really is. If you’re low on unused pins you can gang all those switches onto just one pin and get away with it.

      Yes, the pins are different. By default the code uses pins 32~43 (Arduino Mega/Due).
      Fear not though! 🙂 You can still use your shield as well.

      Here’s how:
      Using the Arduino IDE program, open the HAL2Arduino_0_5.ino file.
      Click on the tab labeled ‘modAccelStepper’ then scroll down to line 46.
      You should see…
      AccelStepper stprX(1, 41, 43); //type, stepPin, dirPin

      Change ’41’ to your X-step pin, and ’43’ to your X-dir pin.
      Repeat the process for the rest of your steppers.

      Look around at the rest of the tabs and setup any other pins you may need as well.

      Let me know if you need more help with it. 🙂

  12. powercycle says:

    OK. I’ll give that a shot…when I was reading through the comments, I got the impression that I didn’t need modAccelStepper, so I changed that one to false.

    Also, I’m using the live version of the linuxcnc CD (2.5) and adding the stuff for the Arduino IDE seems to have broke it, so I will probably have to re-install. What a bummer.

    I will add the switches at some point, but for now, I’m just testing that I have everything hooked up to the motors at this point, so nothing will get damaged

    At least I was on the right track!! I’ll report back the changes I made for others….thanks for the response..

    Two more things: what command can I use to make the X motor step and how do I disable the limit switches so it doesn’t think they are active because none exist?

    Thanks!

  13. dewy721 says:

    Well, to get the steppers to move you can run linuxcnc and either use the jog commands -or- click on the ‘MDI’ tab and type in G0 X2 press enter and if the E-Stop is off and power button is on. It should move.

    As far as the limit switches go, poke around with the modLimSwitch tab in the HAL2Arduino_0_5.ino’ file.

  14. powercycle says:

    As far as moving the motor…If I directly connect to the arduino, what is the command needed to move the X axis? I’m referring to the commands formatted like ;

    That way I can ensure that the pins are configured as they should be without having to hassle with the linuxcnc software.

    This will help in isolating where the problem lies….

    Thanks for the help.

  15. powercycle says:

    I guess it stripped my formatting: 200 0 1 201;

    I don’t know if that is a valid command, but just wanted to make sure it was clear I was looking for…

    Thanks.

  16. dewy721 says:

    OH! I see, you mean send it a raw serial command. In THAT case….

    Fist you have to give it the ‘Green Light’ command: 996 0 0 996;
    Then you can issue a move command with: 224 0 10 234; (move 10 inch/mm/revs/etc.)

    PS. the command ‘200’ is accepted but has no code for it yet.

  17. powercycle says:

    OK, when I do this I get back nothing for the ‘Green Light’ and 997 0 1 998; for the move command.

    Since things didn’t move, I’m assuming it is some sort of error code.

    Thoughts?

  18. dewy721 says:

    Are your steppers powered-up and holding a position or can you move them fairly easily?
    (I’m trying to sort out if your stepper driver is enabled.)

  19. powercycle says:

    I can move them…I wondered about that….how do we ensure they get enabled? As a reminder it is an A4988 driver.

    • Duane Bishop says:

      Check the modAccelStepper section again: Line 14: #define enablePins false change to true

      Then on line 151: look for stprX.setEnablePin(39); change ’39’ to the enable pin of your driver.

  20. powercycle says:

    We are getting closer. Motor is held, but 224 command does not make it move.

    Also, shaft of motor is a bit warm, is that normal?

    Thanks so much for sticking with me on this.

  21. dewy721 says:

    You gotta issue a 996 0 0 996; command before anything will move.

  22. powercycle says:

    Yeah, have been doing that.

    996 0 0 996;
    224 0 10 234;

    no movement.

    Only thing I can think of at the moment is that the pins I’ve chosen aren’t correct.

    I got the from the grbl code here https://github.com/grbl/grbl/blob/5edf078065de9a5af058f75f17c822e3944698db/cpu_map.h

    StprX(1,2,5)

    Maybe I need to be inverting them?

  23. dewy721 says:

    Doh! I just remembered. Since LinuxCNC moves in 1/10000th inch/mm, “224 0 10 234;” actually equals 0.0001 in/mm. You won’t see much movement at all.

    So try, 224 0 10000 10224;
    Sorry about that. <:)

    Oh, and yes. The motor can be warm but not hot, if you can firmly grab and hold the body of the motor for more than 3 seconds it actually ok. Hotter than 170F and the magnets degrade. The driver chip runs pretty much the same but 10 degrees warmer than the motor.

    Best practice is to use as little power as needed to reliably get the work done.

  24. powercycle says:

    Didn’t seem to matter. Still no movement.

    This implies that a pin needs to be high to move it, is that the default?

    http://fritzing.org/media/fritzing-repo/projects/a/a4988-single-stepper-test/code/pololu_single_stepper_test.ino

    Or do I have step and direction backwards possibly?

    Any other thoughts?

    Again, your time is appreciated and I will write something up when it gets figured out.

  25. dewy721 says:

    Actually that sketch has the enable pin held low, always low.

    Besides, if the motor is warm to the touch and holds a position then its enabled.

    Hmm, double-triple check that what you believe is the X stepper, is actually the board’s X stepper driver.

    As far as helping goes, don’t sweat it. SO many people helped me along the way too. 😉
    However, it’s bed time here. (Work and all.) I’ll check in tomorrow.

  26. powercycle says:

    It is the X axis for GRBL, maybe that is a bad assumption here?

    I’ll still double check everything….maybe even start over, just because I’ve been fooling around and could have inadverdantly turned something on/off.

    I’ll test GRBL one more time to ensure I haven’t broken something with the electronics.

    Talk with you later.

  27. powercycle says:

    OK. Rebuilding things made it work. I’m going to diff the files to see what might have caused my issue.

    Maybe we can make a README for the Protoneer board?

    Thanks so much. Now I just have to make linuxcnc work.

    One step closer!

  28. powercycle says:

    Well, now I’m getting Hal2arduino.axis.0.joint-pos-cmd does not exist. Given that we have tested the joint move command (224) directly, something else must be broken in my config files.

    Suggestions on where to look and what to look for?

    I’m so close I can almost taste it….

    Thanks.

  29. powercycle says:

    Nevermind, figured it out on my own…the custom.hal file that is included in the zip file doesn’t match up with the name of the loaded user module, which is HAL-2-Arduino.

    All the entries in the custom.hal say Hal2Arduino.

    Notice the CAPS letters for HAL and no dashes.

  30. dewy721 says:

    Yep. You got it! 😀

  31. powercycle says:

    OK. So now that linuxcnc starts, it still doesn’t control the motor. I tried it both with the limit switches in the custom.hal file and without.

    I can home it OK.

    Any thoughts on things to try? I double checked that it worked in “raw” mode and it works as expected.

  32. powercycle says:

    So I turned on debugging for linuxcnc and noticed that when I send it a ‘G0 X1.0’ command from the MDI screen to get the axis to move, it looks to be sending a 220 command instead of 224 like I was expecting.

    I also noticed that 220 isn’t listed as one of the possible accepted commands in the firmware code.

    I’m using linuxcnc version 2.5.

    Thoughts on how to go about addressing this?

  33. dewy721 says:

    220, hmm. Odd, that’s the place marker for “axis.N.jog-counts”.

    My setup has the following for linking the X-axis movement:

    (from ‘my-mill.hal’)
    net xpos-cmd axis.0.motor-pos-cmd => stepgen.0.position-cmd

    (from ‘custom.hal’)
    net xpos-cmd Hal2Arduino.axis_0_joint-pos-cmd

  34. powercycle says:

    Mine too. except mine really says HAL-2-Arduino.axis_0_joint-pos-cmd if it says what your says it won’t work.

    The debug output is saying:

    Issuing EMC_TRAJ_LINEAR_MOVE (220, …etc

    What version of linuxcnc are you using?

  35. powercycle says:

    Would you be willing to share the debug output from your machine when issuing G0 X1.0?

    It seems likely that we have some setting that is different and seeing the output from your setup might help me discover the problem.

    So, it seems like the firmware is working as it should, now I just need to get linuxcnc to issue the right command to the HAL-2-Arduino module.

    If you have other thoughts, I’m open to whatever suggestions you might provide.

  36. powercycle says:

    Dewy721,
    Any chance you would share how to find out what the card is actually receiving as a command?

    I tried adding a print command on line 167 of the python script, but it only reported one time at the very beginning during the initialization of the serial port.

    I’m assuming because the process detaches and no longer reports to the linuxcnc debug output.

    Do you have any thoughts for that?

    Thanks in advance for any help.

  37. powercycle says:

    Thought I would reach out again and ask for suggestions on debugging this issue.

    I’ve uncommented some of the print statements that you have in the code, but they don’t show when I run linuxcnc from the command line.

    I’m so close to making this work.

    Mike B.

    • dewy721 says:

      Sorry for the delay, life happens. Hmm, well. You ‘could’ try having the sub process echo the commands into to a text file. That would give you a line-by-line debug of what’s going on. Better yet… hold on just a sec… I’ll see if I can package up the last (as yet un-released) version I was working on for you to hack into. 😉

  38. dewy721 says:

    Tada! Below you can grab the latest version I’ve been developing for the current project I’m collaborating on.
    This version is a lot faster than previous ones since it ditches the checksum that never gets used in the communication protocol.

    Link to files: (Version 0.6d)

    Link to current project I’m helping with: http://www.PocketNC.com

  39. powercycle says:

    OK! That worked!

    I’ll try to do some comparisons so I can maybe figure out the issue.

    I did notice that you changed some of the values for the steps per inch, etc…

    It is entirely possible that the values I was using on the MDI command line were too small to make stuff move on the older version.

    BTW, did you intend to leave out the PYVCP panel and the other custom entry from your files?

    I had to comment those two out in the .ini file to get things working.

    Thanks for the work.

    Would you accept a README for the Protoneer board? or maybe a patch file?

  40. powercycle says:

    Yes. I’m not an expert, but have an account and have participated with a few projects.

    • dewy721 says:

      Gimme a sec and I’ll commit a non-compressed copy that you can fork a branch from. I say ‘branch’ as my dev cycle is WAY too slow for most people, you’d be happier to make mods separately.

  41. tjmarch says:

    Dewy
    I would like to thank you for writing this code. I plan on using it along with Machinekit. I for one do not like the Begalbone approch and I think your Arduino code fills a nich that is needed. I want a full computer to work on and to do my drawings, plus create my gcode then use sim all from one machine with out cluttering up my workshop with a seperate machine to do each function. Then I can packup my laptop and take it with me on the road for I travel for my work. Plus have you priced a para port cable lately if you can find one. This is more economical than you think. I am making 7 stackable shields for my Mega which will be alot cheaper than buying pre-made motor drivers. I have also wrote one script file to setup a 32bit or 64bit computer with the needed packages to compile Machinekit on Ubuntu 14.04, Debian Wheezy and Linux Mint 17.1
    I have a few pictures and files I posted on Google drive of my progress will be posting moe tonight when I get out of work link below

    https://drive.google.com/folderview?id=0B4sgGWsBQZYTfmo2b2tIMHZBRjRFcVNQb2VTNnhwS19GZkVpOEFnaTdyVm5Yb184VU5feWs&usp=sharing

  42. dewy721 says:

    Nicely documented readme file! Unfortunately, I don’t have time to read it thoroughly this evening. (Chicago-time)

    But I’d be interested in your end results! I’ve been tinkering with Machinekit as well, but in a different direction. Mostly the UI stuff for the moment, after the dust settles I plan on adding HAL2Arduino to it for some extra (user available) IO options.

    Keep me posted! 🙂

  43. Quest says:

    Hello,

    I am trying to use HAL2Arduino_0_6d but can’t compile

    if enable usespindle :

    program.ino: In function ‘void sendSpindleIndexPulse(byte)’:
    program:7: error: a function-definition is not allowed here before ‘{‘ token
    program:518: error: expected ‘}’ at end of input
    a function-definition is not allowed here before ‘{‘ token

    error fixed if i change :
    void sendSpindleIndexPulse(byte axis){ // Low speed signaling ie: <600rpm
    if(sendSpindleIndexSignal)
    #endif
    to
    void sendSpindleIndexPulse(byte axis){ // Low speed signaling ie: <600rpm
    if(sendSpindleIndexSignal){
    #endif
    }
    }

    If i disable #define useAccelStepper false , because i use DC motors with quadrature encoders, i got compile error :

    program.ino: In function 'void processCommand(long int, long int, long int)':
    program:214: error: 'stepsPerUnit' was not declared in this scope
    program:218: error: 'velocityTimer' was not declared in this scope
    program:219: error: 'avgDist' was not declared in this scope
    program:220: error: 'velocity' was not declared in this scope
    program:222: error: 'velocity' was not declared in this scope
    'stepsPerUnit' was not declared in this scope

    if i leave #define useAccelStepper true , it compiles but i want to disable to save space, because i dont use steppers. (tested version 0.5 with useAccelStepper false and compiles).

    How to fix this ?
    Thanks

    • Quest says:

      fixed it by removing command 226 :

      /*
      if(command == 226){
      if(dataTwodelta){
      velocity[dataOne]=reqSpeed+avgDist[dataOne];
      }else{
      velocity[dataOne]=delta;
      }
      velocity[dataOne]=dataTwo;

      #if stepperX
      if(dataOne==0){
      stprX.setMaxSpeed(velocity[dataOne]);
      }
      #endif
      #if stepperY
      if(dataOne==1){
      stprY.setMaxSpeed(velocity[dataOne]);
      }
      #endif
      #if stepperZ
      if(dataOne==2){
      stprZ.setMaxSpeed(velocity[dataOne]);
      }
      #endif
      #if stepperA
      if(dataOne==3){
      stprA.setMaxSpeed(velocity[dataOne]);
      }
      #endif
      #if stepperB
      if(dataOne==4){
      stprB.setMaxSpeed(velocity[dataOne]);
      }
      #endif
      #if stepperC
      if(dataOne==5){
      stprC.setMaxSpeed(velocity[dataOne]);
      }
      #endif
      #if stepperU
      if(dataOne==6){
      stprU.setMaxSpeed(velocity[dataOne]);
      }
      #endif
      #if stepperV
      if(dataOne==7){
      stprV.setMaxSpeed(velocity[dataOne]);
      }
      #endif
      #if stepperW
      if(dataOne==8){
      stprW.setMaxSpeed(velocity[dataOne]);
      }
      #endif
      }
      */

      is there another fix ? is this command needed?

  44. I am thinking of using your hal2arduino to push the current x,y,z to three different 7 Segment displays to act sort of like a DRO on the mill.

    I am wondering what I can use or push from LinuxCNC to do this. I want to maintain my current parallel port setup as it functions well……but add in this ability to push the x,y,z data.

    Thanks for all your hard work!!

  45. Marco Gaspar says:

    Hello,

    I’m triyng hal2arduino 0.5 and get error when starting linuxcnc.
    Any help?

    Print file information:
    RUN_IN_PLACE=no
    LINUXCNC_DIR=
    LINUXCNC_BIN_DIR=/usr/bin
    LINUXCNC_TCL_DIR=/usr/lib/tcltk/linuxcnc
    LINUXCNC_SCRIPT_DIR=
    LINUXCNC_RTLIB_DIR=/usr/lib/linuxcnc
    LINUXCNC_CONFIG_DIR=
    LINUXCNC_LANG_DIR=/usr/share/linuxcnc/tcl/msgs
    INIVAR=/usr/libexec/linuxcnc/inivar
    HALCMD=halcmd
    LINUXCNC_EMCSH=/usr/bin/wish8.5
    MACHINEKIT – 0.1
    Machine configuration directory is ‘/home/mk/linuxcnc/configs/ARM.Raspi_Arduino-1’
    Machine configuration file is ‘my-mill.ini’
    INIFILE=/home/mk/linuxcnc/configs/ARM.Raspi_Arduino-1/my-mill.ini
    PARAMETER_FILE=linuxcnc.var
    TASK=milltask
    HALUI=halui
    DISPLAY=axis
    Starting Machinekit…
    Starting Machinekit server program: linuxcncsvr
    Loading Real Time OS, RTAPI, and HAL_LIB modules
    Starting Machinekit IO program: io
    io started
    halcmd loadusr io started
    Starting HAL User Interface program: halui
    Shutting down and cleaning up Machinekit…
    Killing task linuxcncsvr, PID=5212
    Removing HAL_LIB, RTAPI, and Real Time OS modules
    Removing NML shared memory segments
    Cleanup done

    Debug file information:
    my-mill.hal:5: insmod failed, returned -1
    See the log and output of ‘dmesg’ for more information.
    5212
    PID TTY STAT TIME COMMAND
    Stopping realtime threads
    Unloading hal components

    Kernel message information:
    [ 0.000000] Booting Linux on physical CPU 0xf00
    [ 0.000000] Initializing cgroup subsys cpuset
    [ 0.000000] Initializing cgroup subsys cpu
    [ 0.000000] Initializing cgroup subsys cpuacct
    [ 0.000000] Linux version 3.18.11-rt5+ (gemi@mba) (gcc version 4.7.2 (Debian 4.7.2-5) ) #45 SMP PREEMPT RT Thu Apr 9 17:56:25 SGT 2015
    [ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
    [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    [ 0.000000] Machine: BCM2709
    [ 0.000000] cma: Reserved 8 MiB at 0x3a800000
    [ 0.000000] Memory policy: Data cache writealloc
    [ 0.000000] On node 0 totalpages: 241664
    [ 0.000000] free_area_init_node: node 0, pgdat 80a84f00, node_mem_map ba093000
    [ 0.000000] Normal zone: 1888 pages used for memmap
    [ 0.000000] Normal zone: 0 pages reserved
    [ 0.000000] Normal zone: 241664 pages, LIFO batch:31
    [ 0.000000] [bcm2709_smp_init_cpus] enter (85a0->f3003010)
    [ 0.000000] [bcm2709_smp_init_cpus] ncores=4
    [ 0.000000] PERCPU: Embedded 11 pages/cpu @ba05d000 s13248 r8192 d23616 u45056
    [ 0.000000] pcpu-alloc: s13248 r8192 d23616 u45056 alloc=11*4096
    [ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
    [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 239776
    [ 0.000000] Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2709.boardrev=0xa01041 bcm2709.serial=0x19b06623 smsc95xx.macaddr=B8:27:EB:B0:66:23 bcm2708_fb.fbswap=1 bcm2709.disk_led_gpio=47 bcm2709.disk_led_active_low=0 sdhci-bcm2708.emmc_clock_freq=250000000 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000 dwc_otg.fiq_enable=0 dwc_otg.fiq_fsm_enable=0 dwc_otg.nak_holdoff=0 root=/dev/mmcblk0p2 rw rootwait console=ttyAMA0,115200 console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=ttyAMA0,115200 elevator=noop
    [ 0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
    [ 0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes)
    [ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
    [ 0.000000] Memory: 937736K/966656K available (7390K kernel code, 489K rwdata, 2548K rodata, 364K init, 810K bss, 28920K reserved)
    [ 0.000000] Virtual kernel memory layout:
    [ 0.000000] vector : 0xffff0000 – 0xffff1000 ( 4 kB)
    [ 0.000000] fixmap : 0xffc00000 – 0xffe00000 (2048 kB)
    [ 0.000000] vmalloc : 0xbb800000 – 0xff000000 (1080 MB)
    [ 0.000000] lowmem : 0x80000000 – 0xbb000000 ( 944 MB)
    [ 0.000000] modules : 0x7f000000 – 0x80000000 ( 16 MB)
    [ 0.000000] .text : 0x80008000 – 0x809bcc24 (9940 kB)
    [ 0.000000] .init : 0x809bd000 – 0x80a18000 ( 364 kB)
    [ 0.000000] .data : 0x80a18000 – 0x80a9261c ( 490 kB)
    [ 0.000000] .bss : 0x80a9261c – 0x80b5cf74 ( 811 kB)
    [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
    [ 0.000000] Preemptible hierarchical RCU implementation.
    [ 0.000000] NR_IRQS:608
    [ 0.000000] Architected cp15 timer(s) running at 19.20MHz (virt).
    [ 0.000014] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 3579139424256ns
    [ 0.000026] Switching to timer-based delay loop, resolution 52ns
    [ 0.000286] Console: colour dummy device 80×30
    [ 0.001391] console [tty1] enabled
    [ 0.001418] Calibrating delay loop (skipped), value calculated using timer frequency.. 38.40 BogoMIPS (lpj=192000)
    [ 0.001424] pid_max: default: 32768 minimum: 301
    [ 0.001829] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
    [ 0.001841] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
    [ 0.003042] Initializing cgroup subsys memory
    [ 0.003072] Initializing cgroup subsys devices
    [ 0.003087] Initializing cgroup subsys freezer
    [ 0.003122] Initializing cgroup subsys net_cls
    [ 0.003134] Initializing cgroup subsys blkio
    [ 0.003148] Initializing cgroup subsys perf_event
    [ 0.003164] Initializing cgroup subsys net_prio
    [ 0.003351] CPU: Testing write buffer coherency: ok
    [ 0.003819] missing device node for CPU 0
    [ 0.004158] missing device node for CPU 1
    [ 0.004186] missing device node for CPU 2
    [ 0.004213] missing device node for CPU 3
    [ 0.004249] CPU0: thread -1, cpu 0, socket 15, mpidr 80000f00
    [ 0.004282] [bcm2709_smp_prepare_cpus] enter
    [ 0.004421] Setting up static identity map for 0x705d40 – 0x705d74
    [ 0.120778] [bcm2709_boot_secondary] cpu:1 started (0) 18
    [ 0.121101] CPU1: Booted secondary processor
    [ 0.121109] [bcm2709_secondary_init] enter cpu:1
    [ 0.121158] CPU1: thread -1, cpu 1, socket 15, mpidr 80000f01
    [ 0.160738] [bcm2709_boot_secondary] cpu:2 started (0) 18
    [ 0.160977] CPU2: Booted secondary processor
    [ 0.160985] [bcm2709_secondary_init] enter cpu:2
    [ 0.161020] CPU2: thread -1, cpu 2, socket 15, mpidr 80000f02
    [ 0.200837] [bcm2709_boot_secondary] cpu:3 started (0) 17
    [ 0.201059] CPU3: Booted secondary processor
    [ 0.201066] [bcm2709_secondary_init] enter cpu:3
    [ 0.201098] CPU3: thread -1, cpu 3, socket 15, mpidr 80000f03
    [ 0.201221] Brought up 4 CPUs
    [ 0.201318] SMP: Total of 4 processors activated (153.60 BogoMIPS).
    [ 0.201351] CPU: All CPU(s) started in SVC mode.
    [ 0.202647] devtmpfs: initialized
    [ 0.239461] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
    [ 0.242470] xor: measuring software checksum speed
    [ 0.340832] arm4regs : 832.400 MB/sec
    [ 0.440994] 8regs : 528.400 MB/sec
    [ 0.541190] 32regs : 430.800 MB/sec
    [ 0.641370] neon : 784.000 MB/sec
    [ 0.641404] xor: using function: arm4regs (832.400 MB/sec)
    [ 0.641509] pinctrl core: initialized pinctrl subsystem
    [ 0.642505] NET: Registered protocol family 16
    [ 0.648532] DMA: preallocated 4096 KiB pool for atomic coherent allocations
    [ 0.650146] bcm2709.uart_clock = 3000000
    [ 0.653084] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
    [ 0.653136] hw-breakpoint: maximum watchpoint size is 8 bytes.
    [ 0.653196] mailbox: Broadcom VideoCore Mailbox driver
    [ 0.653567] bcm2708_vcio: mailbox at f300b880
    [ 0.653992] bcm_power: Broadcom power driver
    [ 0.654029] bcm_power_open() -> 0
    [ 0.654055] bcm_power_request(0, 8)
    [ 1.154769] bcm_mailbox_read -> 00000080, 0
    [ 1.154803] bcm_power_request -> 0
    [ 1.154960] Serial: AMBA PL011 UART driver
    [ 1.155149] dev:f1: ttyAMA0 at MMIO 0x3f201000 (irq = 83, base_baud = 0) is a PL011 rev3
    [ 1.700572] console [ttyAMA0] enabled
    [ 1.953905] raid6: int32x1 88 MB/s
    [ 2.124205] raid6: int32x2 105 MB/s
    [ 2.294939] raid6: int32x4 98 MB/s
    [ 2.465236] raid6: int32x8 80 MB/s
    [ 2.634760] raid6: neonx1 285 MB/s
    [ 2.805031] raid6: neonx2 386 MB/s
    [ 2.975268] raid6: neonx4 423 MB/s
    [ 3.145502] raid6: neonx8 269 MB/s
    [ 3.149266] raid6: using algorithm neonx4 (423 MB/s)
    [ 3.154243] raid6: using intx1 recovery algorithm
    [ 3.160102] SCSI subsystem initialized
    [ 3.164420] usbcore: registered new interface driver usbfs
    [ 3.170042] usbcore: registered new interface driver hub
    [ 3.175593] usbcore: registered new device driver usb
    [ 3.184385] Switched to clocksource arch_sys_counter
    [ 3.296284] FS-Cache: Loaded
    [ 3.299538] CacheFiles: Loaded
    [ 3.318265] NET: Registered protocol family 2
    [ 3.324125] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
    [ 3.331365] TCP bind hash table entries: 8192 (order: 5, 229376 bytes)
    [ 3.338419] TCP: Hash tables configured (established 8192 bind 8192)
    [ 3.344924] TCP: reno registered
    [ 3.348185] UDP hash table entries: 512 (order: 3, 32768 bytes)
    [ 3.354196] UDP-Lite hash table entries: 512 (order: 3, 32768 bytes)
    [ 3.361106] NET: Registered protocol family 1
    [ 3.366113] RPC: Registered named UNIX socket transport module.
    [ 3.372057] RPC: Registered udp transport module.
    [ 3.376774] RPC: Registered tcp transport module.
    [ 3.381491] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [ 3.391105] bcm2708_dma: DMA manager at f3007000
    [ 3.395950] bcm2708_gpio: bcm2708_gpio_probe 80a466b8
    [ 3.401749] vc-mem: phys_addr:0x00000000 mem_base=0x3dc00000 mem_size:0x3f000000(1008 MiB)
    [ 3.411868] futex hash table entries: 1024 (order: 4, 65536 bytes)
    [ 3.439717] VFS: Disk quotas dquot_6.5.2
    [ 3.444125] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
    [ 3.455017] FS-Cache: Netfs ‘nfs’ registered for caching
    [ 3.461987] NFS: Registering the id_resolver key type
    [ 3.467121] Key type id_resolver registered
    [ 3.471321] Key type id_legacy registered
    [ 3.475378] nfs4filelayout_init: NFSv4 File Layout Driver Registering…
    [ 3.483273] JFS: nTxBlock = 7390, nTxLock = 59120
    [ 3.500176] SGI XFS with ACLs, security attributes, realtime, no debug enabled
    [ 3.513654] msgmni has been set to 1847
    [ 3.520454] async_tx: api initialized (async)
    [ 3.524983] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
    [ 3.532625] io scheduler noop registered (default)
    [ 3.537447] io scheduler deadline registered
    [ 3.541808] io scheduler cfq registered
    [ 3.549133] BCM2708FB: allocated DMA memory fac00000
    [ 3.554319] BCM2708FB: allocated DMA channel 0 @ f3007000
    [ 3.566383] Console: switching to colour frame buffer device 82×26
    [ 3.578647] bcm2708-dmaengine bcm2708-dmaengine: Load BCM2835 DMA engine driver
    [ 3.587891] uart-pl011 dev:f1: no DMA platform data
    [ 3.594449] kgdb: Registered I/O driver kgdboc.
    [ 3.645070] vc-cma: Videocore CMA driver
    [ 3.650499] vc-cma: vc_cma_base = 0x00000000
    [ 3.656695] vc-cma: vc_cma_size = 0x00000000 (0 MiB)
    [ 3.663589] vc-cma: vc_cma_initial = 0x00000000 (0 MiB)
    [ 3.684661] brd: module loaded
    [ 3.696492] loop: module loaded
    [ 3.701422] vchiq: vchiq_init_state: slot_zero = 0xba800000, is_master = 0
    [ 3.710630] Loading iSCSI transport class v2.0-870.
    [ 3.720220] usbcore: registered new interface driver ax88179_178a
    [ 3.727945] usbcore: registered new interface driver smsc95xx
    [ 3.735237] usbcore: registered new interface driver cdc_ncm
    [ 3.742176] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
    [ 3.949492] Core Release: 2.80a
    [ 3.953906] Setting default values for core params
    [ 3.960146] Finished setting default values for core params
    [ 4.167663] Using Buffer DMA mode
    [ 4.172317] Periodic Transfer Interrupt Enhancement – disabled
    [ 4.179508] Multiprocessor Interrupt Enhancement – disabled
    [ 4.186418] OTG VER PARAM: 0, OTG VER FLAG: 0
    [ 4.192075] Dedicated Tx FIFOs mode
    [ 4.197295] dwc_otg: Microframe scheduler enabled
    [ 4.197396] dwc_otg bcm2708_usb: DWC OTG Controller
    [ 4.203621] dwc_otg bcm2708_usb: new USB bus registered, assigned bus number 1
    [ 4.212484] dwc_otg bcm2708_usb: irq 75, io mem 0x00000000
    [ 4.219382] Init: Port Power? op_state=1
    [ 4.224699] Init: Power Port (0)
    [ 4.229589] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
    [ 4.237844] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [ 4.246510] usb usb1: Product: DWC OTG Controller
    [ 4.252608] usb usb1: Manufacturer: Linux 3.18.11-rt5+ dwc_otg_hcd
    [ 4.260193] usb usb1: SerialNumber: bcm2708_usb
    [ 4.267216] hub 1-0:1.0: USB hub found
    [ 4.272481] hub 1-0:1.0: 1 port detected
    [ 4.278391] dwc_otg: FIQ disabled
    [ 4.278406] dwc_otg: NAK holdoff disabled
    [ 4.278417] dwc_otg: FIQ split-transaction FSM disabled
    [ 4.278459] Module dwc_common_port init
    [ 4.278848] usbcore: registered new interface driver usb-storage
    [ 4.286406] usbcore: registered new interface driver ums-alauda
    [ 4.293834] usbcore: registered new interface driver ums-cypress
    [ 4.301401] usbcore: registered new interface driver ums-datafab
    [ 4.308805] usbcore: registered new interface driver ums_eneub6250
    [ 4.316335] usbcore: registered new interface driver ums-freecom
    [ 4.323633] usbcore: registered new interface driver ums-isd200
    [ 4.330880] usbcore: registered new interface driver ums-jumpshot
    [ 4.338222] usbcore: registered new interface driver ums-karma
    [ 4.345232] usbcore: registered new interface driver ums-onetouch
    [ 4.352507] usbcore: registered new interface driver ums-realtek
    [ 4.359603] usbcore: registered new interface driver ums-sddr09
    [ 4.366561] usbcore: registered new interface driver ums-sddr55
    [ 4.373491] usbcore: registered new interface driver ums-usbat
    [ 4.380731] mousedev: PS/2 mouse device common for all mice
    [ 4.387920] md: linear personality registered for level -1
    [ 4.394268] md: raid0 personality registered for level 0
    [ 4.400518] md: raid1 personality registered for level 1
    [ 4.406635] md: raid10 personality registered for level 10
    [ 4.413296] md: raid6 personality registered for level 6
    [ 4.419439] md: raid5 personality registered for level 5
    [ 4.425514] md: raid4 personality registered for level 4
    [ 4.431594] md: multipath personality registered for level -4
    [ 4.438157] md: faulty personality registered for level -5
    [ 4.445314] device-mapper: uevent: version 1.0.3
    [ 4.451574] device-mapper: ioctl: 4.28.0-ioctl (2014-09-17) initialised: dm-devel@redhat.com
    [ 4.462931] device-mapper: multipath: version 1.7.0 loaded
    [ 4.469526] device-mapper: multipath round-robin: version 1.0.0 loaded
    [ 4.474543] Indeed it is in host mode hprt0 = 00021501
    [ 4.492132] device-mapper: multipath queue-length: version 0.1.0 loaded
    [ 4.508594] device-mapper: multipath service-time: version 0.2.0 loaded
    [ 4.525135] device-mapper: raid: Loading target version 1.6.0
    [ 4.532317] sdhci: Secure Digital Host Controller Interface driver
    [ 4.548481] sdhci: Copyright(c) Pierre Ossman
    [ 4.564645] DMA channels allocated for the MMC driver
    [ 4.604446] Load BCM2835 MMC driver
    [ 4.615093] sdhci-pltfm: SDHCI platform and OF driver helper
    [ 4.624008] hidraw: raw HID events driver (C) Jiri Kosina
    [ 4.631474] usbcore: registered new interface driver usbhid
    [ 4.638487] usbhid: USB HID core driver
    [ 4.643165] mmc0: host does not support reading read-only switch, assuming write-enable
    [ 4.646633] mmc0: new high speed SDHC card at address aaaa
    [ 4.647375] mmcblk0: mmc0:aaaa SE32G 29.7 GiB
    [ 4.649153] mmcblk0: p1 p2
    [ 4.673011] TCP: cubic registered
    [ 4.677931] Initializing XFRM netlink socket
    [ 4.683727] NET: Registered protocol family 17
    [ 4.689978] Key type dns_resolver registered
    [ 4.694513] usb 1-1: new high-speed USB device number 2 using dwc_otg
    [ 4.694776] Indeed it is in host mode hprt0 = 00001101
    [ 4.711119] Registering SWP/SWPB emulation handler
    [ 4.718534] registered taskstats version 1
    [ 4.729366] Btrfs loaded
    [ 4.733583] vc-sm: Videocore shared memory driver
    [ 4.739853] [vc_sm_connected_init]: start
    [ 4.746163] [vc_sm_connected_init]: end – returning 0
    [ 4.753665] md: Waiting for all devices to be available before autodetect
    [ 4.762039] md: If you don’t use raid, use raid=noautodetect
    [ 4.770488] md: Autodetecting RAID arrays.
    [ 4.776018] md: Scanned 0 and added 0 devices.
    [ 4.781831] md: autorun …
    [ 4.785909] md: … autorun DONE.
    [ 4.795326] EXT4-fs (mmcblk0p2): couldn’t mount as ext3 due to feature incompatibilities
    [ 4.808394] EXT4-fs (mmcblk0p2): couldn’t mount as ext2 due to feature incompatibilities
    [ 4.895014] usb 1-1: New USB device found, idVendor=0424, idProduct=9514
    [ 4.903324] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
    [ 4.913217] hub 1-1:1.0: USB hub found
    [ 4.918810] hub 1-1:1.0: 5 ports detected
    [ 5.189012] EXT4-fs (mmcblk0p2): 1 orphan inode deleted
    [ 5.196431] EXT4-fs (mmcblk0p2): recovery complete
    [ 5.204684] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
    [ 5.214356] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
    [ 5.226992] VFS: Mounted root (ext4 filesystem) on device 179:2.
    [ 5.246960] devtmpfs: mounted
    [ 5.253441] Freeing unused kernel memory: 364K (809bd000 – 80a18000)
    [ 5.325238] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
    [ 5.334261] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
    [ 5.347157] smsc95xx v1.0.4
    [ 5.399142] random: nonblocking pool is initialized
    [ 5.415560] smsc95xx 1-1.1:1.0 eth0: register ‘smsc95xx’ at usb-bcm2708_usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:b0:66:23
    [ 5.524693] usb 1-1.4: new high-speed USB device number 4 using dwc_otg
    [ 5.647178] usb 1-1.4: New USB device found, idVendor=0bda, idProduct=8178
    [ 5.655898] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [ 5.665560] usb 1-1.4: Product: USB WLAN
    [ 5.671857] usb 1-1.4: Manufacturer: 802.11n
    [ 5.678286] usb 1-1.4: SerialNumber: 00e04c000001
    [ 6.485575] udevd[228]: starting version 175
    [ 6.985651] bcm2708_i2c_init_pinmode(1,2)
    [ 6.993591] bcm2708_i2c_init_pinmode(1,3)
    [ 7.016442] bcm2708_i2c bcm2708_i2c.1: BSC1 Controller at 0x3f804000 (irq 79) (baudrate 100000)
    [ 8.625397] usbcore: registered new interface driver rtl8192cu
    [ 8.672912] pcm512x 1-004d: Failed to reset device: -5
    [ 8.681970] pcm512x: probe of 1-004d failed with error -5
    [ 8.701557] pcm512x 1-004c: Failed to reset device: -5
    [ 8.714561] pcm512x: probe of 1-004c failed with error -5
    [ 10.810381] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
    [ 16.137709] NET: Registered protocol family 10
    [ 16.351694] smsc95xx 1-1.1:1.0 eth0: hardware isn’t capable of remote wakeup
    [ 16.360605] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    [ 81.248781] Bluetooth: Core ver 2.19
    [ 81.255369] NET: Registered protocol family 31
    [ 81.262602] Bluetooth: HCI device and connection manager initialized
    [ 81.272022] Bluetooth: HCI socket layer initialized
    [ 81.280046] Bluetooth: L2CAP socket layer initialized
    [ 81.288031] Bluetooth: SCO socket layer initialized
    [ 81.326272] Bluetooth: RFCOMM TTY layer initialized
    [ 81.333864] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
    [ 81.333872] Bluetooth: BNEP filters: protocol multicast
    [ 81.333957] Bluetooth: BNEP socket layer initialized
    [ 81.361832] Bluetooth: RFCOMM socket layer initialized
    [ 81.361876] Bluetooth: RFCOMM ver 1.11
    [ 82.996298] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
    [ 86.094926] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
    [ 179.974984] usb 1-1.2: new full-speed USB device number 5 using dwc_otg
    [ 180.101673] usb 1-1.2: New USB device found, idVendor=2341, idProduct=0042
    [ 180.108561] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=220
    [ 180.116049] usb 1-1.2: Manufacturer: Arduino (www.arduino.cc)
    [ 180.121796] usb 1-1.2: SerialNumber: 95232343733351618120
    [ 180.175672] cdc_acm 1-1.2:1.0: ttyACM0: USB ACM device
    [ 180.181987] usbcore: registered new interface driver cdc_acm
    [ 180.187655] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
    [ 249.126364] usb 1-1.2: USB disconnect, device number 5
    [ 320.795402] usb 1-1.5: new high-speed USB device number 6 using dwc_otg
    [ 320.920823] usb 1-1.5: New USB device found, idVendor=0951, idProduct=1665
    [ 320.927715] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [ 320.935024] usb 1-1.5: Product: DataTraveler 2.0
    [ 320.939653] usb 1-1.5: Manufacturer: Kingston
    [ 320.944016] usb 1-1.5: SerialNumber: 001CC05FE8ECBD217911008F
    [ 320.951490] usb-storage 1-1.5:1.0: USB Mass Storage device detected
    [ 320.958410] scsi host0: usb-storage 1-1.5:1.0
    [ 322.019799] scsi 0:0:0:0: Direct-Access Kingston DataTraveler 2.0 PMAP PQ: 0 ANSI: 4
    [ 322.070045] sd 0:0:0:0: Attached scsi generic sg0 type 0
    [ 322.992973] sd 0:0:0:0: [sda] 30916608 512-byte logical blocks: (15.8 GB/14.7 GiB)
    [ 323.001810] sd 0:0:0:0: [sda] Write Protect is off
    [ 323.006625] sd 0:0:0:0: [sda] Mode Sense: 23 00 00 00
    [ 323.007938] sd 0:0:0:0: [sda] No Caching mode page found
    [ 323.013257] sd 0:0:0:0: [sda] Assuming drive cache: write through
    [ 323.047813] sda: sda1
    [ 323.058701] sd 0:0:0:0: [sda] Attached SCSI removable disk
    [ 394.297711] usb 1-1.5: USB disconnect, device number 6
    [ 443.435753] usb 1-1.5: new high-speed USB device number 7 using dwc_otg
    [ 443.561412] usb 1-1.5: New USB device found, idVendor=0951, idProduct=1665
    [ 443.568302] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [ 443.575617] usb 1-1.5: Product: DataTraveler 2.0
    [ 443.580242] usb 1-1.5: Manufacturer: Kingston
    [ 443.584608] usb 1-1.5: SerialNumber: 001CC05FE8ECBD217911008F
    [ 443.592001] usb-storage 1-1.5:1.0: USB Mass Storage device detected
    [ 443.598792] scsi host1: usb-storage 1-1.5:1.0
    [ 444.660148] scsi 1:0:0:0: Direct-Access Kingston DataTraveler 2.0 PMAP PQ: 0 ANSI: 4
    [ 444.671032] sd 1:0:0:0: Attached scsi generic sg0 type 0
    [ 445.606935] sd 1:0:0:0: [sda] 30916608 512-byte logical blocks: (15.8 GB/14.7 GiB)
    [ 445.615809] sd 1:0:0:0: [sda] Write Protect is off
    [ 445.620655] sd 1:0:0:0: [sda] Mode Sense: 23 00 00 00
    [ 445.622055] sd 1:0:0:0: [sda] No Caching mode page found
    [ 445.627394] sd 1:0:0:0: [sda] Assuming drive cache: write through
    [ 445.663668] sda: sda1
    [ 445.673299] sd 1:0:0:0: [sda] Attached SCSI removable disk
    [ 830.306982] usb 1-1.2: new full-speed USB device number 8 using dwc_otg
    [ 830.435149] usb 1-1.2: New USB device found, idVendor=2341, idProduct=0042
    [ 830.442338] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=220
    [ 830.449973] usb 1-1.2: Manufacturer: Arduino (www.arduino.cc)
    [ 830.455746] usb 1-1.2: SerialNumber: 95232343733351618120
    [ 830.463351] cdc_acm 1-1.2:1.0: ttyACM0: USB ACM device

    • dewy721 says:

      Ok, i’m kinda curious about this one. If I’m reading the dump log right, you’re trying to run a version of machinekit that is compiled for ARM procressors on a quad-core ARM (udoo Quad?) system, w/raid (and a boatload of usb devices)? 4-axes… hmm, a 3d-printer setup or less commonly maybe a router table with an accessory rotary axis?

      Hmm… The arduino is listed as /dev/ttyACM0 Did you set the HAL2Arduino….py file to be executable; is it in a common $PATH directory so it can be loaded as machinekit starts up?

      Your dump log doesn’t appear to be complete though.

      I’d like to help, and while there’s a decent amount of info, there’s not any ‘stuff breaking’ info provided.

      • Marco Gaspar says:

        Hello,

        I use a raspberry pi 2 and upload a machinekit image for raspberry 2.

        This is the complete log that linuxcnc give me.

        What distro should i use?

  46. Marco Gaspar says:

    Hello,

    I use a raspberry pi 2 and upload a machinekit image for raspberry 2.

    This is the complete log that linuxcnc give me.

    What distro should i use?

    • dewy721 says:

      Oh, I completely forgot about the raspberry pi 2 having a quad core. (Lol, I even own one to boot.)

      Yes, that would be the distro to use.

      Umm, well let’s start with the basics: Did you have machinekit up and running before adding Hal2Arduino?

      Have you made the python script included with Hal2Arduino executable?

      Is it where the .hal file will attempt to find it?

      Does the arduino have the Hal2Arduino firmware flashed on to it?

      Let me know.

  47. Marco Gaspar says:

    Hello,

    -Upload Arduino firmware “HAL2Arduino_0_6d” to arduino Mega2560

    -Now i install again machinekit image (RPi2-machinekit-1.0.img) :p
    -Run the LinuxCnc Stepconf Wizard” to create a folder on desktop called “my-mill”.
    -Copy the files in included Hal2Arduino 0.6d LinuxCNC file folder into “my-mill” folder.
    -chmod +x HAL2Arduino-0.6d.py
    -Run the shortcut that LinuxCnc Stepconf Wizard create on desktop (my-mill.desktop)

    my-mill.desktop have inside:
    [Desktop Entry]
    Version=1.0
    Terminal=false
    Name=launch my-mill
    Exec=linuxcnc /home/mk/linuxcnc/configs/my-mill/my-mill.ini
    Type=Application
    Comment=Desktop Launcher for LinuxCNC config made by Stepconf
    Icon=/usr/share/linuxcnc/machinekiticon.png

    and get this log error:
    Print file information:
    RUN_IN_PLACE=no
    LINUXCNC_DIR=
    LINUXCNC_BIN_DIR=/usr/bin
    LINUXCNC_TCL_DIR=/usr/lib/tcltk/linuxcnc
    LINUXCNC_SCRIPT_DIR=
    LINUXCNC_RTLIB_DIR=/usr/lib/linuxcnc
    LINUXCNC_CONFIG_DIR=
    LINUXCNC_LANG_DIR=/usr/share/linuxcnc/tcl/msgs
    INIVAR=/usr/libexec/linuxcnc/inivar
    HALCMD=halcmd
    LINUXCNC_EMCSH=/usr/bin/wish8.5
    MACHINEKIT – 0.1
    Machine configuration directory is ‘/home/mk/linuxcnc/configs/my-mill’
    Machine configuration file is ‘my-mill.ini’
    INIFILE=/home/mk/linuxcnc/configs/my-mill/my-mill.ini
    PARAMETER_FILE=linuxcnc.var
    TASK=milltask
    HALUI=halui
    DISPLAY=axis
    Starting Machinekit…
    Starting Machinekit server program: linuxcncsvr
    Loading Real Time OS, RTAPI, and HAL_LIB modules
    Starting Machinekit IO program: io
    io started
    halcmd loadusr io started
    Starting HAL User Interface program: halui
    Shutting down and cleaning up Machinekit…
    Killing task linuxcncsvr, PID=2560
    Removing HAL_LIB, RTAPI, and Real Time OS modules
    Removing NML shared memory segments
    Cleanup done

    Debug file information:
    my-mill.hal:5: insmod failed, returned -1
    See the log and output of ‘dmesg’ for more information.
    2560
    PID TTY STAT TIME COMMAND
    Stopping realtime threads
    Unloading hal components

    Kernel message information:
    [ 0.000000] Booting Linux on physical CPU 0xf00
    [ 0.000000] Initializing cgroup subsys cpuset
    [ 0.000000] Initializing cgroup subsys cpu
    [ 0.000000] Initializing cgroup subsys cpuacct
    [ 0.000000] Linux version 3.18.11-rt5+ (gemi@mba) (gcc version 4.7.2 (Debian 4.7.2-5) ) #45 SMP PREEMPT RT Thu Apr 9 17:56:25 SGT 2015
    [ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
    [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    [ 0.000000] Machine: BCM2709
    [ 0.000000] cma: Reserved 8 MiB at 0x3a800000
    [ 0.000000] Memory policy: Data cache writealloc
    [ 0.000000] On node 0 totalpages: 241664
    [ 0.000000] free_area_init_node: node 0, pgdat 80a84f00, node_mem_map ba093000
    [ 0.000000] Normal zone: 1888 pages used for memmap
    [ 0.000000] Normal zone: 0 pages reserved
    [ 0.000000] Normal zone: 241664 pages, LIFO batch:31
    [ 0.000000] [bcm2709_smp_init_cpus] enter (85a0->f3003010)
    [ 0.000000] [bcm2709_smp_init_cpus] ncores=4
    [ 0.000000] PERCPU: Embedded 11 pages/cpu @ba05d000 s13248 r8192 d23616 u45056
    [ 0.000000] pcpu-alloc: s13248 r8192 d23616 u45056 alloc=11*4096
    [ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
    [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 239776
    [ 0.000000] Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2709.boardrev=0xa01041 bcm2709.serial=0x19b06623 smsc95xx.macaddr=B8:27:EB:B0:66:23 bcm2708_fb.fbswap=1 bcm2709.disk_led_gpio=47 bcm2709.disk_led_active_low=0 sdhci-bcm2708.emmc_clock_freq=250000000 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000 dwc_otg.fiq_enable=0 dwc_otg.fiq_fsm_enable=0 dwc_otg.nak_holdoff=0 root=/dev/mmcblk0p2 rw rootwait console=ttyAMA0,115200 console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=ttyAMA0,115200 elevator=noop
    [ 0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
    [ 0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes)
    [ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
    [ 0.000000] Memory: 937736K/966656K available (7390K kernel code, 489K rwdata, 2548K rodata, 364K init, 810K bss, 28920K reserved)
    [ 0.000000] Virtual kernel memory layout:
    [ 0.000000] vector : 0xffff0000 – 0xffff1000 ( 4 kB)
    [ 0.000000] fixmap : 0xffc00000 – 0xffe00000 (2048 kB)
    [ 0.000000] vmalloc : 0xbb800000 – 0xff000000 (1080 MB)
    [ 0.000000] lowmem : 0x80000000 – 0xbb000000 ( 944 MB)
    [ 0.000000] modules : 0x7f000000 – 0x80000000 ( 16 MB)
    [ 0.000000] .text : 0x80008000 – 0x809bcc24 (9940 kB)
    [ 0.000000] .init : 0x809bd000 – 0x80a18000 ( 364 kB)
    [ 0.000000] .data : 0x80a18000 – 0x80a9261c ( 490 kB)
    [ 0.000000] .bss : 0x80a9261c – 0x80b5cf74 ( 811 kB)
    [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
    [ 0.000000] Preemptible hierarchical RCU implementation.
    [ 0.000000] NR_IRQS:608
    [ 0.000000] Architected cp15 timer(s) running at 19.20MHz (virt).
    [ 0.000012] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 3579139424256ns
    [ 0.000025] Switching to timer-based delay loop, resolution 52ns
    [ 0.000292] Console: colour dummy device 80×30
    [ 0.001398] console [tty1] enabled
    [ 0.001425] Calibrating delay loop (skipped), value calculated using timer frequency.. 38.40 BogoMIPS (lpj=192000)
    [ 0.001431] pid_max: default: 32768 minimum: 301
    [ 0.001842] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
    [ 0.001853] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
    [ 0.003065] Initializing cgroup subsys memory
    [ 0.003095] Initializing cgroup subsys devices
    [ 0.003110] Initializing cgroup subsys freezer
    [ 0.003143] Initializing cgroup subsys net_cls
    [ 0.003157] Initializing cgroup subsys blkio
    [ 0.003171] Initializing cgroup subsys perf_event
    [ 0.003186] Initializing cgroup subsys net_prio
    [ 0.003373] CPU: Testing write buffer coherency: ok
    [ 0.003831] missing device node for CPU 0
    [ 0.004170] missing device node for CPU 1
    [ 0.004199] missing device node for CPU 2
    [ 0.004226] missing device node for CPU 3
    [ 0.004263] CPU0: thread -1, cpu 0, socket 15, mpidr 80000f00
    [ 0.004296] [bcm2709_smp_prepare_cpus] enter
    [ 0.004433] Setting up static identity map for 0x705d40 – 0x705d74
    [ 0.120773] [bcm2709_boot_secondary] cpu:1 started (0) 18
    [ 0.121072] CPU1: Booted secondary processor
    [ 0.121080] [bcm2709_secondary_init] enter cpu:1
    [ 0.121128] CPU1: thread -1, cpu 1, socket 15, mpidr 80000f01
    [ 0.160745] [bcm2709_boot_secondary] cpu:2 started (0) 17
    [ 0.160994] CPU2: Booted secondary processor
    [ 0.161001] [bcm2709_secondary_init] enter cpu:2
    [ 0.161036] CPU2: thread -1, cpu 2, socket 15, mpidr 80000f02
    [ 0.200838] [bcm2709_boot_secondary] cpu:3 started (0) 18
    [ 0.201055] CPU3: Booted secondary processor
    [ 0.201062] [bcm2709_secondary_init] enter cpu:3
    [ 0.201094] CPU3: thread -1, cpu 3, socket 15, mpidr 80000f03
    [ 0.201220] Brought up 4 CPUs
    [ 0.201316] SMP: Total of 4 processors activated (153.60 BogoMIPS).
    [ 0.201348] CPU: All CPU(s) started in SVC mode.
    [ 0.202638] devtmpfs: initialized
    [ 0.239464] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
    [ 0.242464] xor: measuring software checksum speed
    [ 0.340824] arm4regs : 832.400 MB/sec
    [ 0.440987] 8regs : 528.400 MB/sec
    [ 0.541182] 32regs : 430.800 MB/sec
    [ 0.641362] neon : 784.000 MB/sec
    [ 0.641396] xor: using function: arm4regs (832.400 MB/sec)
    [ 0.641499] pinctrl core: initialized pinctrl subsystem
    [ 0.642495] NET: Registered protocol family 16
    [ 0.648520] DMA: preallocated 4096 KiB pool for atomic coherent allocations
    [ 0.650132] bcm2709.uart_clock = 3000000
    [ 0.653078] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
    [ 0.653130] hw-breakpoint: maximum watchpoint size is 8 bytes.
    [ 0.653189] mailbox: Broadcom VideoCore Mailbox driver
    [ 0.653560] bcm2708_vcio: mailbox at f300b880
    [ 0.653990] bcm_power: Broadcom power driver
    [ 0.654033] bcm_power_open() -> 0
    [ 0.654062] bcm_power_request(0, 8)
    [ 1.154773] bcm_mailbox_read -> 00000080, 0
    [ 1.154807] bcm_power_request -> 0
    [ 1.154965] Serial: AMBA PL011 UART driver
    [ 1.155158] dev:f1: ttyAMA0 at MMIO 0x3f201000 (irq = 83, base_baud = 0) is a PL011 rev3
    [ 1.700581] console [ttyAMA0] enabled
    [ 1.954581] raid6: int32x1 89 MB/s
    [ 2.124343] raid6: int32x2 105 MB/s
    [ 2.294632] raid6: int32x4 98 MB/s
    [ 2.465466] raid6: int32x8 80 MB/s
    [ 2.635239] raid6: neonx1 285 MB/s
    [ 2.805647] raid6: neonx2 387 MB/s
    [ 2.975854] raid6: neonx4 423 MB/s
    [ 3.146387] raid6: neonx8 270 MB/s
    [ 3.150151] raid6: using algorithm neonx4 (423 MB/s)
    [ 3.155128] raid6: using intx1 recovery algorithm
    [ 3.160882] SCSI subsystem initialized
    [ 3.165207] usbcore: registered new interface driver usbfs
    [ 3.170826] usbcore: registered new interface driver hub
    [ 3.176336] usbcore: registered new device driver usb
    [ 3.185103] Switched to clocksource arch_sys_counter
    [ 3.296992] FS-Cache: Loaded
    [ 3.300268] CacheFiles: Loaded
    [ 3.318962] NET: Registered protocol family 2
    [ 3.324818] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
    [ 3.332057] TCP bind hash table entries: 8192 (order: 5, 229376 bytes)
    [ 3.339110] TCP: Hash tables configured (established 8192 bind 8192)
    [ 3.345609] TCP: reno registered
    [ 3.348867] UDP hash table entries: 512 (order: 3, 32768 bytes)
    [ 3.354880] UDP-Lite hash table entries: 512 (order: 3, 32768 bytes)
    [ 3.361760] NET: Registered protocol family 1
    [ 3.366772] RPC: Registered named UNIX socket transport module.
    [ 3.372715] RPC: Registered udp transport module.
    [ 3.377432] RPC: Registered tcp transport module.
    [ 3.382149] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [ 3.391740] bcm2708_dma: DMA manager at f3007000
    [ 3.396582] bcm2708_gpio: bcm2708_gpio_probe 80a466b8
    [ 3.402376] vc-mem: phys_addr:0x00000000 mem_base=0x3dc00000 mem_size:0x3f000000(1008 MiB)
    [ 3.412525] futex hash table entries: 1024 (order: 4, 65536 bytes)
    [ 3.440506] VFS: Disk quotas dquot_6.5.2
    [ 3.444904] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
    [ 3.455847] FS-Cache: Netfs ‘nfs’ registered for caching
    [ 3.462787] NFS: Registering the id_resolver key type
    [ 3.467922] Key type id_resolver registered
    [ 3.472122] Key type id_legacy registered
    [ 3.476180] nfs4filelayout_init: NFSv4 File Layout Driver Registering…
    [ 3.484066] JFS: nTxBlock = 7390, nTxLock = 59120
    [ 3.500980] SGI XFS with ACLs, security attributes, realtime, no debug enabled
    [ 3.514477] msgmni has been set to 1847
    [ 3.521195] async_tx: api initialized (async)
    [ 3.525722] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
    [ 3.533380] io scheduler noop registered (default)
    [ 3.538201] io scheduler deadline registered
    [ 3.542563] io scheduler cfq registered
    [ 3.549896] BCM2708FB: allocated DMA memory fac00000
    [ 3.555163] BCM2708FB: allocated DMA channel 0 @ f3007000
    [ 3.567164] Console: switching to colour frame buffer device 82×26
    [ 3.579422] bcm2708-dmaengine bcm2708-dmaengine: Load BCM2835 DMA engine driver
    [ 3.588666] uart-pl011 dev:f1: no DMA platform data
    [ 3.595209] kgdb: Registered I/O driver kgdboc.
    [ 3.645810] vc-cma: Videocore CMA driver
    [ 3.651239] vc-cma: vc_cma_base = 0x00000000
    [ 3.657437] vc-cma: vc_cma_size = 0x00000000 (0 MiB)
    [ 3.664333] vc-cma: vc_cma_initial = 0x00000000 (0 MiB)
    [ 3.685371] brd: module loaded
    [ 3.697170] loop: module loaded
    [ 3.702123] vchiq: vchiq_init_state: slot_zero = 0xba800000, is_master = 0
    [ 3.711322] Loading iSCSI transport class v2.0-870.
    [ 3.720935] usbcore: registered new interface driver ax88179_178a
    [ 3.728646] usbcore: registered new interface driver smsc95xx
    [ 3.735942] usbcore: registered new interface driver cdc_ncm
    [ 3.742882] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
    [ 3.950205] Core Release: 2.80a
    [ 3.954618] Setting default values for core params
    [ 3.960837] Finished setting default values for core params
    [ 4.168360] Using Buffer DMA mode
    [ 4.173013] Periodic Transfer Interrupt Enhancement – disabled
    [ 4.180205] Multiprocessor Interrupt Enhancement – disabled
    [ 4.187117] OTG VER PARAM: 0, OTG VER FLAG: 0
    [ 4.192773] Dedicated Tx FIFOs mode
    [ 4.197993] dwc_otg: Microframe scheduler enabled
    [ 4.198095] dwc_otg bcm2708_usb: DWC OTG Controller
    [ 4.204325] dwc_otg bcm2708_usb: new USB bus registered, assigned bus number 1
    [ 4.213144] dwc_otg bcm2708_usb: irq 75, io mem 0x00000000
    [ 4.220046] Init: Port Power? op_state=1
    [ 4.225364] Init: Power Port (0)
    [ 4.230299] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
    [ 4.238558] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [ 4.247222] usb usb1: Product: DWC OTG Controller
    [ 4.253321] usb usb1: Manufacturer: Linux 3.18.11-rt5+ dwc_otg_hcd
    [ 4.260905] usb usb1: SerialNumber: bcm2708_usb
    [ 4.267925] hub 1-0:1.0: USB hub found
    [ 4.273188] hub 1-0:1.0: 1 port detected
    [ 4.279088] dwc_otg: FIQ disabled
    [ 4.279103] dwc_otg: NAK holdoff disabled
    [ 4.279115] dwc_otg: FIQ split-transaction FSM disabled
    [ 4.279154] Module dwc_common_port init
    [ 4.279558] usbcore: registered new interface driver usb-storage
    [ 4.287114] usbcore: registered new interface driver ums-alauda
    [ 4.294527] usbcore: registered new interface driver ums-cypress
    [ 4.302074] usbcore: registered new interface driver ums-datafab
    [ 4.309474] usbcore: registered new interface driver ums_eneub6250
    [ 4.316998] usbcore: registered new interface driver ums-freecom
    [ 4.324292] usbcore: registered new interface driver ums-isd200
    [ 4.331535] usbcore: registered new interface driver ums-jumpshot
    [ 4.338874] usbcore: registered new interface driver ums-karma
    [ 4.345881] usbcore: registered new interface driver ums-onetouch
    [ 4.353149] usbcore: registered new interface driver ums-realtek
    [ 4.360271] usbcore: registered new interface driver ums-sddr09
    [ 4.367230] usbcore: registered new interface driver ums-sddr55
    [ 4.374159] usbcore: registered new interface driver ums-usbat
    [ 4.381223] mousedev: PS/2 mouse device common for all mice
    [ 4.388422] md: linear personality registered for level -1
    [ 4.394775] md: raid0 personality registered for level 0
    [ 4.401024] md: raid1 personality registered for level 1
    [ 4.407142] md: raid10 personality registered for level 10
    [ 4.413785] md: raid6 personality registered for level 6
    [ 4.419930] md: raid5 personality registered for level 5
    [ 4.426010] md: raid4 personality registered for level 4
    [ 4.432091] md: multipath personality registered for level -4
    [ 4.438657] md: faulty personality registered for level -5
    [ 4.445863] device-mapper: uevent: version 1.0.3
    [ 4.452130] device-mapper: ioctl: 4.28.0-ioctl (2014-09-17) initialised: dm-devel@redhat.com
    [ 4.463489] device-mapper: multipath: version 1.7.0 loaded
    [ 4.470090] device-mapper: multipath round-robin: version 1.0.0 loaded
    [ 4.475261] Indeed it is in host mode hprt0 = 00021501
    [ 4.492689] device-mapper: multipath queue-length: version 0.1.0 loaded
    [ 4.509231] device-mapper: multipath service-time: version 0.2.0 loaded
    [ 4.525771] device-mapper: raid: Loading target version 1.6.0
    [ 4.532960] sdhci: Secure Digital Host Controller Interface driver
    [ 4.549111] sdhci: Copyright(c) Pierre Ossman
    [ 4.555360] DMA channels allocated for the MMC driver
    [ 4.595170] Load BCM2835 MMC driver
    [ 4.601553] sdhci-pltfm: SDHCI platform and OF driver helper
    [ 4.609225] hidraw: raw HID events driver (C) Jiri Kosina
    [ 4.616586] usbcore: registered new interface driver usbhid
    [ 4.623594] usbhid: USB HID core driver
    [ 4.629252] TCP: cubic registered
    [ 4.633953] mmc0: host does not support reading read-only switch, assuming write-enable
    [ 4.637194] mmc0: new high speed SDHC card at address aaaa
    [ 4.637977] mmcblk0: mmc0:aaaa SE32G 29.7 GiB
    [ 4.639767] mmcblk0: p1 p2
    [ 4.662506] Initializing XFRM netlink socket
    [ 4.668297] NET: Registered protocol family 17
    [ 4.674464] Key type dns_resolver registered
    [ 4.681074] Registering SWP/SWPB emulation handler
    [ 4.685236] usb 1-1: new high-speed USB device number 2 using dwc_otg
    [ 4.685483] Indeed it is in host mode hprt0 = 00001101
    [ 4.719901] registered taskstats version 1
    [ 4.730505] Btrfs loaded
    [ 4.734775] vc-sm: Videocore shared memory driver
    [ 4.741054] [vc_sm_connected_init]: start
    [ 4.747291] [vc_sm_connected_init]: end – returning 0
    [ 4.754816] md: Waiting for all devices to be available before autodetect
    [ 4.763190] md: If you don’t use raid, use raid=noautodetect
    [ 4.771728] md: Autodetecting RAID arrays.
    [ 4.777270] md: Scanned 0 and added 0 devices.
    [ 4.783147] md: autorun …
    [ 4.787301] md: … autorun DONE.
    [ 4.796756] EXT4-fs (mmcblk0p2): couldn’t mount as ext3 due to feature incompatibilities
    [ 4.809940] EXT4-fs (mmcblk0p2): couldn’t mount as ext2 due to feature incompatibilities
    [ 4.836167] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
    [ 4.847448] VFS: Mounted root (ext4 filesystem) on device 179:2.
    [ 4.866101] devtmpfs: mounted
    [ 4.871495] Freeing unused kernel memory: 364K (809bd000 – 80a18000)
    [ 4.895775] usb 1-1: New USB device found, idVendor=0424, idProduct=9514
    [ 4.904182] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
    [ 4.914200] hub 1-1:1.0: USB hub found
    [ 4.919987] hub 1-1:1.0: 5 ports detected
    [ 5.205506] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
    [ 5.326063] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
    [ 5.335374] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
    [ 5.348597] smsc95xx v1.0.4
    [ 5.416104] random: nonblocking pool is initialized
    [ 5.431417] smsc95xx 1-1.1:1.0 eth0: register ‘smsc95xx’ at usb-bcm2708_usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:b0:66:23
    [ 5.525576] usb 1-1.3: new full-speed USB device number 4 using dwc_otg
    [ 5.640080] usb 1-1.3: New USB device found, idVendor=2341, idProduct=0042
    [ 5.649465] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=220
    [ 5.661406] usb 1-1.3: Manufacturer: Arduino (www.arduino.cc)
    [ 5.669543] usb 1-1.3: SerialNumber: 95232343733351618120
    [ 6.155272] udevd[228]: starting version 175
    [ 6.659506] bcm2708_i2c_init_pinmode(1,2)
    [ 6.670600] bcm2708_i2c_init_pinmode(1,3)
    [ 6.711990] bcm2708_i2c bcm2708_i2c.1: BSC1 Controller at 0x3f804000 (irq 79) (baudrate 100000)
    [ 7.780630] cdc_acm 1-1.3:1.0: ttyACM0: USB ACM device
    [ 7.804518] usbcore: registered new interface driver cdc_acm
    [ 7.812849] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
    [ 8.209306] pcm512x 1-004d: Failed to reset device: -5
    [ 8.217806] pcm512x: probe of 1-004d failed with error -5
    [ 8.227169] pcm512x 1-004c: Failed to reset device: -5
    [ 8.236432] pcm512x: probe of 1-004c failed with error -5
    [ 10.180318] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
    [ 15.505998] NET: Registered protocol family 10
    [ 15.712412] smsc95xx 1-1.1:1.0 eth0: hardware isn’t capable of remote wakeup
    [ 15.721215] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    [ 17.277998] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
    [ 17.280092] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0x4DE1
    [ 29.670642] Bluetooth: Core ver 2.19
    [ 29.677767] NET: Registered protocol family 31
    [ 29.685487] Bluetooth: HCI device and connection manager initialized
    [ 29.694789] Bluetooth: HCI socket layer initialized
    [ 29.702738] Bluetooth: L2CAP socket layer initialized
    [ 29.711235] Bluetooth: SCO socket layer initialized
    [ 29.776307] Bluetooth: RFCOMM TTY layer initialized
    [ 29.784434] Bluetooth: RFCOMM socket layer initialized
    [ 29.784839] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
    [ 29.784846] Bluetooth: BNEP filters: protocol multicast
    [ 29.784874] Bluetooth: BNEP socket layer initialized
    [ 29.816940] Bluetooth: RFCOMM ver 1.11

  48. Marco Gaspar says:

    Hello dewy721

    Do you see what’s the problem?

    Best Regards

  49. Marco Gaspar says:

    beaglebone black is better?

  50. Marco Gaspar says:

    i try this http://rkmiit.ru/main/all/students/educational/tutorials/arduinolinuxcnc_en.html and works.

    Then i try halrun custom.hal and i get:
    msgd:0 stopped
    rtapi:0 stopped
    Waiting for component ‘Hal2Arduino’ to become ready………………………Found device on /dev/ttyACM0
    Asking for firmware info.
    Firmware: HAL-2-Arduino
    Unit: ‘0’
    Version: 0.6
    comThread: port=/dev/ttyACM0 arrayPos:0 Queue:0x51be40
    ……………………….makePins: creating: ‘axis_0_home-sw-in’
    makePins: creating: ‘axis_0_joint-pos-cmd’
    makePins: creating: ‘axis_0_joint-vel-cmd’
    makePins: creating: ‘axis_0_pos-lim-sw-in’
    makePins: creating: ‘axis_0_neg-lim-sw-in’
    makePins: creating: ‘axis_1_home-sw-in’
    makePins: creating: ‘axis_1_joint-pos-cmd’
    makePins: creating: ‘axis_1_joint-vel-cmd’
    makePins: creating: ‘axis_1_pos-lim-sw-in’
    makePins: creating: ‘axis_1_neg-lim-sw-in’
    makePins: creating: ‘axis_2_home-sw-in’
    makePins: creating: ‘axis_2_joint-pos-cmd’
    makePins: creating: ‘axis_2_joint-vel-cmd’
    makePins: creating: ‘axis_2_pos-lim-sw-in’
    makePins: creating: ‘axis_2_neg-lim-sw-in’
    makePins: creating: ‘axis_3_home-sw-in’
    makePins: creating: ‘axis_3_joint-pos-cmd’
    makePins: creating: ‘axis_3_joint-vel-cmd’
    makePins: creating: ‘axis_3_pos-lim-sw-in’
    makePins: creating: ‘axis_3_neg-lim-sw-in’
    makePins: creating: ‘axis_4_home-sw-in’
    .makePins: creating: ‘axis_4_joint-pos-cmd’
    makePins: creating: ‘axis_4_joint-vel-cmd’
    makePins: creating: ‘axis_4_pos-lim-sw-in’
    makePins: creating: ‘axis_4_neg-lim-sw-in’
    comService: started.commandList=[”]

    linkData=”
    listOfPorts=[‘/dev/ttyACM0’]
    listOfCommands=[‘215 224 226 231 233’]
    listOfAxis=[‘0 1 2 3 4’]
    listOfUnits=[‘0’]
    linkMsg=”
    comThread: Sending 996 0 0; to /dev/ttyACM0
    comThread: Received 231 1 1 233
    comThread: Received 231 2 1 234;
    comThread: Received 231 3 1 235;
    comThread: Received 231 4 1 236;
    ……………….commandHandler: Got 231 1 1

    commandHandler: Got 231 2 1
    custom.hal:25: unlink failed
    commandHandler: Got 231 3 1
    commandHandler: Got 231 4 1
    comThread: Sending 224 1 0; to /dev/ttyACM0
    comThread: Sending 226 1 0; to /dev/ttyACM0
    comThread: Sending 224 2 0; to /dev/ttyACM0
    comThread: Sending 226 2 0; to /dev/ttyACM0
    comThread: Sending 224 3 0; to /dev/ttyACM0
    comThread: Sending 226 3 0; to /dev/ttyACM0
    comThread: Sending 224 4 0; to /dev/ttyACM0
    comThread: Sending 226 4 0; to /dev/ttyACM0
    Traceback (most recent call last):
    File “./HAL2Arduino-0.6d.py”, line 2020, in
    commandHandler(str(listOfCommands), str(listOfAxis))
    File “./HAL2Arduino-0.6d.py”, line 1072, in commandHandler
    if codesAccepted.find(str(command)) > -1 and axisesRequested.find(str(thisAxis)) > -1:
    KeyboardInterrupt
    Unhandled exception in thread started by
    sys.excepthook is missing
    lost sys.stderr
    Unhandled exception in thread started by
    sys.excepthook is missing
    lost sys.stderr

  51. Marco Gaspar says:

    unlinkp axis.0.home-sw-in

    • dewy721 says:

      Ah, I see. *unlinkp* (aka. un-link pin). It’ll ‘bork’ if it attempts to unlink a pin that doesn’t actually exist/exist yet. Such as *axis.0.home-sw-in* in this case has not been ‘assigned’ to anything.

      Try commenting out that line of the hal file and see if it can get past that point. (You might have several of these non-existing pins to comment out.)

  52. Marco Gaspar says:

    i comment all of them.

    halrun custom.hal
    msgd:0 stopped
    rtapi:0 stopped
    Waiting for component ‘Hal2Arduino’ to become ready……………………..Found device on /dev/ttyACM0
    Asking for firmware info.
    Firmware: HAL-2-Arduino
    Unit: ‘0’
    Version: 0.6
    comThread: port=/dev/ttyACM0 arrayPos:0 Queue:0xe34e40
    ……………………….makePins: creating: ‘axis_0_home-sw-in’
    makePins: creating: ‘axis_0_joint-pos-cmd’
    makePins: creating: ‘axis_0_joint-vel-cmd’
    makePins: creating: ‘axis_0_pos-lim-sw-in’
    makePins: creating: ‘axis_0_neg-lim-sw-in’
    makePins: creating: ‘axis_1_home-sw-in’
    makePins: creating: ‘axis_1_joint-pos-cmd’
    makePins: creating: ‘axis_1_joint-vel-cmd’
    makePins: creating: ‘axis_1_pos-lim-sw-in’
    makePins: creating: ‘axis_1_neg-lim-sw-in’
    makePins: creating: ‘axis_2_home-sw-in’
    makePins: creating: ‘axis_2_joint-pos-cmd’
    makePins: creating: ‘axis_2_joint-vel-cmd’
    makePins: creating: ‘axis_2_pos-lim-sw-in’
    makePins: creating: ‘axis_2_neg-lim-sw-in’
    makePins: creating: ‘axis_3_home-sw-in’
    makePins: creating: ‘axis_3_joint-pos-cmd’
    makePins: creating: ‘axis_3_joint-vel-cmd’
    makePins: creating: ‘axis_3_pos-lim-sw-in’
    makePins: creating: ‘axis_3_neg-lim-sw-in’
    makePins: creating: ‘axis_4_home-sw-in’
    makePins: creating: ‘axis_4_joint-pos-cmd’
    makePins: creating: ‘axis_4_joint-vel-cmd’
    makePins: creating: ‘axis_4_pos-lim-sw-in’
    makePins: creating: ‘axis_4_neg-lim-sw-in’
    comService: started.
    commandList=[”]
    linkData=”
    listOfPorts=[‘/dev/ttyACM0’]
    listOfCommands=[‘215 224 226 231 233’]
    listOfAxis=[‘0 1 2 3 4’]
    listOfUnits=[‘0’]
    linkMsg=”
    .comThread: Sending 996 0 0; to /dev/ttyACM0
    comThread: Received 231 1 1 233
    comThread: Received 231 2 1 234;
    comThread: Received 231 3 1 235;
    comThread: Received 231 4 1 236;
    ……………….commandHandler: Got 231 1 1
    commandHandler: Got 231 2 1
    commandHandler: Got 231 3 1
    commandHandler: Got 231 4 1

    custom.hal:28: Pin ‘axis.0.home-sw-in’ does not exist
    comThread: Sending 224 1 0; to /dev/ttyACM0
    comThread: Sending 226 1 0; to /dev/ttyACM0
    comThread: Sending 224 2 0; to /dev/ttyACM0
    comThread: Sending 226 2 0; to /dev/ttyACM0
    comThread: Sending 224 3 0; to /dev/ttyACM0
    comThread: Sending 226 3 0; to /dev/ttyACM0
    comThread: Sending 224 4 0; to /dev/ttyACM0
    comThread: Sending 226 4 0; to /dev/ttyACM0
    Traceback (most recent call last):
    File “./HAL2Arduino-0.6d.py”, line 2020, in
    commandHandler(str(listOfCommands), str(listOfAxis))
    File “./HAL2Arduino-0.6d.py”, line 1155, in commandHandler
    if codesAccepted.find(“309”) > -1:
    KeyboardInterrupt
    Closing port: /dev/ttyACM0
    Unhandled exception in thread started by
    sys.excepthook is missing
    lost sys.stderr
    Unhandled exception in thread started by
    sys.excepthook is missing
    lost sys.stderr

  53. Marco Gaspar says:

    halrun custom.hal
    msgd:0 stopped
    rtapi:0 stopped
    Waiting for component ‘Hal2Arduino’ to become ready……………………..Found device on /dev/ttyACM0
    Asking for firmware info.
    Firmware: HAL-2-Arduino
    Unit: ‘0’
    Version: 0.6
    comThread: port=/dev/ttyACM0 arrayPos:0 Queue:0x50fe40
    ………………………..makePins: creating: ‘axis_0_home-sw-in’
    makePins: creating: ‘axis_0_joint-pos-cmd’
    makePins: creating: ‘axis_0_joint-vel-cmd’
    makePins: creating: ‘axis_0_pos-lim-sw-in’
    makePins: creating: ‘axis_0_neg-lim-sw-in’
    makePins: creating: ‘axis_1_home-sw-in’
    makePins: creating: ‘axis_1_joint-pos-cmd’
    makePins: creating: ‘axis_1_joint-vel-cmd’
    makePins: creating: ‘axis_1_pos-lim-sw-in’
    makePins: creating: ‘axis_1_neg-lim-sw-in’
    makePins: creating: ‘axis_2_home-sw-in’
    makePins: creating: ‘axis_2_joint-pos-cmd’
    makePins: creating: ‘axis_2_joint-vel-cmd’
    makePins: creating: ‘axis_2_pos-lim-sw-in’
    makePins: creating: ‘axis_2_neg-lim-sw-in’
    makePins: creating: ‘axis_3_home-sw-in’
    makePins: creating: ‘axis_3_joint-pos-cmd’
    makePins: creating: ‘axis_3_joint-vel-cmd’
    makePins: creating: ‘axis_3_pos-lim-sw-in’
    makePins: creating: ‘axis_3_neg-lim-sw-in’
    makePins: creating: ‘axis_4_home-sw-in’
    makePins: creating: ‘axis_4_joint-pos-cmd’
    makePins: creating: ‘axis_4_joint-vel-cmd’
    makePins: creating: ‘axis_4_pos-lim-sw-in’
    makePins: creating: ‘axis_4_neg-lim-sw-in’
    comService: started.
    commandList=[”]
    linkData=”
    listOfPorts=[‘/dev/ttyACM0’]
    listOfCommands=[‘215 224 226 231 233’]
    listOfAxis=[‘0 1 2 3 4’]
    comThread: Sending 996 0 0; to /dev/ttyACM0listOfUnits=[‘0’]

    linkMsg=”
    ………………..
    comThread: Sending 224 1 0; to /dev/ttyACM0
    comThread: Sending 226 1 0; to /dev/ttyACM0
    comThread: Sending 224 2 0; to /dev/ttyACM0
    comThread: Sending 226 2 0; to /dev/ttyACM0
    comThread: Sending 224 3 0; to /dev/ttyACM0
    comThread: Sending 226 3 0; to /dev/ttyACM0
    comThread: Sending 224 4 0; to /dev/ttyACM0
    comThread: Sending 226 4 0; to /dev/ttyACM0
    Traceback (most recent call last):
    File “./HAL2Arduino-0.6d.py”, line 2020, in
    commandHandler(str(listOfCommands), str(listOfAxis))
    File “./HAL2Arduino-0.6d.py”, line 862, in commandHandler
    if codesAccepted.find(str(command)) > -1 and axisesRequested.find(str(thisAxis)) > -1:
    KeyboardInterrupt
    Unhandled exception in thread started by
    sys.excepthook is missing
    lost sys.stderr
    Unhandled exception in thread started by
    sys.excepthook is missing
    lost sys.stderr

    • dewy721 says:

      custom.hal:28: Pin ‘axis.0.home-sw-in’ does not exist

      It’s right there. You need to make an entry called axis.0.home-sw-in in your .hal file for HAL2Arduino to bind to.

      • Marco Gaspar says:

        I comment all the limit pins.

        halrun custom.hal
        msgd:0 stopped
        rtapi:0 stopped
        Waiting for component ‘Hal2Arduino’ to become ready……………………..Found device on /dev/ttyACM0
        Asking for firmware info.
        Firmware: HAL-2-Arduino
        Unit: ‘0’
        Version: 0.6
        comThread: port=/dev/ttyACM0 arrayPos:0 Queue:0x50fe40
        ………………………..makePins: creating: ‘axis_0_home-sw-in’
        makePins: creating: ‘axis_0_joint-pos-cmd’
        makePins: creating: ‘axis_0_joint-vel-cmd’
        makePins: creating: ‘axis_0_pos-lim-sw-in’
        makePins: creating: ‘axis_0_neg-lim-sw-in’
        makePins: creating: ‘axis_1_home-sw-in’
        makePins: creating: ‘axis_1_joint-pos-cmd’
        makePins: creating: ‘axis_1_joint-vel-cmd’
        makePins: creating: ‘axis_1_pos-lim-sw-in’
        makePins: creating: ‘axis_1_neg-lim-sw-in’
        makePins: creating: ‘axis_2_home-sw-in’
        makePins: creating: ‘axis_2_joint-pos-cmd’
        makePins: creating: ‘axis_2_joint-vel-cmd’
        makePins: creating: ‘axis_2_pos-lim-sw-in’
        makePins: creating: ‘axis_2_neg-lim-sw-in’
        makePins: creating: ‘axis_3_home-sw-in’
        makePins: creating: ‘axis_3_joint-pos-cmd’
        makePins: creating: ‘axis_3_joint-vel-cmd’
        makePins: creating: ‘axis_3_pos-lim-sw-in’
        makePins: creating: ‘axis_3_neg-lim-sw-in’
        makePins: creating: ‘axis_4_home-sw-in’
        makePins: creating: ‘axis_4_joint-pos-cmd’
        makePins: creating: ‘axis_4_joint-vel-cmd’
        makePins: creating: ‘axis_4_pos-lim-sw-in’
        makePins: creating: ‘axis_4_neg-lim-sw-in’
        comService: started.
        commandList=[”]
        linkData=”
        listOfPorts=[‘/dev/ttyACM0’]
        listOfCommands=[‘215 224 226 231 233’]
        listOfAxis=[‘0 1 2 3 4’]
        comThread: Sending 996 0 0; to /dev/ttyACM0listOfUnits=[‘0’]

        linkMsg=”
        ………………..
        comThread: Sending 224 1 0; to /dev/ttyACM0
        comThread: Sending 226 1 0; to /dev/ttyACM0
        comThread: Sending 224 2 0; to /dev/ttyACM0
        comThread: Sending 226 2 0; to /dev/ttyACM0
        comThread: Sending 224 3 0; to /dev/ttyACM0
        comThread: Sending 226 3 0; to /dev/ttyACM0
        comThread: Sending 224 4 0; to /dev/ttyACM0
        comThread: Sending 226 4 0; to /dev/ttyACM0
        Traceback (most recent call last):
        File “./HAL2Arduino-0.6d.py”, line 2020, in
        commandHandler(str(listOfCommands), str(listOfAxis))
        File “./HAL2Arduino-0.6d.py”, line 862, in commandHandler
        if codesAccepted.find(str(command)) > -1 and axisesRequested.find(str(thisAxis)) > -1:
        KeyboardInterrupt
        Unhandled exception in thread started by
        sys.excepthook is missing
        lost sys.stderr
        Unhandled exception in thread started by
        sys.excepthook is missing
        lost sys.stderr

  54. Marco Gaspar says:

    does someone have hal2arduino runing on raspberry pi 2 that can put the sd card image for download???

    I’m giving up soon 😦 😦

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: