LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

My Scaling VI running slow

Solved!
Go to solution

Hi All,

 

I am using a structure similar to the QMH Continuous Acquisiton / Logging (DaqMX) template.

 

My data getting acquired goes into the display loop via a notifier.

 

When the data come in, I am scaling the analog ins with the subVI shown below:

 

GOB34_0-1725984103142.png

 

The issue is is that this causes "hiccups" in my data being displayed - it is choppy.

 

Is there a better way to do this?

 

Thanks

 

Adding: this is the display loop showing the scaling subVI:

 

GOB34_0-1725984512488.png

 

0 Kudos
Message 1 of 36
(436 Views)

We can rarely debug images.

What are these orange indicators in the display loop? (Just scalars?)

How big are these waveforms and other data structures?

How often does data "come in"?

0 Kudos
Message 2 of 36
(407 Views)

If the analog data is acquired using DAQmx, you can use scales to have the DAQmx driver scale the data to engineering units for you.

dsbNI_0-1725994661432.png

Doug
NI Sound and Vibration
0 Kudos
Message 3 of 36
(379 Views)

Thanks Doug - I hate using max for anything.

i read in scale data from an external file that gets updated.

0 Kudos
Message 4 of 36
(373 Views)

@GOB34 wrote:

Thanks Doug - I hate using max for anything.

i read in scale data from an external file that gets updated.


You don't have to use MAX. You can programmatically create scales.
DAQmx Scales.png

You could continue sourcing slope and intercept from the same file you use now. 

Doug
NI Sound and Vibration
Message 5 of 36
(367 Views)

I will try that!

if that is done, is it still possible to access the raw, unscaled data? 
I usually like to record both.

0 Kudos
Message 6 of 36
(359 Views)

@GOB34 wrote:

I will try that!

if that is done, is it still possible to access the raw, unscaled data? 
I usually like to record both.


You will only have access to the scaled data returned by DAQmx. Rather than record both scaled and unscaled waveforms, I recommend recording scaled waveforms along with sensitivity (slope) and offset.

Doug
NI Sound and Vibration
0 Kudos
Message 7 of 36
(340 Views)

Really appreciate the help-

Each of my channels has a different scale factor. It seems really messy and cluttered to have to use this approach for many channels.  

0 Kudos
Message 8 of 36
(329 Views)
Solution
Accepted by topic author GOB34

Each of my channels has a different scale factor. It seems really messy and cluttered to have to use this approach for many channels.  


This implementation is better suited for multichannel applications.

DAQmx Scales (N Ch).png

 

and instead of "1X" or "10X" you might consider putting the sensor serial number (or some other identifier) as the scale name.

Doug
NI Sound and Vibration
Message 9 of 36
(316 Views)

My recommendation also follows Doug's. Using DAQmx's scales at the driver level is the best performant, scalable and robust, compared to recreate it yourself.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 10 of 36
(310 Views)