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: 

which one will run fast.?

dear all

i have project reading shared variable from PLC.

i am using table control and i have put different shared variable on each pages of tab according to function and given tab name accordingly.

now if i want to use while loop and put each shared variable of tab pages in each while loop.

which will be best practice and will run fast because some time lab view showing slow reading variable from PLC.

Please see attached vi.

Thanks,

Asif

0 Kudos
Message 1 of 2
(2,022 Views)

I'm not quite sure what you mean, so i'll state some general tips. Don't use several copies of the Shared variables, drop 1 on the block diagram and split the wire as needed. Else there's a chance the program reads several times for less efficiency. Also, the top loop has no wait, making it a cpu hog, add a wait of 40(?) ms.

The LED-level can preferrably be replaced by a an array of LEDs with a Level Quotient 16 (or however big your steps are) to determine how many leds are to be lit. See attachment.

quotient.PNG

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 2
(1,936 Views)