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: 

Output specific DAQ channel to database

Hi,

 

I have a DAQ with 64 inputs, run in a loop, combine data in the loop so that I can calculate the max, min, avg, std, var, and I want to write data of specific channels to the database.  Currently, I am using split signals to accomplish this but it makes the VI so crowded and very messy.  I was wondering if anyone has any suggestions to make this simpler and better.

 

See image below for my current configuration:

daq.png

0 Kudos
Message 1 of 5
(2,938 Views)
DON'T use the express VIs.

DO build subVIs.

There are other issues with your code -- like using the Stop node, but this will get you started.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 5
(2,935 Views)

Can you tell me why it's not good to use ExpressVI? 

Also, what is the problem with my STOP node? Should I not use it? If so, what should be used instead?  Thank you.

0 Kudos
Message 3 of 5
(2,927 Views)
The problem is (as you see) that it can complicate code. In addition inside a loop they can be very inefficient.

The problem with the stop is that it is like hitting the abort button. Using the abort button to stop your code is like using a tree to stop your car: it works but there can be unpleasant side effects. The proper way is to let you program stop by terminating all loops and releasing all resources the program is using.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 4 of 5
(2,921 Views)

You are also using Insert into Array.  Whenever you are putting new data at either the beginning or the end of the array, the proper function to use is Build Array.

Message 5 of 5
(2,908 Views)