07-23-2019 11:12 AM - edited 07-23-2019 11:13 AM
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.
Solved! Go to Solution.
07-23-2019 12:31 PM
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?
07-23-2019 01:19 PM
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?
07-23-2019 02:51 PM
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.
07-23-2019 03:56 PM
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?
07-23-2019 04:05 PM
@edgemfg wrote:
... using the "First Call?" function?
Yes.
07-23-2019 04:22 PM - edited 07-23-2019 04:23 PM
Misread the post. ignore.
07-23-2019 05:16 PM
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.
07-24-2019 06:36 AM
@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.
07-24-2019 07:17 AM
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?