LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

custom scale setting and reading problems

Solved!
Go to solution

Hello, I spent hours browsing QA and examples but could not find answer. I prepare VI to measure voltage signal from two AI channels by NI USB 6210 card. Signals shoud be scaled to viscosity and temperature units then (I have choosen a Map Ranges mode) and finally the scaled signal is to be used in further calculations. All that I want to do programmatically to be able to easy control parameters. I do not have USB-6210 at site so I work on simulated signals. I used Voltage - Continuous Input.vi downoloaded fronm NI website as template, then after modifications I connected a DAQmx Create Scale.vi using instructions from https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000YILFCA4&l=pl-PL. All seems Ok, but when I run my vi, it seems that neither Waveform chart nor Viscosity and Temperature indicators read scaled signals. they only present pre-scaled voltage signals. For my further processing I need to have scaled signals. Surprisingly, when I checked recorded TDMS file it contains informationabout scaled signals (channel name, units) but the values are not scaled neither. I noticed, that some user ad property node DAQmx channel to indicate Custom scale name, I tried but it changed nothing. In some discussions I found that the custom scale and/or nie channel DAQs are in a for loop, but I do not understand why.
May I ask to check my VI for errors and guide me how to have my VI working? I upload my VI and screenshot with my front panel settings and a recorded TDMS file too.

Download All
0 Kudos
Message 1 of 7
(255 Views)

You are running LabVIEW 2025, so your code (Viscosity test.vi) can only be examined by those of us who have installed LabVIEW 2025 on their computers (and probably >75% of them are students just learning LabVIEW).

 

To reach we "old timers" who have been using LabVIEW for years, and probably have at least LabVIEW 2019 or LabVIEW 2021 installed, cannot open your code.  Please open it yourself, go to the File menu, and "Save for Previous Version", specifying LabVIEW 2019 or 2021, and we'll take a look.  I, for one, have successfully used a Custom Scale to get the output of a tri-axial accelerometer chip (which outputs from 0 to 5 V, as I recall) to give me the output in units of "g" (Earth gravity).  Show me your code, I'll show you mine ...

 

Bob Schor

0 Kudos
Message 2 of 7
(224 Views)

Many thanks for your advise and interesting in my topic. I upload my code in two versions 2019 and 2017, just in case. if other versions would be required just let me know.

Download All
0 Kudos
Message 3 of 7
(206 Views)
Solution
Accepted by topic author Pikey

Hi Pikey,

 


@Pikey wrote:

All that I want to do programmatically to be able to easy control parameters. I do not have USB-6210 at site so I work on simulated signals. 


Did you test your VI with real DAQ hardware?

 

Simulated devices are just simulated - with several limitations. Apparently applying custom scales is on their list of short-comings!

 

Next time please set reasonable values as default in all the controls of your VI. I had to change several of them (including the channels) to be able to run your VI…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 7
(156 Views)

I just tested it on a connected device, and everything seems to be working. I'll double-check, but it seems to be working. Thank you very much. I wasted three days of work searching for an error that wasn't there. And since you brought up the topic, could you tell me how to save default values in controllers? It's also annoying that I have to reset them every time, but I don't know how to save these values as defaults. Thank you very much for helping me solve the main problem.

0 Kudos
Message 5 of 7
(138 Views)
Solution
Accepted by topic author Pikey

Hi Pikey,

 


@Pikey wrote:

And since you brought up the topic, could you tell me how to save default values in controllers? 


  1. Edit menu -> set values as default (for all or all selected frontpanel elements)
  2. context menu of the frontpanel element -> data operations -> set current as default
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 6 of 7
(127 Views)

Thank you one more time, it is easy to find once you know where. Best regards, Pikey

0 Kudos
Message 7 of 7
(90 Views)