Hello Guest it is March 29, 2024, 04:13:34 AM

Author Topic:  (Read 3464 times)

0 Members and 1 Guest are viewing this topic.

(No subject)
« on: October 30, 2015, 01:05:33 AM »
Hello all. I need to create a "tool change" button in mach 4. Here is what I would like it to do. If I am asking for to much please let me know, but just go easy on me.

1 upon pushing the button I would like the z to travel at a feed rate of say 100 ipm, to machine coordinate  -.020
2 once it reaches machine -.020, I need it to activate an output. In my case, it is a punamatic clutch
3 I would like the output to stay active until I press the button again, if this part is not practical  or possible let me know
4 I have a manual toggle switch that i activate (forward/reverse) to pull the tool in and out of the nmbt 40 taper once the z is up

So in basic terms, I need to push a button, have the z move up to the tool change position, apply a clutch so I can manually toggle a switch to pull the tool in or out.
I would l Iike to try machine -.020, so it gets as close to zero with hitting the limit switch. I would possibly play with that number to get it as close as possible without hitting the limit.
Thank you in advance for any help you can offer.


Re:
« Reply #1 on: October 30, 2015, 01:21:17 AM »
If you are up to it, I could use another button. I have a manual mill that has a button that splits the dro reading In half. It saves me from having to grab a calculator.on that mill, I edge find on one side of the part and zero the dro, move to the other side of the part and find that edge. Once I find the second edge, I hit the divide by 2 button and the dro is cut in half. I then simply travel back to zero on the dro and I am centered of the part. It is a  very handy button and I would really like something like it on the mach 4 screen. I am currently  trying to learn lua but is difficult for me to get grasp. Thanks in advance

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re:
« Reply #2 on: October 30, 2015, 01:51:26 AM »
Have a look at the offsets tab (page). There are more changes coming soon too. And Operator, auto calc........ give it a try. / 2 enter

Brett
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!

Offline DazTheGas

*
  •  778 778
  • DazTheGas
    • View Profile
Re:
« Reply #3 on: October 30, 2015, 03:21:54 AM »
For the toolchange you could use a toggle switch, on pressing the toggle switch you can use a gcodeexecutewait to move the z, then set the output signal.

on releasing the toggle it can do the reverse

as for getting the center, take a look at the probing tab too

DazTheGas
New For 2022 - Instagram: dazthegas
Re:
« Reply #4 on: October 31, 2015, 12:44:15 AM »
Thanks for your help, I'll give it a try
Re:
« Reply #5 on: November 05, 2015, 04:19:04 PM »
 ??? Ok, it turns out that writing code does not work well for me. Does anyone have more help with my tool change button. I am offering a virtual high five to anybody who can give me some details on how to do this. I need a button to make the z travel up to machine 0 at a feed rate of 100 ipm, activate port 1 pin 5,  (Active high).  I need port 1 pin 5 to turn off ( active low) when pushing that button again. If two buttons would make it easier I am fine with that. I just bought a vital systems hicon board so i emailed them for help on this and they wanted $$$450$$$ to write that for me. That is a little to steep for me right now so Any help would be greatly appreciated. Thanks.

Offline DazTheGas

*
  •  778 778
  • DazTheGas
    • View Profile
Re:
« Reply #6 on: November 05, 2015, 04:24:47 PM »
What output signal is port1 pin5 ??

Daz
New For 2022 - Instagram: dazthegas

Offline DazTheGas

*
  •  778 778
  • DazTheGas
    • View Profile
Re:
« Reply #7 on: November 05, 2015, 04:35:16 PM »
Toggle Button Down

Code: [Select]
mc.mcCntlGcodeExecuteWait("your gcode to goto Z0 here")
mc.mcSignalSetState (mc.mcSignalGetHandle (inst, mc.OSIG_NAME OF SIGNAL),1)

Toggle Button Up

Code: [Select]
mc.mcSignalSetState (mc.mcSignalGetHandle (inst, mc.OSIG_NAME OF SIGNAL),0)
Daz
New For 2022 - Instagram: dazthegas
Re:
« Reply #8 on: November 05, 2015, 06:09:20 PM »
Port 1 pin 5 is the signal that activates the air clutch that the impact is mounted to. During normal operation it is released and up out of the way. When activated it pulls down so the impact, contacts the threaded rod that pulls in or out the nmtb  40 tool. I hope that makes since because I just confused myself trying to explain that. The machine is a shizuoka AN-S if that helps.
Re:
« Reply #9 on: November 05, 2015, 06:13:35 PM »
Daz, can you explain to me what that code is doing? I am trying to learn how all of this works