LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

case structure with more than 200 cases, slower lab view app

Problem Description :
i am currently making a vi which compose of a simple case structures, a case structure with more than 200 cases, what i noticed is that the more i added cases the slower the labview reacts, it takes time for me to route wire on each of the cases.

i dont know if there are any setting in the labview environment that i can increase the buffer size? i dont know... but its getting slow (only on the
vi with more cases in a case structure)
 
0 Kudos
Message 1 of 21
(3,704 Views)

What version of LabVIEW are you using?

How big is the VI on disk?

 

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 21
(3,691 Views)

Can you provide a simple example that demonstrates this?

 

I have developed apps with large numbers cases in a case structure and I did not notice any difference in the speed to handle more cases.

 

The only scenaio I can image that would produce that situation is if the cases have locals or globals since each instance would have to get updated when one gets updated therefore resulting more time to complete the work in one of the cases.

 

Just trying to help,

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 21
(3,690 Views)

im using lab view 8.2

 

please see attached layout, the case structure with fanfailure has more than 200 cases on it.

 

thanks for the reply...i am currently working on the vi right now and it take me a long time to wire each cases.

 

any help is highly appreciated.

 

tnx

0 Kudos
Message 4 of 21
(3,684 Views)

Is the VI originaly written in an older version of LabVIEW?

 

There are sometimes issues in updating VIs which can lead to a slowdown of the whole LV-environment. SO maybe you are running into this. As Ben wrote, those issues more likely occur if the code is complex and full of variables.

It seems, that your code is not too complex, but full of variables.  Maybe that is something you should look into.

 

hope this helps,

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 5 of 21
(3,670 Views)

no, its not written in any version of LV.

it was only generated and written in 8.2 version.

 

yes, i have two big clusters in there (PSMI ReadOut and PSMI Specs).. but the problem occur after i added a case structure to

case out objects inside the two clusters. I dont have any option but to unbundled each object inside each case to compare its data from the other cluster.

 

 

0 Kudos
Message 6 of 21
(3,663 Views)

Can you clarify what you mean by "slow". Does it run more slowly or does it feel sluggish during editing?

 

Could you attach the actual VI?

 

 Overall, I agree with the notion of local variable overuse. For example, you read the same local variable twice in the same case. Is there a need for this? Is there a chance that it varies between the two reads? Typically, you would place the terminal in front of the case structure and wire to all the locations where you need the value. This ensures that the data is consistent. Still, this should not cause any slowdown problem.

 

(On a sidenote, the code in the upper left corner is inefficient. You convert the same data to lower case with each iteration, so you might want to place this before the loop and do it only once (well, if you are lucky, LabVIEW will fold the operation, but still....). Also your "index array" operation can be replaced by autoidenxing of the 2D array on the outer loop boundary.)

0 Kudos
Message 7 of 21
(3,660 Views)

slow ---  noticeable low when you wire from one point to another, you have to wait for few secs, not like with other vi.

 

the variable you just mention didnt affect anything on the problem, i tried to wire it direct from the first variable, same result.

 

regarding the lower case, yes i can put it outside the loop.

 

 

 

 

0 Kudos
Message 8 of 21
(3,643 Views)

Yes, it feels somewhat slugginsh adding wires even in 8.5. NI should look into this.

 

Also note that you have a large number of overlapping objects on the front panel, which could cause redraw performance issues, but I don't think this is the problem here. Personally, there is a lot of very similar code in the cases and it probably would have been much easier to consolidate if you would have used simpler data structures, e.g. arrays instead of all individual cluster elements.

0 Kudos
Message 9 of 21
(3,615 Views)

there's a reason why i didnt use an array, i use individual object instead. this is for the top level vi.

and i dont think thats the issue here.

front panel was created first prior i added those cases. i dont have any issue before i add those cases.

 

i already sent an email to ni, but i didnt get any responce yet, that's why i decided to post it here.

 

by the way, thanks a lot for looking onto this.

0 Kudos
Message 10 of 21
(3,609 Views)