Consecutive programs on an 18m2

Reefrich

New Member
I have heard you can run two programs at the same time on an 18m2. Is this correct?

I am trying to get a frequency out of one of the output which will be connected to some 4026b to display time and need that to run at the same time as the program is monitoring lap times and deciding which was quickest. I have managed to get the later part of the program running but can't figure out how to get the output to the 4026b to run without being interrupted or stopping.

any ideas

Cheers
 

hippy

Technical Support
Staff member
All M2's support "multi-tasking" which can make things look like multiple programs running at the same time but how "at the same time" really depends on what you are doing and how you need to achieve it; everything will stop when one program task executes a blocking command and waits for an input for example.

The following will flash two LED's at different rates -

Start0: Do : Toggle C.0 : Pause 300 : Loop
Start1: Do : Toggle C.1 : Pause 1000 : Loop

But if you block on a IRIN command in another task then flashing will stop until IR commands are received ...

Start0: Do : Toggle C.0 : Pause 300 : Loop
Start1: Do : Toggle C.1 : Pause 1000 : Loop
Start2: Do : IrIn C.2, b0 : Loop
 
Top