2
« on: February 03, 2016, 03:44:40 PM »
Trying to get this macro to work better -
The controller sends a signal to an air valve that sends a signal to the tow Desoutter drillers to activate
There is a cam switch at on the drillers that is to send a switch to the controller when the cycle is done so the controller moves to the next position and does it all over again.
The problem is the "sleep " command .... not sure why it is isn't working correctly but I have to have a sleep that is greater than the driller cycle... My desire is that the sleep command just takes the signal form the driller completion and turns that sustained signal into a momentary signal. If I am not drilling and the signal stays on the controller moves quickly - like the sleep command is ignored. But when actually drilling the sleep command has to be longer than the drill cycle or it tries to move the part before the driller has finished up. Make sense? MMMMM?
Here is the Macro - it works - just want to get the thing to cycle faster.
ActivateSignal(OUTPUT1)
While Ismoving()
Sleep(1100) ' Wait 1.1 sec This can be adjusted as needed
Wend
While IsActive(INPUT1)= False
Sleep(50)
Wend
DeactivateSignal(OUTPUT1)