Mi sa che fai prima a fare un controllo nella schermata di mach3 invece di fare il hw esterno, pero se lo vuoi fare, in seguito come puoi
definire codice m per settare l´output e nelli stessi script potresti poi aspettare il segnale di imput e poi disattivare l´output.
Su un pin con open collector della parallela potresti fare entrambe le cose con un solo pin, volendo. Potresti farti anche un controllo,
che dentro il script legge il valore e aspetta poi un tempo relativo ad esso.
To activate an output, I wrote the following script:
ActivateSignal(OUTPUT1)
Then I saved it as m111.m1s (I chose the M code as M1xx as my custom code and Mx1x to signify output 1 and Mxx1 to signify the output active.
To deactivate an output, I wrote the following script:
DeactivateSignal(OUTPUT1)
Then I saved it as m110.m1s (I chose the M code as M1xx as my custom code and Mx1x to signify output 1 and Mxx0 to signify the output inactive.
I then did the for all the outputs I need, of course I changed the M code and outputs to correlate with each other.