PathPilot on NM200 - Page 2

Page 2 of 6 FirstFirst 12345 ... LastLast
Results 21 to 40 of 112

Thread: PathPilot on NM200

  1. #21
    Member
    Join Date
    Aug 2007
    Location
    usa
    Posts
    701
    Downloads
    0
    Uploads
    0

    Default Re: PathPilot on NM200

    Scott - yes I spoke w/ Kirk (kvom) yesterday and got him going. He's a former software guy so I think he will be able to muscle through it like you did. I hope things are running well on your Pro.



  2. #22
    Member
    Join Date
    Dec 2009
    Location
    USA
    Posts
    594
    Downloads
    0
    Uploads
    0

    Default Re: PathPilot on NM200

    Brian was a big help in getting me to where I will be able to see where errors are.

    After studying the organization of the HAL files, I decided to start one for the NM200 fresh from the Tormach rather than using Scott's. The important concept that twigged it for me is that the bit file defines multiple "stepgens", one of which is is needed for each axis and the spindle. The pin numbers, which I searched for in vain, are reassigned to stepgens. In addition, the pin numbers have internal "gpio" numbers that are internal to the bit file; some lines in the HAL reference these numbers.

    The step and dir pins for the Tormach axes match those for the NM200, but the E-stop and limit switches are a bit different and had to be re-arranged.

    I will be trying out the modified HAL later today and will post results here.



  3. #23
    Member
    Join Date
    Dec 2009
    Location
    USA
    Posts
    594
    Downloads
    0
    Uploads
    0

    Default Re: PathPilot on NM200

    Made some decent progress this afternoon, decent meaning that the PathPilot program shows on the screen at the end of startup. I got to this point by commenting out the offending HAL line(s) whenever there was an error detected. However, at this point clicking the Reset screen button reports that machine is still in e-stop.

    I had commented out the following HAL lines in the E-stop section.

    net machine-ok-raw <= hm2_5i25.0.gpio.013.in_not => debounce.0.13.in
    setp debounce.0.13.in 1

    net machine-ok debounce.0.13.out => estop-latch.0.ok-in

    net estop estop-latch.0.ok-out => iocontrol.0.emc-enable-in => hm2_5i25.0.pwmgen.00.enable


    On my machine, the e-stop is pin#10 which corresponds to IO port 13 on the card.

    I suspect that if the E-stop can be cleared I could actually get the axes to move.

    But I may also need the charge pump section to work as well. In Mach3, the charge pump is configured as pin 17. For the bit file, pin 17 is defined as a stepgen on io port 7. However, in the Tormach HAL the charge pump is defined as a PWM. Therefore, following lines gave errors:

    setp hm2_5i25.0.pwmgen.00.output-type 1
    setp hm2_5i25.0.pwmgen.pwm_frequency 500
    setp hm2_5i25.0.pwmgen.00.scale 100
    setp hm2_5i25.0.pwmgen.00.value 5


    My current HAL is attached (as a txt file)

    *** Edit ***

    After thinking about this for a while, I went to take a look at Scott's HAL file. I will copy his Charge Pump lines that use StepGen instead of PWM. Difference is stepgen 5 instead of 4.

    I'll also copy his E-stop content.

    Attached Files Attached Files
    Last edited by kvom; 09-03-2017 at 07:04 PM.


  4. #24
    Member
    Join Date
    Aug 2007
    Location
    usa
    Posts
    701
    Downloads
    0
    Uploads
    0

    Default Re: PathPilot on NM200

    Kirk - the e-stop is separate from the charge pump in PP. So you can be out of e-stop and still not have the charge pump working such that your BOB is active.

    For the charge pump - you can drive it w/ the stepgen. That is what I had to do for my pulsar. In fact, it's pin 17 as well. But mine is stepgen 6.


    ################################################## ######################
    # Charge pump
    # pin set by 5i25 configuration
    # P3 pin 17 gpio 007
    # dc = (value/scale)
    # ---Chargepump StepGen: 0.25 velocity = 10Khz square wave output---
    # This is native linuxcnc
    setp hm2_5i25.0.stepgen.06.dirsetup 100
    setp hm2_5i25.0.stepgen.06.dirhold 100
    setp hm2_5i25.0.stepgen.06.steplen 100
    setp hm2_5i25.0.stepgen.06.stepspace 100
    setp hm2_5i25.0.stepgen.06.position-scale 10000
    setp hm2_5i25.0.stepgen.06.step_type 2
    setp hm2_5i25.0.stepgen.06.control-type 1
    setp hm2_5i25.0.stepgen.06.maxaccel 0
    setp hm2_5i25.0.stepgen.06.maxvel 0
    setp hm2_5i25.0.stepgen.06.velocity-cmd 1
    ******************

    For the e-stop. Play w/ this code:

    # ---estop signals---

    net estop-ext <= hm2_5i25.0.gpio.013.in_not => debounce.0.3.in
    net estop-out <= iocontrol.0.user-enable-out
    net estop-ext => iocontrol.0.emc-enable-in
    net estop-reset iocontrol.0.user-request-enable => estop-latch.0.reset
    net estop-out <= iocontrol.0.user-enable-out
    net machine-ok debounce.0.3.out => estop-latch.0.ok-in



  5. #25
    Member
    Join Date
    Dec 2009
    Location
    USA
    Posts
    594
    Downloads
    0
    Uploads
    0

    Default Re: PathPilot on NM200

    I tried suggested updates, but the charge pump idea failed. In retrospect it's easy to see why since there is no #5 stepgen configured by the bit file for pin 17. So clearly I'll need to use the PWM if I'm going to use this bit file.

    *** EDIT
    I restored the 4 PWM enable lines from the Tormach HAL, and now get no errors from them!

    The e-stop lines caused no errors, but clicking Reset button shows PP still thinks machine is powered off.

    *** EDIT

    The E-stop signal seems to be working. If I hit the E-Stop on the machine and then Reset on PP, it says machine is in E-Stop. With E-Stop off, I get a series of messages saying command cannot be executed with machine off. What those commands are I have no idea.

    The 3 limit lights are both on. ??

    If I power off the CD100, the lights go off, showing at least connectivity between the two boxes.

    Last edited by kvom; 09-04-2017 at 11:26 AM.


  6. #26
    Member
    Join Date
    Feb 2008
    Location
    USA
    Posts
    644
    Downloads
    0
    Uploads
    0

    Default Re: PathPilot on NM200

    I thought you were using the C11x2 config

    The C11x2 config has a stepgen (stepgen 5) on DB25 pin 17 for use as a chargepump signal generator

    It also has a stepgen (stepgen 4) for the C11s analog spindle control



  7. #27
    Member
    Join Date
    Dec 2009
    Location
    USA
    Posts
    594
    Downloads
    0
    Uploads
    0

    Default Re: PathPilot on NM200

    According to the pin file that's correct, so I don't understand what's going on (unless somehow I renamed bit files by mistake). I'm going to re-copy the bit file to the machine and retry.

    *** Edit

    Looked at the HAL file and it seems as if I not uncommented the Stepgen commands for the charge pump :-( Did so and reran getting error. Here are lines from the log file:

    - first, showing mesaflash

    [HOSTMOT2] BITFILE0 = 'mesa/5i25_c11x2.bit'
    [HOSTMOT2] BITFILE0 = /home/operator/tmc/mesa/5i25_c11x2.bit
    lspci -n -d 2718:5125: 02:00.0 1100: 2718:5125 (rev 01)
    /home/operator/tmc/bin/mesaflash: root4755

    - second, showing error line

    nm200.hal:253: parameter or pin 'hm2_5i25.0.stepgen.05.dirsetup' not found

    Last edited by kvom; 09-04-2017 at 01:02 PM.


  8. #28
    Member
    Join Date
    Feb 2008
    Location
    USA
    Posts
    644
    Downloads
    0
    Uploads
    0

    Default Re: PathPilot on NM200

    You can check your loaded bitfiles pinout with

    sudo mesaflash --device 5i25 --readhmid

    if you just flashed it and have not rebooted you may need to do

    sudo mesaflash --device 5i25 --reload

    to reload the FPGA from the on-card flash memory



  9. #29
    Member
    Join Date
    Aug 2007
    Location
    usa
    Posts
    701
    Downloads
    0
    Uploads
    0

    Default Re: PathPilot on NM200

    Kirk - it won't come out of estop if it thinks limit switch is active. Since the lights are on it does think a limit sw is tripped. On mine I tied all limit switches together on one pin. That way I had other pins for the probe and stuff



  10. #30
    Member
    Join Date
    Feb 2008
    Location
    USA
    Posts
    644
    Downloads
    0
    Uploads
    0

    Default Re: PathPilot on NM200

    if your limit switches are stuck on it probably means you need to change the GPIO input polarity,
    that is, change the blah.blah.blah.in for blah.blah.blah.in_not or vice versa



  11. #31
    Member
    Join Date
    Dec 2009
    Location
    USA
    Posts
    594
    Downloads
    0
    Uploads
    0

    Default Re: PathPilot on NM200

    Quote Originally Posted by PCW_MESA View Post
    You can check your loaded bitfiles pinout with

    sudo mesaflash --device 5i25 --readhmid

    if you just flashed it and have not rebooted you may need to do

    sudo mesaflash --device 5i25 --reload

    to reload the FPGA from the on-card flash memory
    Did both of these. The reported pins matched the C11x2 pin file. But still the same error after a reboot. Very strange since the parameter names are the same on the other stepgens.

    As for the limit switches, I need to clean up the HAL, since I started this one using Tormach's as a starting place. There's a bunch of stuff linking limit switches to door interlocks that are clearly not needed here. In reality I never reference mine, so they are needed only if a rogue move causes them to be activated.

    *** Edit ***

    Found the charge pump issue. The "num_stepgens" param on the hm2_pci config was set to 5 instead of the 6 needed. Changed to 6 and error disappeared.

    I powered off the CD100 and the limit switch light we off. I could then click Reset successfully. I'll do some work on the limit switches and then try to get some mill movement later tonight,

    Last edited by kvom; 09-04-2017 at 03:06 PM.


  12. #32
    Member
    Join Date
    Dec 2009
    Location
    USA
    Posts
    594
    Downloads
    0
    Uploads
    0

    Default Re: PathPilot on NM200

    Final update today:

    I removed everything from the HAL that referenced the door limits, and copied the limit switch stuff from Scott's HAL. HAL now parses and I get the PP screen.

    Status still shows limit switch lights, but Reset works. Now when I jog the axes none of them move but the DROs change values. Spindle doesn't start. Ref keys cause DROs to change continuously until UI click the Stop button. Zero button now zeroes the DRO.

    I will try the polarity inversion on the switches next time in the shop. Time to remove the cover on the CD100 to see if the BoB LEDs are seeing any signalling.

    Thanks for the help.



  13. #33
    Member
    Join Date
    Aug 2007
    Location
    usa
    Posts
    701
    Downloads
    0
    Uploads
    0

    Default Re: PathPilot on NM200

    Kirk - sounds like charge pump isn't activating - can u bypass the charge pump on the bob for testing?



  14. #34
    Member
    Join Date
    Dec 2009
    Location
    USA
    Posts
    594
    Downloads
    0
    Uploads
    0

    Default Re: PathPilot on NM200

    I removed the cover on the CD100 and set the PP box on top; now the BOB LEDs can be seen.

    Here's a view of this setup.



    With PP running and the Reset button clicked, the only LEDs lit are 4 along the top and one on the center right, Pin 17s LED is off.

    I then reattached the DB25 cable to the parallel port on the CD100, and started Mach3. After clicking Reset on Mach3, I get two more LEDs on.



    The green in the center is marked 'Output Status' on the PC board, and the red on the lower right is Pin17. These two lights toggle on and off as the Mach3 reset button is clicked.

    The BoB has a jumper to override the charge pump (force it on), but it seems better to figure why the HAL config is not working. Is there a missing line that connects the stepgen to the PP reset button? My next step is to try to fix the limit switch on signal as suggested earlier.



  15. #35
    Member
    Join Date
    Dec 2009
    Location
    USA
    Posts
    594
    Downloads
    0
    Uploads
    0

    Default Re: PathPilot on NM200

    Changing the 'in' to 'in_not' as advised now has the limit switch light in PP 'off' when PP starts.

    I changed the jumper on the BOB to disable the charge pump, and as a result I can jog the axes and start the spindle. The axes move in the correct directions per the jog buttons.

    Jogging X continuous with the Tormach defaults gives 144ipm in PP. No idea how to actually measure this or how to set the parameters in the INI file.

    The spindle turns only in the FWD direction, but this is the same as with Mach3. As I have never needed reverse that's not worrying at least to me.

    BUT spindle ignores the speed requested in the Speed DRO and just accelerates up to 4000 rpm, which is my max. If I move the max RPM slider to less than 100% then I get a lesser speed.

    With the spindle stopped, when I enter M3Sxxx in the MDI dialog box, the LED in the FWD button goes green but the spindle doesn't turn.

    Last edited by kvom; 09-05-2017 at 02:23 PM.


  16. #36
    Member
    Join Date
    Aug 2007
    Location
    usa
    Posts
    701
    Downloads
    0
    Uploads
    0

    Default Re: PathPilot on NM200

    Kirk - sounds like some progress! As far as the jog speed, the ini file has those parameters (maxvel) and they are in inches/second. So multiply those # by 60 to figure out IPM.

    As far as spindle speed post your current hal file so we can see, and if you can put the pin out into the hal, it makes it easier to follow.



  17. #37
    Member
    Join Date
    Dec 2009
    Location
    USA
    Posts
    594
    Downloads
    0
    Uploads
    0

    Default Re: PathPilot on NM200

    I decided to test the axis movement by mounting a metal rule in the vise with a sharp spotting drill as a "pointer". Issuing a G0X1 in MDI moved the axis ~ 3/8". Doing the same in Y noved ~.6".

    Seems that the steps/inch need to be increased over what's specified in the INI or HAL files. I have attached these in a zip,

    Attached Files Attached Files


  18. #38
    Member
    Join Date
    Aug 2007
    Location
    usa
    Posts
    701
    Downloads
    0
    Uploads
    0

    Default Re: PathPilot on NM200

    Kirk - I didn't have time to pour thru the hal file yet - but briefly adjust this: SCALE = 10000.0
    in the ini file to adjust for proper axis movement.



  19. #39
    Member
    Join Date
    Dec 2009
    Location
    USA
    Posts
    594
    Downloads
    0
    Uploads
    0

    Default Re: PathPilot on NM200

    Quote Originally Posted by brianbonedoc View Post
    SCALE = 10000.0 in the ini file to adjust for proper axis movement.
    It turns out that the SCALE is pretty close to accurate, it was the velocity/acceleration that was the problem. When I used the sliders to restrict the rapid rate the movement was very close to correct. I increased it up to 50% of max without any visible difference. So tomorrow I'll try playing with the VEL and ACCEL setting in the INI.

    The Z axis in the INI were just a little off. Using some gauge blocks for measurement, a 1" vertical move was short by 16 thou, so the adjustment in Z will be much less.

    One thing that's seems strange is referencing the Z axis. Since I don't have a limit switch there (or one that works anyway), I check the box in settings to ignore the limit switches. A Z ref then locks the current position of the axis to its maximum height at the present position. I.e., I can't jog or move it past this limit. So to get higher clearance, I have to unclick the setting box and then ref Z. It moves up until I hit the stop button, at which point it's referenced. I may want to jog the head up before shutting down each time.

    I also ought to lug my 4th axis onto the table and try to calibrate it too.



  20. #40
    Member
    Join Date
    Mar 2009
    Location
    USA
    Posts
    388
    Downloads
    0
    Uploads
    0

    Default Re: PathPilot on NM200

    Quote Originally Posted by kvom View Post
    Changing the 'in' to 'in_not' as advised now has the limit switch light in PP 'off' when PP starts.

    I changed the jumper on the BOB to disable the charge pump, and as a result I can jog the axes and start the spindle. The axes move in the correct directions per the jog buttons.

    Jogging X continuous with the Tormach defaults gives 144ipm in PP. No idea how to actually measure this or how to set the parameters in the INI file.

    The spindle turns only in the FWD direction, but this is the same as with Mach3. As I have never needed reverse that's not worrying at least to me.

    BUT spindle ignores the speed requested in the Speed DRO and just accelerates up to 4000 rpm, which is my max. If I move the max RPM slider to less than 100% then I get a lesser speed.

    With the spindle stopped, when I enter M3Sxxx in the MDI dialog box, the LED in the FWD button goes green but the spindle doesn't turn.
    Are you using PWMGEN for your spindle pins? If not that is likely the problem. This is exactly the problem I fought with for a few days.

    Instructional Videos for CNC Guitar Building
    http://www.rmgvideos.com


Page 2 of 6 FirstFirst 12345 ... LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

PathPilot on NM200

PathPilot on NM200