LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Slow running vi

I have a VI that contains 20 channels of analog input current reading using a NI 9208 for 16 ch as well as a ni 9219 for the remaining channels .

Each has it’s own scaling set up as each device that is being used does not have the same out puts for zero and span.

n3ow_0-1607090027448.png

 

The issue is that the vi runs slow recording about 1 reading every .5 second.

All the Daq and scaling is set up in a event structure and thenfrom the event structure  to a tdms logging vi and then to a while loop which contains the read vi as well as the separating out the elements to individual displays on the front panel. Also in the loop is one express vi for elapsed time  which is in a case structure .

Could all the scaling be the cause for the slow running vi?

 

0 Kudos
Message 1 of 7
(185 Views)

Hi N3ow

 

Sounds like you've got a lot of nested components of your code which could be effecting execution. Are you able to post your source? it'll give people a better idea of what the cause may be..

 

Regards

 

J

0 Kudos
Message 2 of 7
(183 Views)

@n3ow wrote:

Could all the scaling be the cause for the slow running vi?


No. Scaling is most probably a simple kx+m formula, it'll be done in microseconds.

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 3 of 7
(173 Views)

Hi n3ow,

 


@n3ow wrote:

I have a VI that contains 20 channels of analog input current reading using a NI 9208 for 16 ch as well as a ni 9219 for the remaining channels .


Both modules are rather slow. Did you read their datasheets?

What is the expected sample rate?

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 4 of 7
(151 Views)

You are just showing a heavily truncated picture that most likely does not show the source of the problem. A picture runs infinitely slow, but a VI can be slow or fast, depending on a lot of things. Please attach your VI, else we cannot help.

 

Your descriptions seems mindbogglingly inefficient, and I am not talking about the scaling.

 

Why would you need an evet structure at all here? What is triggering the events? How, how often and how much are you writing to the tdms file? Why is the express VI inside a case structure? What conditions toggles the case? What are your datatypes? (dynamic, waveform, array, etc.). So. Many. Questions!


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 5 of 7
(137 Views)

event structure is in place to allow the needed inputs to be entered before starting the loop iterations.

 

0 Kudos
Message 6 of 7
(127 Views)

Please start over from scratch and do a few simple tutorials first.

 

  • Your event structure makes absolutely no sense. (if you keep pressing the start button forever, you would queue up an infinite number of events once it has fired once. It cannot breathe!)
  • Index array is resizeable. You only need one instance instead of 19. Again, consider arrays as indicators instead of all these scalars.
  • Your use of "elapsed time express VI" seems completely useless. What's the significance of the comparison?
  • I don't see anything related to the tdms stuff you mentioned. Did you attach the wrong VI?
  • Wouldn't it make more sense to use arrays of settings instead of deeply stacked tab controls?
  • etc.
  • etc.

LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 7 of 7
(122 Views)