LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronizing 2 while loops one with an event structure.

Solved!
Go to solution

Hi fellow LabVIEW users

 

I am trying  to integrate an event structure into my current exisiting VI to save certain control values as indicated in this post

http://forums.ni.com/t5/LabVIEW/Using-the-quot-Make-Current-Values-Default-quot-as-a-control-on/td-p...

 

This is the VI that I am using as a template with my exisiting VI.

 

http://forums.ni.com/ni/attachments/ni/170/547715/1/Defaults%20Demo.llb

 

The "stop, value change" I am using in the main VI and wiring a "true" constant instead of the boolean control in the event structure. The while loops are not connected. The array I am using in my exisiting VI (the other while loop) is indexed and unbundled to be used here.

 

The combined VIs work well and it is giving me the desired results, my question is, in the long run will it give me issues. Do I even need to synchronize?

 

Thanks for all the help.

0 Kudos
Message 1 of 5
(4,638 Views)

 


@mhaque wrote:

 

The "stop, value change" I am using in the main VI and wiring a "true" constant instead of the boolean control in the event structure. The while loops are not connected. The array I am using in my exisiting VI (the other while loop) is indexed and unbundled to be used here.

 

The combined VIs work well and it is giving me the desired results, my question is, in the long run will it give me issues. Do I even need to synchronize?


 

You need to write a few more paragraphs. Your current description is full of holes and makes very little sense. It is not sufficient to reproduce what you are doing.

 

It would be much easier if you could just show us some simplified code instead.

0 Kudos
Message 2 of 5
(4,605 Views)

Hi please see attached VI.

 

Your help is as always much appreciated and needed.

0 Kudos
Message 3 of 5
(4,593 Views)
Solution
Accepted by mhaque

There is no problem having that lower extra loop with the event structure.

 

Personally I am worried about the upper loop. Why so complicated? Why so much duplicate code? Why all these hidden indicators servinf as local variables?

 

Why don't you simply place the entire cluster array in a shift register and index and unbundle by name wharever value you need to access. No hidden indicators or local variables needed. 

Message 4 of 5
(4,584 Views)

Ahah! Never thought of it like that! Well the reason would be that I'm new to LabVIEW!

 

0 Kudos
Message 5 of 5
(4,582 Views)