LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Loading an INI file to cRio and reading/writing

Solved!
Go to solution

Sorry, the previous message did not attach. The problem is only with the file entry when I transfer it to a different folder, different from the folder where the exe file is installed.

Download All
0 Kudos
Message 11 of 32
(1,046 Views)

Hi AndryG,

 

The problem is only with the file entry when I transfer it to a different folder, different from the folder where the exe file is installed.

Which error?

Where is the file located?

Did you check and probe the file path?

Is this still related to a cRIO?

Why did you "transfer" the file to a different folder? Did you adapt your file loading routine to this changed folder?

Again: did you debug your VI?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 12 of 32
(1,033 Views)

It's easier for me to give you my vi, try to make an exe file out of it, write it, read it and transfer it to another computer, for example, creating a folder in which the project files will be located and you will understand everything yourself, I certainly debugged vi.

Regards)

0 Kudos
Message 13 of 32
(1,029 Views)

Hi AndryG,

 

I certainly debugged vi.

So which error do you get (in the executable)?

And which file path is your EXE trying to access?

 

When debugging such stuff in an EXE I usually use some additional Dialogs to show these values. Or I log them to a file …

 

Nevertheless AppDir should be the folder where the EXE is located in. Then you build a path of AppDir\NameDir.ini - but "Name Dir" is empty in your VI…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 14 of 32
(1,022 Views)

You can enter any name of the file name if it does not exist, then vi will create it, if it is, it will overwrite the values in it, the file name is also the key for the ini file. I also use dialog boxes, but they stand in the main program, then vi. The message is issued when you try to create a new configuration file:

0 Kudos
Message 15 of 32
(1,018 Views)

Hi AndryG,

 

can you repeat the test with a name consisting just of English (ASCII) chars?

Just to make sure it's not a problem because of using cyrillic letters…

 

Please try with path "C:\users\andry\Desktop\Test\Configuration1.ini" instead of cyrillic "Test\konfiguracia"!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 16 of 32
(1,018 Views)

Ok.All the same)

0 Kudos
Message 17 of 32
(1,015 Views)

Hi Andry,

 

there are still cyrillic chars. Did you (carefully) read my message?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 18 of 32
(1,012 Views)

Aldeady no!

0 Kudos
Message 19 of 32
(1,009 Views)

Now there is a ")" in the path. And additionally it seems to include a line break.

Did you notice this error about "invalid chars"???

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 20 of 32
(980 Views)