LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SubVI Deployment Problem

Solved!
Go to solution

I have a SubVI within my Main vi that filters the noise of the data in an array. I then plot this filtered data onto a waveform graph along with another data set that is filtered using a duplicate of the same SubVI so I now have two plots on one graph. The problem occurs when I run the executable on the deployment pc. Only 1 of the SubVIs pass the filtered data through and is plotted. The other SubVI passes “NaN” through and nothing is plotted. I have setup the SubVI as a reentrant as well as tried to make duplicates and rename them. Both situations would only have one of the SubVIs passing filtered data through. At this point I am unsure as to what could be the problem.


I would like to also point out that I have three separate graphs with the same inputs as stated above, each with their own 2 sets of filtered data. In both situations, 2 of the 3 graphs would do that same thing as mention and 1 of the graphs would plot both sets of filtered data. They are all using the same SubVI which is why it is throwing me off when one graph works but the other two don’t.


The problem only occurs on the deployment pc but works fine on the development pc. I have tried running the executable on different pc’s but would still have the same problem occur. I don’t know how to recreate the problem since it only happens during deployment. The vi attached is how my Main vi is setup where the SubVIs are involved. Any help would be appreciated. Thanks.

Download All
0 Kudos
Message 1 of 13
(2,804 Views)

When I open the subVI, I am not allowed to save it.  Says "The VI already exists and you do not have permission to replace it."  Turns out the VI was set to read-only in Windows properties.  Could that be causing some of your problems with deployment?

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 2 of 13
(2,760 Views)

I have never messed with those properties so read-only was unmarked for the VI on my side. And I never had issues with saving or editing the SubVI, I don't think that could be the problem. Am I attaching the file to the post incorrectly to make it read-only?

0 Kudos
Message 3 of 13
(2,742 Views)

I downloaded the file again and it wasn't marked read only.  Not sure what caused that.

Anyways, I built your files into an EXE and it works as I would expect.  

When you say it works fine on the development PC, are you talking about as an EXE or in the development environment?

Is the deployment PC different in some way (OS, LabVIEW version, runtime version,  etc.)?  

Have you tried to initialize the filter?  Maybe there are some residual values stored in the filter that cause it to keep outputting NaN.  

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 4 of 13
(2,714 Views)

I ran it in both development environment and as an EXE on development PC and both ways were working as intended. But when run on as an EXE on the deployment, it did not work so I thought the same thing that it might have something to do with the PC. The PC for deployment has the same specs as my development PC and so are the versions. 

 

I just ran the EXE for the Test Example.vi on the deployment PC and it works. That narrows it down being something with the Main vi. I have not tried initializing the filter and sounds like a good option but I don't know how to go about doing that. Are you meaning to initialize it like I do to the 2D array or is there another trick in doing that like using the "First Call?" function? 

0 Kudos
Message 5 of 13
(2,695 Views)

@edgemfg wrote:

... using the "First Call?" function? 


Yes.

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 6 of 13
(2,690 Views)

Misread the post.  ignore.

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 7 of 13
(2,683 Views)
Solution
Accepted by topic author edgemfg

There's another main.vi?  Sorry, I thought you were experiencing these issues with the Test Example VI but, in hindsight, I can see that this was just to showcase the structure of your program.  Yes, I would look at the "random numbers" in the Main VI and make sure none of them output a NaN.  

 

You should also be concerned about that array in the shift register that is growing unchecked.  If you only care about the most recent 100 values, I would look into the pnt-by-pnt VIs, specifically the data queue variant.  This would simplify your BD quite a bit.  I initialized the queue with a constant but you could also use the First Call function.  

2019-07-23_17-09-58.png

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
Message 8 of 13
(2,667 Views)

@aputman wrote:

I initialized the queue with a constant but you could also use the First Call function.


Or just leave it unwired.  The VI ORs that input with a First Call? function inside, so you get your initialization for free.


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
0 Kudos
Message 9 of 13
(2,632 Views)

Maybe you got this result because you use a inicialise array functions. That function create an array with choosen value only in first call. Maybe you need do like this way?

 

0 Kudos
Message 10 of 13
(2,619 Views)