I am currently working on an executable to perform data analysis on the battery of a device. I need to scale the units of some of the data that I am taking in. When I build an executable of my VI, I run into trouble with the custom scaling subvi attached to a virtual channel. I specifically error code 200378. Does anyone know how to create custom scaling units that do not require my computer's specific MAX properties? I have attached my VI.
Have you tried to programmatically import settings to MAX?
You can export your settings manually, attach the file to your executable and import it according to the following solution:
Instead of creating a Custom Scale in either MAX or the Project, my recommendation would be to create a Task, and to create it in the Project. Here are my reasons:
Here's an example. Let's say I have a Triaxial Accelerometer, with X, Y, and Z voltage inputs connected to Inputs AI0, AI1, and AI2 of a USB-6009. The voltage range of each channel is 0 to 10v, corresponding to -5 to 5 g. I want to use Differential inputs. I want to sample continuously, taking 1000 samples at 1KHz. Finally, I want a custom scale that "maps" 0-10v into -5 to 5 "g".
Here's what I do:
Here's a VI I made from this specification, using a "Simulated 6009". Now you probably don't (yet) have LabVIEW 2016, so you might not be able to drag this Snippet to a Block Diagram and have it "expand", but it is so simple you should have no trouble duplicating it yourself.
and here is the resulting Front Panel (the simulated 6009 generates a "full scale" slow sinusoid for each channel, offsetting them slightly from each other). You can see that over 5 seconds (09 to 14), it does about half a cycle, with max at +5 and min heading toward -5.
Note that using Defined Tasks makes DAQmx very simple to code for most simple "tasks" (no pun intended) -- you should never use "The Dreaded DAQ Assistant" (not that you did, but who knows who else is reading this post) for things like this!
Bob "Long-Winded" Schor