From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

NaN input to a sub-vi

Solved!
Go to solution

Hi,

I have got a sub vi for finding out the derivative which has got a double input.

The sub-vi is inside a while loop and input going is double value only. but inside the sub-vi it is showing "NaN" input and the sub vi is giving an " NaN" output.

Thanks in advance

@nk
0 Kudos
Message 1 of 9
(2,910 Views)

What you are saying does not make a lot of sense. Can you also show us the calling program?

 

(Instead of the express VI, it would seem more reasonable to use the ptbypt derivative function.)

 

 

0 Kudos
Message 2 of 9
(2,905 Views)

Ya actually I too felt because the input is going as a double and then inside sub Vi it is showing NaN .

That is why i got confused.

I have attached an extraction vi ,whose output is E1 and E2 from these two values am finding out the dx/dt( derivative). I have used Ni usb 5133 for the input of that extraction Vi

@nk
Download All
0 Kudos
Message 3 of 9
(2,895 Views)

@nk wrote:

Ya actually I too felt because the input is going as a double and then inside sub Vi it is showing NaN .


Well, NaN is a DBL.

 

Sorry, I don't understand how the extraction VI you now show relates to the original problem. Please explain.

0 Kudos
Message 4 of 9
(2,869 Views)

The output of extraction vi is E1 and E2( two double values), these values are given to this threshold.vi like E1 as input to one sub vi , E2 to the other.

@nk
0 Kudos
Message 5 of 9
(2,865 Views)

E1 and E2 are arrays. The input of the subVI is a scalar. You simply need to describe things better.

 

Why can't you show us a version that actually calls the subVI in question?

 

0 Kudos
Message 6 of 9
(2,855 Views)

E1 and E2 are arrays , I am sorry x/y and x/y 2 are given as inputs for the sub vi.

@nk
0 Kudos
Message 7 of 9
(2,837 Views)
Solution
Accepted by topic author @nk

Why don't you make yours and our life easier by simply attaching the actual VI instead of an oversized truncated image?

 

Since the same subVI is used in parallel on many different inputs, you need to make it reentrant, else you only get one instance onf the internal express VI and it will scramble everything, guaranteed!

 

As I said before, I recommend to used the ptbypt derivative VI. That's all you need.

Message 8 of 9
(2,800 Views)

Thank you for the help and consideration

@nk
0 Kudos
Message 9 of 9
(2,780 Views)