04-01-2009 08:33 AM
I'm making a loop that is supposed to write a poll message to the serial port once every minute and read a message from the same port once every 256 ms. It is supposed to proceed untill a stop button is hit. It is based upon a while loop that contains two different flat sequence structures that each contains a metronome ("wait until next ms").
The intention of thisis that the program goes through the loop and every 256 ms it reads the serial port and every 60 000 ms it sends a polling message. However, the indicators I've connected to the metronomes doesn't seem so show a linear increase in the ms timer. The poll timer occasionally increases a little (in two minutes it might increase 20 ms). The read timer does not increase at all. Poll count increases very irregularly.
Does the flat sequences interfer with each other? Can this loop be changed in any manner in order to work properly?
04-01-2009 08:56 AM

04-02-2009 02:00 AM
04-02-2009 03:28 AM
And with an event structure:
04-02-2009 09:42 AM - edited 04-02-2009 09:43 AM
This thread has been continued here.
Please keep the discussion of the same topic in one thread. This makes it easier for people to find all the information.