08-17-2016 12:36 PM
Hello,
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.
Thanks ,
Mmoon
08-17-2016
01:17 PM
- last edited on
09-19-2026
01:25 PM
by
Content Cleaner
Hello!
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:
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000PA8GSAW&l=en-US
Marcin
08-17-2016
01:37 PM
- last edited on
09-19-2026
01:25 PM
by
Content Cleaner
The below link shows how: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019LvZSAU&l=en-US
08-17-2016 06:43 PM
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