LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

File Dialog error in cRIO Project

Solved!
Go to solution

Dear all,

I am working on a project with CompactRIO but I got a problem with File Dialog.vi in LabVIEW. When I put my *.vi outside of the Hardware (cRIO) it work properly. But when I put my *.vi inside the cRIO, nothing happens. Please help me with this small problem.

Thanks allFileDialog.pngFileDialog_1.png

0 Kudos
Message 1 of 9
(4,221 Views)

Hi d4,

 

you forgot your cRIO is a computer of its own! And you forgot it is "headless"!

 

- The cRIO has NO ACCESS to the harddrive in your Windows computer so it just don't know where to look for the path "D:\…"!

- The cRIO has NO MONITOR ATTACHED so it cannot even display a FileDialog (or any other UI at all)!

 

A VI always runs in the context of the hardware target it is located in the LabVIEW project.

And such VIs have to obey the limitations of the hardware target they are run on…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 9
(4,180 Views)

Dear GerdW,

Thank you for your quick reply.

Btw, there are any solutions for me to choose a virtual folder as a path? Hope you can still help me with this problem.

 

 

FileDialog_2.png

 

Best Regards,

D4n

0 Kudos
Message 3 of 9
(4,172 Views)

Hi d4,

 

what is a "virtual" folder? Where is the folder located?

 

- With a cRIO you can use any folder that is present in the cRIO file system: anything under the "c:" path. (Use MAX or a webbrowser to check the file structure in your cRIO!)

 

- With a cRIO you CANNOT use any file dialogs as the cRIO has no display or UI - you most likely will use a constant path (or a path generated by algorithm).

- With a cRIO you CANNOT access your PC's harddrive…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 9
(4,160 Views)

Dear GerdW,

The "virtual folder" means "Data" folder as the below picture. And when I check the "Current VI's path", it shows me that "c:\ni-rt\startup\Test_1.vi". So the path of "Data" folder is "c:\ni-rt\startup\Data", right? 
Thank you so much

 

FileDialog_3.png

0 Kudos
Message 5 of 9
(4,151 Views)
Solution
Accepted by topic author d4nvjpl0ng4n

Hi d4,

 

the virtual folder in the project is not related to a path on the cRIO.

In my cRIO projects a I also use virtual folders in the cRIO part of the project - and they all just collect files located on my development PC…

 

When you want to access certain files (like configuration settings or similar) you can include those files in the AppBuilder settings for your RTEXE. Then those files will be copied to your cRIO, and are to be found at c:\ni-rt\startup\data. (I'm not quite sure on this path right now, as currently I use a cRIO9066 employing a different file system.)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 6 of 9
(4,146 Views)

Thank you so much GerdW, 

I will try to work with it for a time. Then if I still get trouble with it, I will ask later. Thank you again 😘


Best Regards,

D4n

0 Kudos
Message 7 of 9
(4,143 Views)

Dear GerdW, 
could you help me to solve this problem in this link
http://forums.ni.com/t5/LabVIEW/cRIO-WEB-SERVER-ERROR/td-p/3281873
It is urgent! please help me.. thank you so much

0 Kudos
Message 8 of 9
(4,085 Views)

Hi d4,

 

remark on your last post: it is considered rude behaviour to bump threads for no good reason!

When you want to have more attention to your other thread you should bump that other thread and not this one here!

 

To answer your question: No, I can't.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 9
(4,024 Views)