12-04-2020 08:24 AM
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.
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?
12-04-2020 08:30 AM
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
12-04-2020 09:01 AM
@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.
12-04-2020 10:03 AM
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?
12-04-2020 11:53 AM
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!
12-04-2020 01:23 PM
event structure is in place to allow the needed inputs to be entered before starting the loop iterations.
12-04-2020 01:48 PM
Please start over from scratch and do a few simple tutorials first.