1
HiCON Motion Controller / M Code "Handshake" – Need Help
« on: October 05, 2015, 03:42:12 PM »
I need help getting an Mcode set up, it would function something like this:
function m100()
Check INPUT1
IF Active (LaserReady) THEN
Activate OUTPUT1 (FireLaser, Note: Signal must be active for at least 50msec.)
Wait for INPUT1 to go Inactive
Deactivate OUTPUT1
Wait for INPUT1 to return to Active
Return to Gcode
Else
Display Error 'Laser Not Ready'
END
As you can probably see I only need to check the INPUT1 the first time M100 is called in the Gcode. I’m not sure how to write this and was hoping someone could help.
function m100()
Check INPUT1
IF Active (LaserReady) THEN
Activate OUTPUT1 (FireLaser, Note: Signal must be active for at least 50msec.)
Wait for INPUT1 to go Inactive
Deactivate OUTPUT1
Wait for INPUT1 to return to Active
Return to Gcode
Else
Display Error 'Laser Not Ready'
END
As you can probably see I only need to check the INPUT1 the first time M100 is called in the Gcode. I’m not sure how to write this and was hoping someone could help.