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: 

DATA LOGGING

Hello Everyone,

 

I have created a simulator having different parameters with graphs. This simulator is made under control and simulation loop. The problem i'm facing is as soon as i'm adding write data i/o block to this loop the system is showing the response in very slow manner. What can i do to maintain good speed and as well as log the data in control and simulation loop. 

Thanks in advance

Regards,

Viplav

0 Kudos
Message 1 of 3
(2,681 Views)

I'm almost certain I know the source of your problem -- you have a single While loop inside which you are trying to do too many things, some of which take time and "slow things down".  Of course, that's just a guess as you failed to attach your VI so we could see what you did, try to make improvements, and suggest "solutions" for you.

 

Do you understand the concept of Data Flow, one of the key concepts of LabVIEW?  You can take advantage of this to run two loops in parallel, potentially isolating the "slow poke" so that the "data producing" loop can run full speed.

 

Look up Producer/Consumer Design Pattern, see if this applies to your situation.  And post your code!  [This means "attach your VI" -- do not attach static pictures of all or part of your Block Diagram -- we can't edit or execute a static picture].

 

Bob Schor

Message 2 of 3
(2,653 Views)

Clear case of needing a Producer/Consumer architecture.  The idea is that you move your file IO into another loop so that your main loop can keep the rate it actually needs.  You pass data from the main loop (producer) to the file IO loop (consumer) with a queue.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 3 of 3
(2,635 Views)