01-20-2016 02:28 PM
Here's a weird one...
I have a very complex application. It runs great from the development environment. It also runs great as a startup rtexe (No GUI). When I build a source distribution and deploy that to a path on the RT controller...
VI Server invoke method shows NO errors but the VI doesn't appear to be running. If I open a project, right click on the target, and click "Connect", suddenly the invoke starts to work. I suspect there needs to be some way to configure the VI server settings for the RT controller on-boot, but I don't know how that is done or why I would not get an error prior to selecting Connect in a project. Any ideas?
Thanks,
XL600
Solved! Go to Solution.
01-20-2016 02:45 PM
Hello,
In your distribution, do you also distribute the *.ini of the RT controller with the following option "RTTarget.LaunchAppAtBoot=True"
Michel
01-20-2016 02:59 PM
I don't use an rtexe so RTTarget.LaunchAppAtBoot=True shouldn't have any effect.
Also, I noticed that the c:\ni-rt.ini file stays the same after boot and after 'Connect' (No differences). But it's only after "Connect" does the VI server seem to come alive.
01-20-2016 03:47 PM
Can you give more details (or post a screenshot) of how you call the VI remotely and later close the reference? Do you have a True or False wired to the "Auto Dispose Ref" input of the invoke node?
01-20-2016 03:51 PM
Here's the call:
The setting of auto-dispose doesn't seem to affect the issue.
01-20-2016 04:01 PM
Hmm.. The target VI should run until you press the stop button on the host. Have you tried testing it with a less complex target VI, such as a simple while loop with a toggling boolean or LED?
01-20-2016 04:04 PM
Yep. That's what I'm doing now. Just a simple VI which increments a shared variable. Same behavior.
The VI server call will only work if I perform a "Connect" in my project (Or run any VI which causes a connect), but not after a reboot of the RT Target. It's like the RT Target refuses to start its VI server on boot.
01-20-2016 04:20 PM
Get this...
On a hunch, I created a rtexe startup application (A blank VI) then set that as the startup application. Of course, it terminates immediately upon being called. But after that, my RT target VI server started responding (On bootup) on the port as configured in ni-rt.ini!
This seems like a bug to me. VI server should be running and responding on bootup based on ni-rt.ini without having to have a startup rtexe (I wonder what those without application builder are to do?). Is this a known behavior of LabVIEW RT (PharLap) because I haven't been able to find any mention of this.
01-21-2016 08:41 AM
HI,
For what i saw I think that this documetantion may help you:
http://digital.ni.com/public.nsf/allkb/FC57CE7F6C1E2EA486257ECF007892CC?OpenDocument
http://digital.ni.com/public.nsf/allkb/E2F8C8D4270CCC62862574440054E894?OpenDocument
http://zone.ni.com/reference/en-XX/help/370622L-01/lvrtdialog/rt_source_distrib_db/
They may be related with the issue your are having (source distribution)
Regards
M
01-21-2016 08:56 AM
Those were my original "Go to" docs for understanding startup rtexe and startup VIs (In LV2015). There's no mention of why the RT target's VI server would not be active upon boot when a startup rtexe or VI is not configured. The issue I've run into is that when my RT target (LV2015 RT) is booted without a startup rtexe or VI, the VI server will not respond to remote execution calls from my host application (And doesn't report an error either). I think this is a bug which can be worked around by simply starting a rtexe or VI (Even if empty). That seems to kick-start the RT Target's VI server into properly responding.
My use case here is:
So, the target's VI server must respond to the run VI method right from boot-up.