- Posts: 403
- Thank you received: 0
Planning - Bridgeport Interact 1 linuxCNC Retrofit
- cncnoob1979
- Topic Author
- Offline
- Platinum Member
-
I'm trying to use a 3 position switch to select each axis; X Y Z to enable jogging to that axis. The catch is... it a single throw 2 NO switch. I cant seem to find an instance of this anywhere. I can only send two signals, one to y and one to z, ideally I would need to send 3 signals.
Guessing.... I would think I would need something of an if statement;
I don't know how to go about doing this. If need be, I will just use a different switch. I rather not do this if I can implement this current one.
csbrady,
Thanks for the help so far! I'm really starting to think the 15 inch touch screen is the way to go. The setup options with a touch screen is really attractive at the moment. I'm going to look for some tonight and I might just purchase. Btw, how do you PM on the forums?
I'm very glad I decided to do a bunch of test panels. I will NOT be using a increment selector, the MPG is suitable enough I would not need it. Also I will not be using the X,Y or Z buttons on my panel. Too cumbersome for me and looks unclean. I'm back to your design, I'm pretty sure you had it figured out correctly when you cut yours. I do like yous, but I have to be different
Andy,
I ordered my engraving end mills and new DA 180's, they should be in by around Monday or so. Thanks so much for pointing me that direction. It should look very sharp after I engrave the panels. I haven't tried Master-Cam X9 for engraving... its pretty complex, what program do you use for engraving?
If anyone has any other ideas spit them out. It won't (probably) hurt my feelings! :woohoo:
Attachment not found
Attachment not found
Please Log in to join the conversation.
Does the switch indicate three distinct states? If it doesn't then it can't be done.cncnoob1979 wrote: CI'm trying to use a 3 position switch to select each axis; X Y Z to enable jogging to that axis. The catch is... it a single throw 2 NO switch. I cant seem to find an instance of this anywhere. I can only send two signals, one to y and one to z, ideally I would need to send 3 signals.
If it does, for example no-wires, wire1, wire2 then it can be done in HAL.
I don't quite folow your "if" statement but you can possibly connnect:
Z-select input-01
Y-select input-02
X-select (input-01-not AND input-02-not)
www.linuxcnc.org/docs/html/man/man9/and2.9.html
I have done almost no engraving. When I engraved a scale-ring I wrote some G-code by hand:what program do you use for engraving?
forum.linuxcnc.org/forum/20-g-code/27169...s-on-cylinders#40497
Please Log in to join the conversation.
- cncnoob1979
- Topic Author
- Offline
- Platinum Member
-
- Posts: 403
- Thank you received: 0
Thanks for the quick response. My switch has 2 two positions so I can use your solution. How do I go about using the and statement?
I have tired this
Do I also need to add the .in and .out? I was trying to troubleshoot and then Hal complains that my "hm2_5i25.0.7i77.0.0.input-24-NOT" does not exist even when tried by itself, just using the inversion causes my hal to fail.
I can see hm2_5i25.0.7i77.0.0.input-24-NOT under hal configuration. Maybe I'm typing it wrong.
Thats pretty cool that you wrote that routine by hand. I cant even add correctly with a calculator
Please Log in to join the conversation.
I hardly ever type long names as I never get them right the first time
its _much_ easier to just copy/paste them from a donor list created with halcmd show xxxx
Please Log in to join the conversation.
- cncnoob1979
- Topic Author
- Offline
- Platinum Member
-
- Posts: 403
- Thank you received: 0
Yes I went back and checked the capitalization and checked my names.
I must not be using the proper syntax. I still haven't gotten it to work.
I'll try tomorrow after work. At lest I know it's doable.
Thanks for the help and suggestions.
Please Log in to join the conversation.
halcmd is a very nice tool for trying new things with a running linuxcnc instance
(avoids the edit test loop)
Please Log in to join the conversation.
cncnoob1979 wrote: I have tried this
(addf with a base-thread)Code:net jog-ena-x <= hm2_5i25.0.7i77.0.0.input-24-NOT AND2.22 hm2_5i25.0.7i77.0.0.input-25-NOT
There are no "functions" in HAL. Everything needs to be connected like electrical components.
Note that the signal names (the first item after the "net" command) can be anything you choose, they have no special meanings to the system.
Please Log in to join the conversation.
- cncnoob1979
- Topic Author
- Offline
- Platinum Member
-
- Posts: 403
- Thank you received: 0
Thank you so very much, I promise I'm trying to get my head wrapped around HAL, you just helped me understand this very well.
I'm currently at work and I have tied to implement your code, I do believe this will work.
PCW,
Sorry I wasn't clear. After you pointed out the upper and lowercase error I made. I went back and checked and the -NOT was why I could not connect to the signal. [which you knew
Thanks to you guys putting up with my questions! Thanks so much for the continued support everyone is offering me on this forum.
Please Log in to join the conversation.
cncnoob1979 wrote: #I used csbrady's code and he had up to 21 listed
That's a lot of "and" functions.
I rather suspect that a lot of the logic could have been simplified by cunning use of LUT5
Please Log in to join the conversation.
You are using a quite old version of my hal that used a bunch of and2 functions to create 2 jog rates using the button on the joystick. It didn't work because I didn't fully understand how the button is wired. It also just was not a great idea.
Here is my current hal. The jog stuff is vastly simpler.
Attachment not found
Sorry for the fire drill. A phone conversation at some point would probably be a good idea. Gotta go for now.
Please Log in to join the conversation.
