LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

RT VI won't run from source distribution after reboot

Solved!
Go to solution

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

0 Kudos
Message 1 of 14
(4,502 Views)

Hello,

 

In your distribution, do you also distribute the *.ini of the RT controller with the following option "RTTarget.LaunchAppAtBoot=True"

 

Michel

0 Kudos
Message 2 of 14
(4,494 Views)

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.

0 Kudos
Message 3 of 14
(4,485 Views)

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?

0 Kudos
Message 4 of 14
(4,459 Views)

Here's the call:

 

VI Server Remote Call.png

 

The setting of auto-dispose doesn't seem to affect the issue.

0 Kudos
Message 5 of 14
(4,451 Views)

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?

0 Kudos
Message 6 of 14
(4,444 Views)

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.

0 Kudos
Message 7 of 14
(4,435 Views)

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.

0 Kudos
Message 8 of 14
(4,423 Views)

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

0 Kudos
Message 9 of 14
(4,364 Views)

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:

 

  • Power up my target
  • Power up my host laptop
  • Execute my host front-end controller
  • Run my top-level VI (From a selection of alternate source distributions representing different major test types) on the RT target from a VI server call on the host
  • Test
  • Shutdown the top-level VI

So, the target's VI server must respond to the run VI method right from boot-up.

0 Kudos
Message 10 of 14
(4,355 Views)