LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sub VI location on deployment to LV Real Time

I'm trying to dynamically launch a Sub VI deployed to Labview real time using the Start Asynchronous Call command. My method worked fine in development on my windows PC but when I deploy it to real time (not a build, just hitting the run button), it chokes at trying to find the SubVI's file. Specifically I get error 7, unable to find the Sub VI.

 

The code that was working on the windows PC consisted of building a path to the file using the Application Directory constant and the name of the sub_VI. So my question is, where are the SubVI's deployed to upon clicking the run button? I've tried deploying then looking everywhere on the RT system via FTP but can't find anything anywhere.


Can someone please give me some insight?

0 Kudos
Message 1 of 12
(2,745 Views)

Hey Alex,

 

Have you tried building your code into a real time executable and running that on your target? I'm curious to see if the issue is limited only to when you're running the VI on the target in interactive mode. Have you also tried deploying the code by right clicking the target and using "Deploy" or "Deploy All"?

 

Also, it would be very useful if you could provide a screen shot of your Project!

Tim A.
0 Kudos
Message 2 of 12
(2,724 Views)

Hey Tim,

 

I tried that earlier but got it wrong (I deployed the project but didn't run the deployed package, was still running the development environment). At the moment, I've figured out I'm going to have write a network transport set-up to get the data being generated by the RT target back to the host for monitoring. So I can't tell you yet whether it deploys properly as I don't have access to any status info!

 

Will get back asap.

0 Kudos
Message 3 of 12
(2,718 Views)

I've set everything up, created a build, deployed it, verified it runs (at least when I select run on startup). Verfied I can connect to it, yada yada. I finally got it setup such that I have it deployed and I want the host VI to programmatically launch the RT VI, but I keep getting the bloody "Error 7" file not found. I've searched the knowledge base and all I get is some thing telling me to open the VI in my host code, save and redeploy to reversion it. I've literally just saved and deployed it and I'm still getting this error. What the hell is going on?

0 Kudos
Message 4 of 12
(2,711 Views)

Ok, here's a picture of what I'm trying to do. I think my problem might have to do with having to use the strictly typed reference to use the Asynchronous call.

 

LaunchCode.png

 

There's a couple of things going on here, basically, because I have no idea how to path to the VI I want to launch, you can see a bunch of my attempts in the above code, one by stripping the path from the main code, the other just trying to wire the name of the VI straight in. I've previously tried using the App.Dir constant to build a path, as mentioned earlier.

 

I've tried moving all my Sub-VI's out of their folder into the same folder as the main VI on my development computer (hoping that they would keep this arrangement on deployment), no luck.

 

I'm honestly completely stumped

 

I've also tried building a Labview RT distribution, deploying it and then running that via FTP and connecting. Running it as startup and connecting. Absolutely nothing I've tried works. I get file not found, file not in memory, VI reference not valid (that one is when I'm trying to launch a Sub-VI that takes an FPGA ref as an input).

 

In addition to this nightmare, I'm also having a probably directly related nightmare with trying to launch my deployed RT distribution via VI Server from my windows host code. I've read everything I can find about this and it all gives the same useless advice. There is almost nothing directly related to using the asynch call, which I'm beginning to think might be the problem.

 

Just for completeness sake, below is a pic of the state that launches a Sub-VI which requires an FPGA reference, this one used to give not a vaild GPIB (file not found) but now gives "not a vaild VI reference". So awesome on all fronts really.

LaunchCode2.png

0 Kudos
Message 5 of 12
(2,708 Views)

Ok, after playing with some Network Shared Variables to give me some status indicators in my host code. I've managed to fire up the built Labview Real-Time Package code and get some of the VI's successfully launched. The solution was just to create a build and deploy it. I was stumped by my own reluctance to use network shared variables as my status indicators so I didn't have any information about whether the VI's were launching.

 

What's interestin though, is that when in development mode (i.e. just hitting the run arrow without using a build specification) the Sub-VI's say they are deploying, but give errors when you attempt to call them. I would really like to know why this is as it really messes with workflow and debugging.

0 Kudos
Message 6 of 12
(2,704 Views)

Hey Alex,

 

I built an example code VI that I'm running on a cRIO-9075. Here's some screenshots of what I've done. 

 

I have a main VI that sends two numbers to a SubVI and then adds and displays the Result. 

 

mainVI.PNG

 

The subVI is just multiplying the numbers and outputting them. But, more importantly its extracting and outputting its own path. 

 

subVI.PNG

 

I ran this these VI's in Interactive mode (Just pressing run to deploy my code) and the output VI path for the subVI is shown above. So my guess is that when you're running in activation modethis is where the SubVI is being stored. I would maybe try using this VI path to build your reference and see if you can Call your subVI that way?

 

In the last part you mentioned that you wanted to tell if the VI's were launching by using variables. You can also use the Distributed System Manager to monitor what VI's are running on yourtarget using the VI States option. In order to do this you will have to install the System State Publisher onto your Target though. 

Tim A.
0 Kudos
Message 7 of 12
(2,693 Views)

Hi Tim,

 

Thanks for your example but it's somewhat trivial, could you try the same example but launch the sub-VI dynamically using the start asynchronously command and see if it will still launch it when you hit the run arrow?

 

Cheers,

Alex

0 Kudos
Message 8 of 12
(2,684 Views)

Bump for attention regarding not being able to path to and run Asynchronously launched VIs in development mode. Also incidentally, would like to register my surprise and disgust that the only way to run a deployed Real-Time application is to reboot the system. That is literally the stupidest thing I've ever seen for work flow.

0 Kudos
Message 9 of 12
(2,669 Views)

If anyone has any insight into how to launch VI's asynchronously in LV RT Development, please, please enlighten me, I'm crippled with respect to being able to debug what's going on in my code.

0 Kudos
Message 10 of 12
(2,662 Views)