12-16-2015 07:31 AM
Hello all. I'm using LabVIEW 2011. I tried a simple application to publish a PV in a EPICS Server. Everything runs well when I start the application inside LabVIEW. The problem occurs when I build an exe. When the exe is running I can see the shared variable updating in NI Distributed System Manager, but the PV VAL field keeps showing No Known Value. If I click on Stop button inside de EXE, run the application inside LabVIEW, stop the application in LabVIEW an press the Run button in the EXE, then the PV keeps updating normally.
Application VI:
Project organization:
EPICS Server configuration:
Shared Variable Build Configuration:
Result running EXE (shared variable updating values, but not EPICS PV):
Result running inside LabVIEW (Ok):
Solved! Go to Solution.
12-17-2015 07:15 AM
12-17-2015 07:52 AM
Hello, Abel. I checked the option and rebuilt as you suggested, but the result is the same.
12-17-2015 09:48 AM
You van verify if you check option to deploy shared variables during application execution.
http://digital.ni.com/public.nsf/websearch/04D9A85B6967EE87862571140065EEC6?OpenDocument
12-17-2015 10:51 AM
Hello, Abel. In the fourth image of my post I showed this option already checked.
In the fifth image I showed the shared variable AIA0 working correctly, but not the PV IR:NI9215A:AI0, that is associated with the shared variable AIA0. In fact, when I run the EXE, I can see some messages showing quickly and some of them say that the variables are being published.
12-17-2015 01:12 PM
12-18-2015 07:38 AM
Abel, I forgot to mention that I'm not using a cRIO in this build. I'm running the EXE in Windows. The "crio" in the names of the project objects are from a previous test.
12-18-2015 02:47 PM
Marciodo,
I think Abel's suggestions are pretty good. Based on your description it looks like your library is not deployed when you run it as an exe despite the fact you have it checked in the build spec.
I would also try selecting "Undeploy shared variable libraries at application exit" and see what happens.
If this doesnt work then I would implement a programatic library deployment. That is also covered in the KB Abel shared earlier.
Just curious, are you testing everything (exe and vi) on the same computer? Is LabVIEW project open while you run your exe? I dont think this should matter but curious to see if it has any impact on your problem.
Also put a Wait function in your while loop so you dont rail your CPU.
Miro_T
01-15-2016 04:34 AM
Hello, Miro.
In fact, implementing a programatic library deployment did the work. Now I can run it perfectly. But, until now, I can't understand why the building spec did not work. I even could see the messages in pop-up saying that the EPICS server and PVs where being deployed.
Answering your questions:
- Select "Undeploy shared variable libraries at application exit".
- Didn't work.
- Are you testing everything (exe and vi) on the same computer?
- Yes.
- Is LabVIEW project open while you run your exe?
- I tested it with LabVIEW opened and closed. I also rebooted the computer and tried to run the exe before LabVIEW with no success. The only way it worked was running the exe, pressing the Stop button, running the application in LabVIEW, pressing the Stop button and pressing the Play button in exe application. Quite a wierd behavior.
- Put a Wait function in your while loop so you dont rail your CPU.
- In fact I forgot it. I built this test application in a hurry because my original code was not working and I needed to remove the most complexities to isolate the problem.