LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I create an executable that includes my scaling?

Is it possible to c reate an executable VI including scaling, for use on multiple systems? Please include instructions.

0 Kudos
Message 1 of 9
(2,977 Views)

What type of scaling did you have in mind? The easiest way to do this is to scale the data yourself in your code, then your scaling follows your code in whatever form the code takes (VIs, executable, ppl, etc.).

0 Kudos
Message 2 of 9
(2,964 Views)

For Strain gauges and O2 analysers. How do you build it in the code? I use DAQ assistant.... Is it still possible?

0 Kudos
Message 3 of 9
(2,956 Views)

Sure there are lots of ways.  Your scaling is stored in MAX, Measurement and Automation Explorer.  There you can export all kinds of DAQ settings, and then import them on another PC.  You can do this manually, or programatically at the start of your program, or on installation.

 

http://digital.ni.com/public.nsf/allkb/12288DEB3C6A185B862572A70043C353

http://digital.ni.com/public.nsf/allkb/E8E00D0F0C05823886257522007E66FA

0 Kudos
Message 4 of 9
(2,934 Views)

We are doing this already. I was just wondering if the scales could be put right in the executable due to the fact that we use multiple PC's and DAQ units for our testing.

0 Kudos
Message 5 of 9
(2,903 Views)
Don't use the DAQ Assistant. With the much more flexible DAQmx functions, you can put whatever you want in the VI itself.
0 Kudos
Message 6 of 9
(2,896 Views)

You can do a number of things.  This shows that you can create a scale and save it in MAX.  One idea would be to query available scales when your program starts and create them if they don't exist.  The sky's the limit.

 

scale.png

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 7 of 9
(2,894 Views)

Keep your project all together.  Add the Task and Scale to the project.

 

 

Capture.PNG

if you look inside this build you will find

\Data\NI-DAQmx.ini

"

[DAQmx]
MajorVersion = 9
MinorVersion = 8

[DAQmxChannel ProjectVoltageTask/Voltage]
AI.MeasType = Voltage
AI.Voltage.Units = From Custom Scale
AI.TermCfg = Differential
AI.Max = 10
AI.Min = -10
AI.CustomScaleName = ProjectScale
ChanType = Analog Input
PhysicalChanName = Dev1/ai0

[DAQmxTask ProjectVoltageTask]
Channels = ProjectVoltageTask/Voltage
SampQuant.SampMode = Finite Samples
SampClk.ActiveEdge = Rising
SampQuant.SampPerChan = 100
SampClk.Rate = 1000
SampTimingType = Sample Clock
SampClk.src=

[DAQmxScale ProjectScale]
Lin.Slope = 1
Lin.YIntercept = 0
PreScaledUnits = Volts
ScaledUnits =
ScaleType = Linear"

 

Right there in the exe.

 


"Should be" isn't "Is" -Jay
0 Kudos
Message 8 of 9
(2,871 Views)

Thanks I'll Try those suggestions.!!!!!!!!! 🙂

0 Kudos
Message 9 of 9
(2,867 Views)