Greetings,
I am using two motion axis system for my customized machine. The first motion is X,Y,Z axis and second motion is a stepper motor to supply the wire controlled by a daemon.g file. Two seperate macros control the on & off of the torch. Today i tried creating a small program employing the two macro files, found that the macros files are responding (the status of the torch and wire motor observed from the relay status change) but the motor is not rotating i.e., not supplying the wire as expected.
When tested seperately the macros files are working well. Motor is rotating and supplying wire when the torch is ON and not when the torch is off.
Should i change something in the code below...... Requesting ur thought to overcome this plz.......
Is it related to the placing of files? or the que sequence of the G and M codes?
Job (Print file)
G1 X211 Y459 Z200
G1 Z110
M98 P"0:/macros/WELD TORCH ON+SM"
G1 X370 F480
M98 P"0:/macros/WELD TORCH OFF+SM"
G1 Z130
daemon.g file
;daemon.g
while (true)
M596 P1
G91
while (global.weldtorchstate == 1)
G1 H4 U99999 F1000 ;selects the U axis & sets the feedrate
G4 S0.2
Weld Torch ON Macro file
; Weld Torch ON
M42 P3 S0 ; turns on the relay to start welder
M42 P4 S1 ; set U axis endstop to high
; set weldtorchstate to ON
set global.weldtorchstate = 1
Weld Torch OFF - Macro file
; Weld Torch OFF
M42 P3 S1 ; turns off the relay
M42 P4 S0 ; set U axis to low end
; set weldtorchstate to OFF
set global.weldtorchstate = 0