if u want a delay in an m code u can do
sleep 2.0
this will sleep for 2 seconds but this is not in real time memory so it can be + or - a few hundred milliseconds depending on the computer etc
i would stay away from Mcode tool changer if this is a machine of any size/power etc use Mcode to test a changer or have a manual way to get out of it in MDI only if it gets stuck etc
so for exsample u could do this to turn a classicladder function input on and off with a 2second delay
say we want M101
make a file called M101 in NC_Files folder
make it executable (see EMC Gcode manual)
add these lines
Code:
#!/bin/bash
#tool changer Mcode functions
#turn a hal pin on and off
halcmd setp classicladder.0.in-26 True
sleep 2.0
halcmd setp classicladder.0.in-26 False
exit 0
u can change the classicladder.0.in-26 to any other pin u like or any otehr halcmd i belive too.
hope this helps
can you do a
G0 A1
M06
feed the M06 from HAL to classic ladder and back when tool is changed?
hope this helps