586,103 active members*
3,822 visitors online*
Register for free
Login
Page 2 of 3 123
Results 21 to 40 of 47
  1. #21
    Join Date
    Dec 2008
    Posts
    740

    Re: Hand Pendant code .

    Quote Originally Posted by vmax549 View Post
    I am using mux2 because PP does not have a Mux4 component.
    I've just noticed that mux4 has been in the PP distribution since v2.2.0. Which version are you using?
    Step

  2. #22
    Join Date
    Oct 2005
    Posts
    1145

    Re: Hand Pendant code .

    My test PC is running on 2.0.0 IF I upgrade then PP crashes the video. This is just a testing platform and the only pc out of the 6 here that will run PP . THe rest crash the video on startup.



    (;-) TP

  3. #23
    Join Date
    Oct 2005
    Posts
    1145

    Re: Hand Pendant code .

    Looking at Mux4 it still will not do the rotary switches properly for the pendant. 4 inputs and 4 switches with each switch selection applying a separate value . The sample pendant code I have uses mux4 and assumes that each switch can select a separate value but that is not how mux4 seems to work.

    (;-) TP

  4. #24
    Join Date
    Dec 2008
    Posts
    740

    Re: Hand Pendant code .

    Quote Originally Posted by vmax549 View Post
    My test PC is running on 2.0.0 IF I upgrade then PP crashes the video. This is just a testing platform and the only pc out of the 6 here that will run PP . THe rest crash the video on startup.
    (;-) TP
    You really should be looking at upgrading somehow. There's a BIG, BIG difference between 2.0.0. and 2.7.2.

    Quote Originally Posted by vmax549 View Post
    Looking at Mux4 it still will not do the rotary switches properly for the pendant. 4 inputs and 4 switches with each switch selection applying a separate value . The sample pendant code I have uses mux4 and assumes that each switch can select a separate value but that is not how mux4 seems to work.
    (;-) TP
    If I correctly understand what you want to do, you achieve it with a mux4 and two "or2" gates.

    From your 4 digital inputs 0, 1, 2 and 3, ignore digital input 0 (believe me!). For the first or2 gate take or2.in0 and or2.in1 from digital inputs 1 and 3, connect or2.out to mux4.sel0. For the second or2 gate take or2.in0 and or2.in1 from inputs 2 and 3, connect or2.out to mux4.sel1.

    This will convert your 4 individual inputs into a binary value (disclaimer - analyzed but not tested).
    Give it a try.
    Step

  5. #25
    Join Date
    Oct 2005
    Posts
    1145

    Re: Hand Pendant code .

    I had a friend fix the video problem and did some more testing with Mux4 and found out that you cannot do a hand pendant in PP BECAUSE tormach when they added their pendant code created the link to the axis scale and now you cannot access it from hal as it was already assigned to their jog process . EVEN though this machine does not have the control panel . So unless tormach chages their code to only link to the jog scale IF there is a hooked up then we cannot add our own jog pendant. (;-) V2.0.0 did not have this problem.

    I would like to test your code idea but I have no idea how to write that code. IF you have a moment to code it I have time to test it here..

    (;-) TP

  6. #26
    Join Date
    Dec 2008
    Posts
    740

    Re: Hand Pendant code .

    Quote Originally Posted by vmax549 View Post
    I had a friend fix the video problem and did some more testing with Mux4 and found out that you cannot do a hand pendant in PP BECAUSE tormach when they added their pendant code created the link to the axis scale and now you cannot access it from hal as it was already assigned to their jog process . EVEN though this machine does not have the control panel . So unless tormach chages their code to only link to the jog scale IF there is a hooked up then we cannot add our own jog pendant. (;-) V2.0.0 did not have this problem.

    I would like to test your code idea but I have no idea how to write that code. IF you have a moment to code it I have time to test it here..

    (;-) TP
    Here we go:

    (You will obviously need to change the Mesa pin designations "hm2_[HOSTMOT2](BOARD).0.gpio.02X.in" to be compatible with your interface and pin outs)
    Code:
    # Load the mux4 and two or2's
    loadrt mux4 names=mux-axis-scale
    loadrt or2  names=or-mux-in0,or-mux-in1
    
    # Add the components to the servo-thread
    addf mux-axis-scale servo-thread
    addf or-mux-in0     servo-thread
    addf or-mux-in1     servo-thread
    
    # Connect the scale inputs 0 to 3 to the or2 inputs:
    net scale-select-input0   hm2_[HOSTMOT2](BOARD).0.gpio.026.in   # No need to connect it anywhere. You could leave this line out.
    net scale-select-input1   hm2_[HOSTMOT2](BOARD).0.gpio.027.in   or-mux-in0.in0
    net scale-select-input2   hm2_[HOSTMOT2](BOARD).0.gpio.028.in   or-mux-in1.in0
    net scale-select-input3   hm2_[HOSTMOT2](BOARD).0.gpio.029.in   or-mux-in0.in1 or-mux-in1.in1
    
    # Connect outputs of the or2 components to the mux4:
    net mux-selection0   or-mux-in0.out   mux-axis-scale.sel0
    net mux-selection1   or-mux-in1.out   mux-axis-scale.sel1
    
    # Set the scale values for the axis multiplexer:
    setp   mux-axis-scale.in0   0.000025
    setp   mux-axis-scale.in1   0.000250
    setp   mux-axis-scale.in2   0.002500
    setp   mux-axis-scale.in3   0.025000
    
    # Connect the mux output to the axis jog scales:
    net axis-jog-scales   mux-axis-scale.out   axis.0.jog-scale axis.1.jog-scale axis.2.jog-scale axis.3.jog-scale

    I presume you don't expect to integrate a Tormach Console so just comment out the axis.X.jog-scale inputs in the offending hal file:
    Code:
    net console-jogscale turbo-console.0.step-select-value #axis.0.jog-scale axis.1.jog-scale axis.2.jog-scale axis.3.jog-scale
    I tested it on my test machine. PP runs and the axis.X.jog-scale values change according to the selected inputs. I can't however verify whether the jogging actually works.

    Give it a go if you have time.
    Step

  7. #27
    Join Date
    Dec 2008
    Posts
    740

    Re: Hand Pendant code .

    Quote Originally Posted by vmax549 View Post
    net scale1 mux2.0.sel0 <= hm2_7i80.0.gpio.049.in
    net scale2 mux2.0.sel1 <= hm2_7i80.0.gpio.050.in
    Just a thought, my code assumes the gpio inputs are normally low, going high when selected. Is this the way you have them or are they normally high, being pulled down by the switch when selected?
    Step

  8. #28
    Join Date
    Oct 2005
    Posts
    1145

    Re: Hand Pendant code .

    I have no idea if the inputs are active high or low. I will have to check .

    Testing the code as is when I select any switch position the value is always the same it is the last value .025 BUT if I change all the inputs to NOT then selections do work BUT the switch states are backwards true turns it off and false turns it on

    (;-) TP

  9. #29
    Join Date
    Dec 2008
    Posts
    740

    Re: Hand Pendant code .

    Quote Originally Posted by vmax549 View Post
    I have no idea if the inputs are active high or low. I will have to check .

    Testing the code as is when I select any switch position the value is always the same it is the last value .025 BUT if I change all the inputs to NOT then selections do work BUT the switch states are backwards true turns it off and false turns it on

    (;-) TP
    I'm sorry but I don't quite follow your explanation...
    If the original code doesn't work as expected try changing the or2 components to xor2. The main hal file already has an xor2 so you'll have to add them to the list there:

    Code:
    loadrt xor2 names=probe-active-hi-lo,or-mux-in0,or-mux-in1
    Then delete, or better comment out the line:
    Code:
    loadrt or2  names=or-mux-in0,or-mux-in1
    This should reverse the sense of the inputs.
    Step

  10. #30
    Join Date
    Oct 2005
    Posts
    1145

    Re: Hand Pendant code .

    OK that worked by using the Xor2. Thank you so very much for the help. The pendant jogs extremely smooth just like it should and each step precise. Now I have to work on the FRO and SSO. I still have not figured out how to push the values to the sliders and labels. But at least it is useable now.

    Thanks Again for all the help (;-) (;-) TP

  11. #31
    Join Date
    Dec 2008
    Posts
    740

    Re: Hand Pendant code .

    Quote Originally Posted by vmax549 View Post
    The pendant jogs extremely smooth just like it should and each step precise.
    Super, glad to hear you‘re making progress.
    Step

  12. #32
    Join Date
    Oct 2005
    Posts
    1145

    Re: Hand Pendant code .

    Hi Guys I finally received the hand jog pendant and have it all hooked up and running now. It is smooth , precise and responsive. The pendant is a MPG-2 model from CNC4PC.and I used the C22 pendant interface card to plug it into the Mesa 7i80 . Pretty much plug and play for the most part. Peter at Mesa provided a new BIT file to match the pinout of the C22. It comes with a magnetic back and a steel hanger bracket. It also has a nice coiled retractable cable.

    I will update after some more testing.

    (;-) TP

  13. #33
    Join Date
    Nov 2007
    Posts
    2151

    Re: Hand Pendant code .

    Sweet!

  14. #34
    Join Date
    Apr 2013
    Posts
    1788

    Re: Hand Pendant code .

    Has anyone explored the interface to the rather expensive Tormach Console? From a very quick look it appears to connect to PP as a USB HID device.

  15. #35
    Join Date
    Dec 2008
    Posts
    740

    Re: Hand Pendant code .

    Quote Originally Posted by kstrauss View Post
    Has anyone explored the interface to the rather expensive Tormach Console? From a very quick look it appears to connect to PP as a USB HID device.
    I thought there was another post I've had quite a good look at it but I don't like HID devices (in general). It certainly would be possible to create a compatible device and have access to all the features of the console and pendant with the exception of Stop and Reset (if I remember correctly). I actually bought a Teensy specifically to have a go when I've nothing else to do (I just can't resist a challenge).
    My USB Pendant is based loosely on the Console but doesn't connect as a HID, and as you may have noticed uses a shuttle encoder because I find them FAR easier to use than the large pendant encoder wheels.
    Give it a try!
    Step

  16. #36
    Join Date
    Oct 2005
    Posts
    1145

    Re: Hand Pendant code .

    When I talked to Tormach about their pendant they said it used a special board and was not available except with a console. That is why I worked to adapt a jog pendant to my machines. Having the pendant do XYZA jogging and FRO and SSO means I do not need it built into the console. It serves a duel propose remote jog pendant and when stuck to my console it is a mpg and FRO and SSO. AND it did not cost $2000.

    Just a thought. (;-) TP

  17. #37
    Join Date
    Apr 2012
    Posts
    161

    Re: Hand Pendant code .

    Quote Originally Posted by vmax549 View Post
    Hi Guys I finally received the hand jog pendant and have it all hooked up and running now. It is smooth , precise and responsive. The pendant is a MPG-2 model from CNC4PC.and I used the C22 pendant interface card to plug it into the Mesa 7i80 . Pretty much plug and play for the most part. Peter at Mesa provided a new BIT file to match the pinout of the C22. It comes with a magnetic back and a steel hanger bracket. It also has a nice coiled retractable cable.

    I will update after some more testing.

    (;-) TP
    Have you done your testing? If it works I'd really appreciate instructions on implementing this.
    "You can't teach stuff in a school that you would learn in real life unless the real life people are in charge of the school." - Gene Sherman

  18. #38
    Join Date
    Oct 2005
    Posts
    1145

    Re: Hand Pendant code .

    I will have an update soon.

    (;-) TP

  19. #39
    Join Date
    May 2019
    Posts
    5

    Re: Hand Pendant code .

    Tried to make a self-made control panel. It turned out 16 buttons, three turn switches, mpg wheel, hat-switch for quick movement for lathe.On buttons you can visit any buttons in Pathpilot. MPG moves four axes and serves to adjust the speed of movement, changes spindle, processing speed and TD.The program is written for Stm32 Board. Driven through the hidcomp component.

    https://youtu.be/ELm5xddZaEE

  20. #40
    Join Date
    Nov 2012
    Posts
    591

    Re: Hand Pendant code .

    That looks pretty feature packed :-)

Page 2 of 3 123

Similar Threads

  1. Acramatic A2100 Hand Pendant
    By igoratoyan in forum Cincinnati CNC
    Replies: 9
    Last Post: 03-12-2015, 02:18 PM
  2. Acramatic A2100 Hand Pendant
    By igoratoyan in forum Machinery Manuals / Brochures
    Replies: 0
    Last Post: 02-09-2015, 12:30 PM
  3. Any Arduino Hand Held Pendant Code?
    By herring_fish in forum CNC Machine Related Electronics
    Replies: 6
    Last Post: 04-19-2011, 07:04 PM
  4. New Hand Control Pendant for MACH
    By Torchhead in forum News Announcements
    Replies: 9
    Last Post: 09-29-2010, 02:52 AM
  5. Want to Make a Hand Pendant from a Gamepad
    By glentner in forum Benchtop Machines
    Replies: 17
    Last Post: 03-16-2010, 08:47 PM

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
  •