LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SubVI doesn't work on program restart

Solved!
Go to solution

I have a pretty complex main program that calls various SubVIs. All of them work except for the one I attached. Every time I close the main program or the SubVI it stops working in the main program until I open the SubVI, delete a connection and connect it again or delete and write a variable (the same value) and save. Then the main program works as it should.

I really don't know anymore what to do. Is it a bug?

Download All
0 Kudos
Message 1 of 11
(2,876 Views)

@thomas.marcus wrote:

Every time I close the main program or the SubVI it stops working in the main program...


What do you mean by "stops working"?  Wrong values returned?  Program halts when calling the VI?  LabVIEW crashes when it is called?  You get a Blue Screen of Death?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 11
(2,862 Views)

right, forgot to say that. sorry.

it returns NaN.

0 Kudos
Message 3 of 11
(2,840 Views)

Generally, around here, people don't try to debug pictures.  The reason for that is that it's impossible to debug a picture; and no one is going to try recreate a VI from a picture.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 4 of 11
(2,825 Views)
Solution
Accepted by thomas.marcus

It look's like you don't have the Feedback Node wired correctly...

 

Try something like this...

FBCapture.PNG

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 5 of 11
(2,803 Views)

Please don't post BMP images.  They are way larger than they need to be.

 

The best image for LabVIEW code is PNG.  JPEG will do in a pinch.  But as others have said, actual VIs are best.

0 Kudos
Message 6 of 11
(2,782 Views)

@RavensFan wrote:

Please don't post BMP images.  They are way larger than they need to be.


Using PNG instead reduces filesize dramatically:

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Download All
0 Kudos
Message 7 of 11
(2,762 Views)

nice, i will try it

0 Kudos
Message 8 of 11
(2,753 Views)

Don't get stuck on image size.  Post your VI if possible.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 9 of 11
(2,741 Views)

Alright, I just thought since there are so many SubVIs I don't want to upload them all, and didn't know if it works without them.

Gonna try rewiring the feedback node correctly in a minute.

Download All
0 Kudos
Message 10 of 11
(2,729 Views)