From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Timed Loop Shutting Down Problem

Solved!
Go to solution

Hi Everyone!

I'm working on a comlex project with more VI's included, and I have some problems with the shutting down.

I wanna control the shutdown from a central statemachine, here I obtain a notifier and send a bool cluster. The first cluster element is true if the shut down process can start, and then all VI's before actually shutting down write the corresponding cluster element to true, so in the end I can check if all VI's were shutted down correctly.
It goes fluently with every VI written by myself, the problem appeared when I tried to modify a third party VI. The VI is necessairy, It's the original WatchDog of a motor controller, so It's not possible not to use.

So there is a TimedLoop in this VI, and it seems the inside the TimedLoop the notifier isnt refreshing itself, so I have no chance to shut it down.


Can you give me any tips, what tool could I try to use to give a shutting down command from the state machine?

 

Thanks in advance!

0 Kudos
Message 1 of 5
(3,031 Views)

Timed loop runs every 2 second, are you sure you are not clearing notifier in some other process that receives it?

Also, you are sending notifier after you have checked its status. I guess it will be more reliable to read notifier and resend it.

 

PS: not related to notifiers. Your are sending 4 identical commands into 4 channels sequentially and not using For loop? How long will the structure grow if you have 20 channels?

0 Kudos
Message 2 of 5
(3,004 Views)

One more thing: it will not quit if controller VIs return error. Move error wire, or add OR with error to stop condition. 

0 Kudos
Message 3 of 5
(3,001 Views)

So, I'm pretty sure nothing writes it over in the meantime, all the other VI's are handling it without any problem.

I do resend the notifier everytime, just if the case is true, first I rewrite one element in the cluster.

The 4 identical commands... That's the part which wasn't written by me, as a consequence I don't really wanna modify it. But the structure will not grow.

 

I know about the error thing as well, but in this state of the program it's better this way for me.

I also tried with a shared global variable, this TimedLoop couldn't handle it. Any other tips?

0 Kudos
Message 4 of 5
(2,984 Views)
Solution
Accepted by topic author gazsi3

In the meantime I found out that there was a problem created outside the VI by myself.
Thanks for the help!

0 Kudos
Message 5 of 5
(2,980 Views)