LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

updating boolean indicators in timed loops

Sorry, I simply don't work well with "tunnel vision". Looking at a image of a small section of code makes it virtually impossible to tell what is going on. Some real code would be much more helpful. Really! :0
 
  1. How do you know it finishes late? (You don't use the terminal).
  2. Is it possible that some other section of code writes to these locals?
  3. What are the priorities of your other timed loops?
  4. How long does the loop run? Could it be that it runs only very briefly and constantly restarts?
0 Kudos
Message 11 of 16
(1,586 Views)
I cannot answer tour questions now. I'll think about them. In the meantime I post the main vi (hope you can understand)
0 Kudos
Message 12 of 16
(1,583 Views)
again attachment forgotten
0 Kudos
Message 13 of 16
(1,581 Views)
Hi altenbach,

Just to answer to your questions:

1 - before I made some modifications to thge code, the loop used to finish late (I could see it with an indicator). Now it doesn't happen any more because it was due to another timed loop in a subVI of the second while loop whos period was set very long (1500 ms).

2 - No other section of code writes to these locals

3 - As you can see in "main.vi" the loops that update the LEDs have maximum priority. Nevertheless I can see undesired delays

4 - Each time loop you can see in "main.vi" restarts for a given number of times depending on  the value of the variable "Durata". This is necessary to make the LEDs flash.

0 Kudos
Message 14 of 16
(1,570 Views)

Hello Damiano,

I took a look at ypur code and I have some questions:

  • Are you running this VI into a Windows or RT target?
  • How long are these "undesidered" delays?
  • Have you tried to write a small code which only has to blink some indicator? Starting from that code you can further develop your application, but firstly is important to verify that your desired blinking frequency can be reached or not;

Hope this helps,

Fabio

Fabio M.
NI
Principal Engineer
0 Kudos
Message 15 of 16
(1,551 Views)
Hi all,
one important news: PROBLEM SOLVED ! ! !  Smiley Very Happy It was sufficient to adjust the parameters of another timed loop in the code. It is devoted to the execution of a digital pattern input. The problem was in the fact that it had a too long period of execution resulting in a waste of resorces and processor time. I lower the period of that timed loop so now the other timed loops can execute correctly.
Result: my semaphore is almost better than a real one.
Thak you all for your support.
Bye.
Damiano
0 Kudos
Message 16 of 16
(1,537 Views)