Hello Forum.
We have a drilling machine at work. It rotates a table, like a record player (axis A) on which is a disk of wood. Every 10 degrees or so rotation stops and we drill a hole. A valve opens, letting air through, pushing down the drill where a magnetic read switch should trigger the return stroke, where another read switch signals the next rotation around A. We have never got the read switches to work, we use a short drill stroke timer instead.
I have looked and looked for a way to read a switch but ended up looking at learning visual basic, an 8 hour video, to write what I think will be about 4 lines of code in a macro. Can anyone save me the time?
In Mack 3 we can see an LED on the diagnostics page... it changes state along with the magnetic read switch, so our signal is getting all the way to mach 3. I think the two read switches are pins 10 and 11.
The cycle should go like this..... turn A to the drilling position, stop rotating, M7 (pushes the drill down) , wait for the bottom of the drill stroke read switch to trip, M9 (pulls the drill back up), wait for top of drill stroke read switch to trip, turn axis A some more....etc
I need a macro that waits for the switch to trip before it moves to the next line. Can anyone help me please.