Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: riporeno on February 10, 2011, 04:41:36 AM

Title: macro to force oupt
Post by: riporeno on February 10, 2011, 04:41:36 AM
 hi to everybody  :)

as a macro can be made (example m300.m1s)  

what it forces an exit to 1(output #7) and another (example m301.1ms)  what does it to 0?  

the commanded signal, has to be also active after the reset
  
thanks  
  
moreno
Title: Re: macro to force oupt
Post by: stirling on February 10, 2011, 07:39:51 AM
Hi moreno

M300.m1s
activateSignal(OUTPUT7)

M301.m1s
deactiveSignal(OUTPUT7)

Add <space>M300 to the initialization string AND tick "use init string on ALL resets" both on the config/general config dialog.

Ian
Title: Re: macro to force oupt
Post by: riporeno on February 10, 2011, 08:00:14 AM
ok Ian, thanks for the fast answer 
very kind 
regards 
moreno
Title: Re: macro to force oupt
Post by: riporeno on February 10, 2011, 08:34:50 AM
m300 works 
m301 goes to error 
after some tests I have understood that the exact command is deactivateSignal(OUTPUT7) 
thanks   
good day 
moreno
Title: Re: macro to force oupt
Post by: stirling on February 10, 2011, 08:47:21 AM
yes - my typing is quicker than my brain as usual  :)

Ian
Title: Re: macro to force oupt
Post by: riporeno on February 10, 2011, 08:57:55 AM
 :D :D
no problem
thanks

moreno