LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with linking my Signal to my own sub VI

Solved!
Go to solution

Hi 

 

The first picture is my main VI and the Blue icon is the sub VI that i made , however there is an error as shown in the 3rd picture when i run it.

 

In the subVI (2nd picture), i am using a polynomial 1st order to  fit my original signal and perform more calculation. If I have used those functions and paste it in the main VI and it was working when i run the main VI.

 

I took out those functions and made it into a sub VI and it gave error when i run the main VI. I could not figure out the problem.

 

Could anyone help me on this. Thank you 

 

 

 

sub vi.png

 

 

 

 

 

 

 

 

 

 

 

 

 

sub vi pic.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

error.png

 

0 Kudos
Message 1 of 6
(3,039 Views)

Hi pengxin,

  First of all you are using your subvi in a wrong way.See your subvi is expecting an integer value where as you are giving a dynamic data type.So what you can do is to convert the dynamic data type to proper data type using convert from dynamic data type express vi and try.

 

 

Thanks and regards,

srikrishnaNF

Regards,
Srikrishna


0 Kudos
Message 2 of 6
(3,034 Views)
It's your input to the subVI. You've got a scalar and of course you can't do a curve fit on a single point. You can see the red dot on the input to the subVI. That means that the dynamic data type is being coerced to something else. You can use a waveform data type as an input. Or, right click on the Signals input and select Create>Graph Indicator then right click on that and select Change to Control. Personally, I hate the dynamic data type and would use the simpler waveform data type.
0 Kudos
Message 3 of 6
(3,029 Views)

Hi 

 

Let me try it now . If you have time u can paste me an VI to see the solution you mention Smiley Happy

0 Kudos
Message 4 of 6
(3,015 Views)
Solution
Accepted by topic author pengxin
Here's a VI. Use one or the other.
0 Kudos
Message 5 of 6
(3,011 Views)
Thank you Krishna and Dennis !!!
0 Kudos
Message 6 of 6
(2,994 Views)