Using HAL to switch contactor

More
20 Dec 2013 19:44 #41869 by guymalpass
Hi, I'm trying to get Linuxcnc to switch a contactor when T2 M6 occurs. I am running a 5i25 7i76 combination and would like an output to go high at T2 M6. Should I be looking to build my own HAL component as I can't figure out a way to achieve this with built in components? If building a component is the way forward it appears that I could use C or Python, yet I am struggling to find out why you may pick one over the other.
Many thanks,
Guy

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

More
20 Dec 2013 20:34 #41872 by BigJohnT
I would use ClassicLadder to switch your output with the tool change code. Are you changing tools or just turning on an output?

gnipsel.com/linuxcnc/index.html

JT

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

More
21 Dec 2013 18:30 #41898 by guymalpass
Thanks JT, I've had a look at your classicladder tutorials and think I'm starting to understand it but I can't figure out how to process tool number information? I've found the relevant hal pin, should I do something with counters do you think?

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

More
21 Dec 2013 18:49 #41899 by guymalpass

Are you changing tools or just turning on an output?

I'm using the output to operate a contactor, swapping the VFD from one spindle to another

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

More
21 Dec 2013 21:47 #41905 by guymalpass
No problem, just found out about the compare object and I'm away now !

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

Time to create page: 0.076 seconds
Powered by Kunena Forum