From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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: 

Graphics - how to display fluid flow in a pipe

Hi, everyone;

 

I have been asked to make a bit of labview software to simulate the operation of a turbine based system. this needs to look good for a public display. I need to show the flow of various quantities (fuel, water, electricity) between components of the system.

 

Currently I am using fill slider controls to make a series of moving "blocks" to represent this flow along the pipes/wires. this looks OK, but for some reason causes the program to run very slowly when there are more than a couple of flows haappening (I need 10 fill slider bars each with 6 fill sliders all constantly moving to create a decent visualisation).

 

It is probably running slowly because that is not what the fill slider controls were designed for, but does anyone know a better way? the program needs to go onto a tablet for demonstration and this runs much slower than my development laptop, enough to make it not look so good.

 

Is there a more efficient way to display this within labview? Can i import an animated GIF or such and control its running within labview, or is there a better type of control or indicator that will run faster? Any advice appreciated!

 

Mark.

0 Kudos
Message 1 of 7
(4,177 Views)

Any chance you can post your code and maybe we can work out why it is running so slowly?

 

Olly

**********************************************************************************************
The day is quickly coming when every knee will bow down to a silicon fist, and you will all beg your binary gods for mercy.
0 Kudos
Message 2 of 7
(4,167 Views)

Did you try using the Defer Panel Update property?

 

Give a try to the following:

1) Set the property to True

2) Update all the sliders

3) Set the propery to False

 

Regards,

Marco

 

Message 3 of 7
(4,160 Views)

@MarcoMauri wrote:

Did you try using the Defer Panel Update property?

 

Give a try to the following:

1) Set the property to True

2) Update all the sliders

3) Set the propery to False

 

Regards,

Marco

 


i had the same problem with LED indicators to simulate cockpit aircraft lighting......"defer panel update" was the solution for my application Smiley Wink

0 Kudos
Message 4 of 7
(4,142 Views)

Buddy you should probably try the attached .ctl and .vi to gain some idea. Hope this helps. Requires few modifications about array manipulation.

 

This control is from data logging and supervisory control module and I have placed it in an array and stretched it to display it as a long pipe. 

Download All
0 Kudos
Message 5 of 7
(4,018 Views)
I use picture rings and hide the border. It is more effort to draw pictures in a graphics package to animate, but the results are impressive, smooth and very low cpu. Ill try and find an example to post when I get to my pc.
Michael
0 Kudos
Message 6 of 7
(3,998 Views)

Bad performance is often caused by code with no waits which takes over the CPU or by overlapping elements in the UI, which LV has more issues with drawing. I wouldn't expect simple sliders to cause issues. As said, posting the actual code would probably help in locating the issue.

 

You can also search for example that people posted of flow animations. You can find one such example here, where it's a cluster with an image inside, which is moved back and forth to generate a Star Trek-like animation. As far as I remember, there were no performance issues with that, although it does require more work.


___________________
Try to take over the world!
0 Kudos
Message 7 of 7
(3,972 Views)