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
(1,448 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! ADDQ VIPM Now on GitHub
"Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 2
(1,362 Views)