Planning - Bridgeport Interact 1 linuxCNC Retrofit

More
18 Mar 2016 02:17 - 18 Mar 2016 02:18 #71839 by cncnoob1979
Can someone please lend me a hand on this code, or point me in a direction to read up on this situation?

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;
if y or z selected the x not enabled.  If y or z not selected x is enabled.

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 :P

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:


File Attachment:

File Name: bridgeport-2-3-4.hal
File Size:20 KB


File Attachment:

File Name: bridgeport-2-3-4.ini
File Size:4 KB
Attachments:
Last edit: 18 Mar 2016 02:18 by cncnoob1979.

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

More
18 Mar 2016 02:31 #71841 by andypugh

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.

Does the switch indicate three distinct states? If it doesn't then it can't be done.
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

what program do you use for engraving?

I have done almost no engraving. When I engraved a scale-ring I wrote some G-code by hand:
forum.linuxcnc.org/forum/20-g-code/27169...s-on-cylinders#40497

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

More
18 Mar 2016 03:00 - 18 Mar 2016 03:04 #71842 by cncnoob1979
Andy,

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
net jog-ena-x 		<=  hm2_5i25.0.7i77.0.0.input-24-NOT AND2.22 hm2_5i25.0.7i77.0.0.input-25-NOT
(addf with a base-thread)

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 :)
Last edit: 18 Mar 2016 03:04 by cncnoob1979.

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

More
18 Mar 2016 03:10 #71843 by PCW
watch out for upper/lower case

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
The following user(s) said Thank You: cncnoob1979

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

More
18 Mar 2016 03:50 - 18 Mar 2016 03:51 #71844 by cncnoob1979
PCW,

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.
Last edit: 18 Mar 2016 03:51 by cncnoob1979.

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

More
18 Mar 2016 03:57 #71845 by PCW
I mentioned it because you are using "-NOT" on the end of the pin name and its "-not"
halcmd is a very nice tool for trying new things with a running linuxcnc instance
(avoids the edit test loop)

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

More
18 Mar 2016 10:28 - 18 Mar 2016 10:30 #71852 by andypugh

I have tried this
net jog-ena-x 		<=  hm2_5i25.0.7i77.0.0.input-24-NOT AND2.22 hm2_5i25.0.7i77.0.0.input-25-NOT
(addf with a base-thread)


There are no "functions" in HAL. Everything needs to be connected like electrical components.
loadrt and2 count=1
...
addf and2.0.servo-thread
...
net switch1     hm2_5i25.0.7i77.0.0.input-25     => axis.2.jog-enable
net switch1-not hm2_5i25.0.7i77.0.0.input-25-not => and2.0.in0
net switch2     hm2_5i25.0.7i77.0.0.input-26     => axis.1.jog-enable
net switch2-not hm2_5i25.0.7i77.0.0.input-26-not => and2.0.in1
net x-jog-ena   and2.0.out                       => axis.0.jog-enable

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.
Last edit: 18 Mar 2016 10:30 by andypugh.
The following user(s) said Thank You: cncnoob1979

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

More
18 Mar 2016 14:42 - 18 Mar 2016 14:42 #71858 by cncnoob1979
Andy,

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.
loadrt and2 count=23
#I used csbrady's code and he had up to 21 listed
addf and2.22			  servo-thread
net jog-ena-y     hm2_5i25.0.7i77.0.0.input-24     => axis.2.jog-enable
net jog-ena-y-not hm2_5i25.0.7i77.0.0.input-24-not => and2.22.in0
net jog-ena-z     hm2_5i25.0.7i77.0.0.input-25     => axis.1.jog-enable
net jog-ena-z-not hm2_5i25.0.7i77.0.0.input-25-not => and2.22.in1
net jog-ena-x     and2.22.out                      => axis.0.jog-enable

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 ;) ] I have tried halcmd before, but I'm not versed enough to use it effectively, but I'm getting there!

Thanks to you guys putting up with my questions! Thanks so much for the continued support everyone is offering me on this forum.
Last edit: 18 Mar 2016 14:42 by cncnoob1979.

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

More
18 Mar 2016 14:51 #71863 by andypugh

#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 or Create an account to join the conversation.

More
18 Mar 2016 15:21 #71868 by csbrady
cncnoob,

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.

File Attachment:

File Name: bertha-2.hal
File Size:22 KB


Sorry for the fire drill. A phone conversation at some point would probably be a good idea. Gotta go for now.
Attachments:

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

Moderators: cncbasher
Time to create page: 0.128 seconds
Powered by Kunena Forum