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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data from weighing balance

I have been relentlessly trying to build a VI that will take in weight from a balance and calculate the instantaneous change in weight per unit time (and if possible the average change in weight per unit time). 

I started with the USB Raw-Bulk VI in the NI example because my computer has only USB ports, hence my decision to use the USB VI. The USB raw device specified in the VISA resource control is properly configured as I can see the weighing balance USB port in the Visa Resource drop-down list.

When I run the VI and highlight the execution, I see the progression of execution and no error. However, nothing plots on the graph, and the value of the flow rate in the Front panel is NaN.

I have attached the VI I have modified so far. I would really appreciate any suggestions or help in achieving these goals.

 

Thank you in anticipation! 

0 Kudos
Message 1 of 2
(1,929 Views)

Hi prosperous,

 

the value of the flow rate in the Front panel is NaN.

Did you even try to debug your VI?

Did you notice where that NaN comes from?

It's your use of that Formula ExpressVI and your formula!

When you divide zero by zero then you will get NaN…

Why do you wire the "interface type" for both (!) those W1/W2 inputs of the formula node?

Why do you wire the very same timestamp value to the t1/t2 inputs of the formula nodes?

Why are you doing statistics with scalar values? What's the point of this?

 

Why do you read some string from that USB device - but never use that string later on? What's the point of reading it?

Are you sure about using the RawUSB-type communication? Does that balance don't offer any virtual COM port?

 

I would really appreciate any suggestions or help in achieving these goals.

Do the training offered in the header of this LabVIEW board: learn about shift registers!

Wire the correct values to your math routines.

Use less ExpressVIs…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 2
(1,889 Views)