Jump to content

This Code is very heavy


Recommended Posts

This is an Data Acquisition Code acquiring through Labview USB6000. It works fine in De-bug mode in 1Sec. Data Acquisition Time but hangs during the actual execution.

I have used precision Timer and I need it compulsorily. Please suggest any way I can make this code lighter.

My PC configuration is Windows10 with i3 6th Generation processor & 8Gb Ram.

Pl advice.

LAVA14.vi

Link to comment

Can you save it for an earlier version? Not everyone is on the latest and greatest.

Also, The USB-6000 and precision timer do not make much sense. USB transfers don't have guaranteed microsecond timing with regard to the host's clock.

Link to comment

Gribo,

My DAQ frequency is 30mins, but want initialisation value "Zero" once I click "Acquire" button. With normal Timer Loop in While Loop it doesn't generate "0" initialisation value. I am enclosing png file for your reference. Here is the code without DAQ Assitant and is also not single screen view, which is primary condition of Labview. Please advice which version is suitable for you to save the code in earlier version?

Please advice how can I reduce the Code.

LAVA14.png

Link to comment

Your DAQ sample rate is 1 second.  So you need to make sure you are pulling off the data at least at that rate.

1. Again, change your Timed Loop to a normal While Loop.  It is hurting you more than helping.

2. Change your DAQmx Read to be N Channel 1 Sample.  This will simplify things a little as you will no longer need the 5 functions just to get a single value out.  You will just need to use Index Array (expand to 2 elements so you can get both channels).

3. You need to clear the task once the loop is done.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.