NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

LV Class member Error (BUG?): Teststand displays incorrect value got from LV vi.

Solved!
Go to solution

At my company we use a fair amount of LVOOP classes as hardware abstraction tools and such. We've started from the basic NI HAL template and modified after our needs. 

 

I found a really strange error, already lost too much time trying to figure it out what's going on..:

See Pic1, Pic2. I have a single .vi called from the 1 same single project. One gives and error (reads 0) other reads the correct expected value (see Pic3). If I put a breakpoint in the .vi, I can see that the reading was ok, but still, in TestStand, I see the measurement as 0. See Pic4. If I copy paste the good one again in the sequence, works fine. If I copy paste the wrong one, it doesn't work. 

 

I would like to find out if this is a BUG in TS/LV or I made a mistake somewhere...So I would really appreciate any help/suggestions/ideas. Thank you.

 

Download All
0 Kudos
Message 1 of 3
(2,071 Views)

Hi ZSIM,

 

This happens every single time, correct? 

In the VI, can you put a diagram disable around all of your code, and just pass back some default numerical value to see if the good and the wrong case are able to both read that? 

The only difference I can gleam from your photos are the result recording is disabled for the good case. Can you recreate the wrong case in another sequence file and use the Diff and Merge utility to differ the two sequence files to see if there is something else that is different between the two steps that is not visible upfront? 

Message 2 of 3
(2,051 Views)
Solution
Accepted by ZSIM

Hello Roxana,

 

  1. Yes, it happens every single time I run the sequence
  2. I've tried to put the Record Result Disabled on the wrong one also, same error (see pic  Record Results Disabled..)
  3. Diagram disabled:
    • When there is a default value only for the numeric indicator, same error (Default numerical value.jpg)
    • When I put a default value for the error cluster also, then the values matched. (Default numerical value + error.jpg)
    • After that I tried to run again without the error set to true, reading wasn't working.

Then I GOT it: In the Data Source tab (for the wrong step) I had something like: Step.Result.Numeric = Locals.Inrush[i] which should be the other way around. When the error was set to True, as I see, the expression from the Data Source tab isn't executed? (as I could see the value in the error pop-up + after the error was ignored, I could see it in the result).

 

But the problem didn't start from here (I'll describe it in detail, maybe somebody will find useful this info). Before these debugging steps I've been using this Inrush step without any expressions in the Data Source, still got reading as 0. Then I saw that if I open the LV project, the Class in which this vi is, was always locked, even if only 1 instance of the LabVIEW was open. If I opened the Class, became unlocked, I could close the Class, remained still unlocked in the project. I closed-reopened the project again, Class was locked. I tried everything I could find: I don't have multiple targets, and I tried these things also.

 

Solution I've found: Stop using Auto-populating folders. After I stopped using them, the Class wasn't locked anymore and it seems that also this Inrush measuring.vi also working fine now.

 

Thanks for the help Roxana!

Message 3 of 3
(2,042 Views)