From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Why do I get a error stating units is undefined ?

Solved!
Go to solution

Why am I getting this error message?

 

 

     The unit "Bar Delta-P" of the channel "[1]/IPT_Cylinder_1" is unknown.

     Define a new unit or a unit alias.

0 Kudos
Message 1 of 8
(5,183 Views)

Hi Jcheese,

 

The unit string "Bar Delta-P" is not in the standard DIAdem unit catalog.  Is that the same thing as "Bar"?  If so, you can add this as an alias string to the Bar unit.  If not, how does it differ from Bar?

 

Brad Turpin

DIAdem Product Support Engineer

National Instrument

0 Kudos
Message 2 of 8
(5,181 Views)

But why would this issue all of a sudden start to happen.  I have used this script before on the exact same CSV log and never had to define a unit before.  The same thing happens if I use InHG or "%" as well

0 Kudos
Message 3 of 8
(5,179 Views)
Solution
Accepted by topic author Jcheese

Hi J,

 

I was able to run your posted script through without error as long as I had the "Calculate Quantity-Based" button in ANALYSIS unchecked.  The moment I checked it, though, your same VBScript produced on my computer the error you're getting on yours, at the ChnAverage() command.  Thus, I believe somehow that button in ANALYSIS got recently checked on your computer.  If you have the "Calculate Quantity-Based" button checked, you will also see channel units display in the Data Portal:

 

QuantityBased-ON.pngQuantityBased-OFF.png

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 4 of 8
(5,157 Views)

Thanks Brad, that was it.

 

0 Kudos
Message 5 of 8
(5,153 Views)

(Version 2010), I need the "quantity based calculation" function to add a calculated column.  Error message is "Invalid unit calculation at the marked position in the formula. The value has an unknown unit lbf".  I am not mixing units in my calculation? Formula is "Ch("normalize")=Abs(Ch("[5]/drivers side load (Formula Result)")-318)"?  CH5 units is lbf.

0 Kudos
Message 6 of 8
(4,964 Views)

Hi tronny,

 

If you want to execute a quantity-based calculation, then all the elements of that calculation must have a recognized unit (string).  That means that the "Unit" property of Ch5 (lbf) needs to be in the Unit Catalog (it shows up as "pound-force" in the 2012 Unit Catalog), AND the constant -318 has to have a unit associated with it.  In the Calculation Manager you can create a new input of type constant and configure its unit.  In the Channel Calculator you need to use this function in the Channel Calculator expression: -CreateValueWithUnit(318, "lbf").

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 7 of 8
(4,950 Views)

Thanks Brad,

Pretty obvious now.

0 Kudos
Message 8 of 8
(4,942 Views)