LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Real-time run-time or development

On Windows I can use App.kind to find out if the VI is running in the development environment or in the runtime system.

 

On a RT target I get always Embedded LabVIEW.

 

The default directory on a RT Target is C:\ni-rt\system when runinng in the development environment and C:\ni-rt\startup when running in an application. How can I get the information in which context the VI is running?

 

Hardcoding the folder is the last option to choose.

Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
0 Kudos
Message 1 of 8
(3,655 Views)

I dont have a rt target on my PC right now but tou might be able to do this by stripping the path of the top level vi.  The application should run from the startup path.  There is also an app.application.directory shat should give you the path of the application but I have not used this with RT.  Usisally when I run on a RT target I strip the top level path to get a path I can use for file IO.

 

 

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 2 of 8
(3,608 Views)

Hi Waldemar,

 

whether you run the VI as an rtexe or from the dev. system, the VI will run on the RT system, meaning that the App.Kind property will always be Embedded.

 

You could simply read in the current path and check whether you're in startup or system, which would tell you what type of application it is.

 

Regards,

0 Kudos
Message 3 of 8
(3,594 Views)

We made a further investigation into this case.

 

 From File I/O >> File Constants >> Default Directory will give us the following paths:

 

New installed system or no startup application defined in C:\ni-rt.ini -> C:\ni-rt\system

 

Startup application defined in C:\ni-rt.ini -> The folder where the  startup application is located, normally C:\ni-rt\startup

 

 

The folder will not change regardless whether you will use the primitive Default Directory from the startup application or afterwards from the development system.

Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
0 Kudos
Message 4 of 8
(3,576 Views)

Hi Waldemar,

 

I may not have understood your last post correctly. I understand from the first part that the default directory path works as you want it to, but then you seem to say in the last sentence that it doesn't change, and so is not what you want after all.

 

Could you please reformulate the post? Have you found the answer to the original question?

 

Thanks!

Regards,

0 Kudos
Message 5 of 8
(3,551 Views)

Hi Joseph,

 

no I haven't found an answer to the original question how to find out on RT Target  if a VI is running in the development environment or as standalone application.

 

 Meanwhile I think I do not need to know this at least not for the case I need. Maybe when telling the history it will get clearer.

 

We have a PXI-System with a new installed LV RT 2009. The application needs to read in some configuration data at startup. We choose to use the Default Directory to store the files. We were starting development and at the first test we saw that the Default Directory is "C:\ni-rt\system" a place which we will never use.

Next we created a standalone application deployed it, set it as startup and rebooted the system. This time the Default Directory is "C:\ni-rt\startup". This was the point I started the thread.

Meanwhile we did some more development and when deploying the VIs from LV and starting it we also get  "C:\ni-rt\startup" although the VIs are now running in the development environment.

Next I created a standalone application and deployed it to C:\ni-rt\MyTest, set it as startup and rebooted the system. Now I get "C:\ni-rt\MyTest" until I set a new startup application or unset the startup application.

 

LV RT starts an application at boot time and the folder where this application is located will get the Default Directory until you boot the controller again. That's why I think we do not really need to know if the VI is running from the development environment or as standalone application.

Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
0 Kudos
Message 6 of 8
(3,535 Views)

Hi,

 

thanks for the clarification. I'm glad you found a solution, even if it is not the original one you were looking for.

 

0 Kudos
Message 7 of 8
(3,516 Views)
A workaround posibly to tell if you are in the Runtime or dev environment is to set a property not setable in the runtime engine and see if an error is thrown, not very clean but might work.
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 8 of 8
(3,506 Views)