Page 1 of 1

Sync vs async

PostPosted: Mon Dec 12, 2022 3:00 pm
by girogiri
Hi all,

can someone kindly explain the difference between M10.x/M11.x and Setoutpin()/Clroutpin() I know that the first are Syncronous commands while the latter are Asyncronous, but what does this mean? We tried to use M10/M11 to turn on some outputs but weird things happened.

Beside this, it is still not very clear the difference between Exec.code() and exec.codesync() is there a post or some documentation I'm unaware that can help?

thanks all

Giorgio

Re: Sync vs async

PostPosted: Mon Dec 12, 2022 10:25 pm
by fsli
girogiri wrote:Beside this, it is still not very clear the difference between Exec.code() and exec.codesync() is there a post or some documentation I'm unaware that can help?

viewtopic.php?f=4&t=3954&p=27919&hilit=codesync#p27919

Re: Sync vs async

PostPosted: Tue Dec 13, 2022 1:16 am
by cncdrive
The M10.X and M11.X are syncronous outputs which means that if you run motion code then the M10.X and M11.X are inserted between the motion commands and are executed in syncron with the motion without the motion being paused or stopped.
So, you put in for example a G1 X0 and then G1 X10 and then M10.1 and then G1 X20 then the output will turn on the exact same time when the X axis reached position 10.
With Setoutpin and Clroutpin the output is set asyncrounously, so as soon as you executing these commands then the output is set/reset.

Re: Sync vs async

PostPosted: Fri Dec 16, 2022 9:59 am
by girogiri
Hi Balazs,

thanks for your replay, what you say is clear.
We have the following issue with M10: we use M10/M11 in a macro to turn on and off a laser pointer and it's working ok.
The issue is that sometimes, while executing other macros with no M10 but only plain movements ( G53 / G90) the laser pointer turns on misteriously.
Are we doing something wrong or it'a a bug?

thanks Giorgio