punching machine

More
27 Dec 2010 13:50 #6264 by anpe
punching machine was created by anpe
Hello.
Could anybody help me with punching machine?
I have configured axes X and Y for this machine but I don't know how realize control for punch.
I use kingsland punching machine, it has two switches (for up and down position) and pedal.
When pedal is pressed - punch is going down, down switch cancels its moving, if pedal unpress punch return in up position (in manual mode). I'm going to do it by using M101 user command. Is it possible? Maybe anybody knows any examples?
Sorry for my poor english.
Thanks.
Anatoly

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

More
28 Dec 2010 11:16 #6283 by Rick G
Replied by Rick G on topic Re:punching machine
Anatoly,

You might try researching classic ladder or Hal for this application. Your English is fine.

Rick G

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

More
28 Dec 2010 13:10 #6285 by anpe
Replied by anpe on topic Re:punching machine
I'd like to use m101 command with strings like "halcmd setp parport.0.pin-07-out True" but I don't know how to get pin value

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

More
28 Dec 2010 16:41 #6289 by BigJohnT

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

More
29 Dec 2010 10:10 #6303 by anpe
Replied by anpe on topic Re:punching machine
Hi
When I use m101 command it stops program running (last string in m101 file is "exit 0"). I dont know what is the reason.

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

More
29 Dec 2010 12:08 #6305 by Rick G
Replied by Rick G on topic Re:punching machine
Do you have the m101 command in the proper directory?
Can you post the command?

Rick G

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

More
29 Dec 2010 13:47 #6307 by anpe
Replied by anpe on topic Re:punching machine
Hi Rick.
m101 file is OK. I found if string "exit 0" exists then m101 comand stops program running. Is it string neccesary?

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

More
29 Dec 2010 21:40 #6321 by andypugh
Replied by andypugh on topic Re:punching machine
anpe wrote:

I'm going to do it by using M101 user command. Is it possible?

It is possible, but using M62 / M63 might be easier. They toggle the value of the motion.digital-out pins.

If you want to use M101, then a bash script with

#!bash
halcmd setp parport.0.pin-10-out 1

Might be enough.

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

More
30 Dec 2010 08:31 #6327 by anpe
Replied by anpe on topic Re:punching machine
Thank you andypugh

My question is about getting pin condition in script.

The string "halcmd setp parport.0.pin-10-out 1" sets pin10 to True. How can I know current pin value?

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

More
30 Dec 2010 10:23 #6329 by andypugh
Replied by andypugh on topic Re:punching machine
anpe wrote:

he string "halcmd setp parport.0.pin-10-out 1" sets pin10 to True. How can I know current pin value?


I depends on "where" you want to know.
Do you want to know (use Halmeter and Halscope, and possibly Pyvcp)
Do you want the bash script to know? (In which case I am not sure)
Do you want the G-code program to know (then see the M66 command)
Do you want the value in HAL? In which case there are a number of ways to do it.

I would suggest starting by reading this page, it explains a bit of how signals flow in EMC2. The commands there can either be run in a bash script, or in the startup scripts in the machine .hal file.
linuxcnc.org/docs/html/hal_basic_hal.html

M62 and M63 are the best way to proceed though, I think, rather than M101

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

Time to create page: 0.095 seconds
Powered by Kunena Forum