From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
10-29-2014 02:38 AM
Hi,
The "check if file or folder exists?" returns false when there is a folder in c drive. So I added a "create folder" if false. Now it returns true, but there is no file in c:
What could be the problem?
10-29-2014 02:48 AM
Hi kdm,
could you attach the VI or at lest the part where you check the folder presence do debug it?
10-29-2014 03:03 AM
kdm7 wrote:The "check if file or folder exists?" returns false when there is a folder in c drive. So I added a "create folder" if false. Now it returns true, but there is no file in c:
What could be the problem?
We need more details. Whatever you wrote is very confusing:
You need to show us your code.
10-29-2014 03:46 AM
I meant after I create a folder, there is no folder( therefore no file too) in c drive.
Here is my code.
10-29-2014 03:50 AM - edited 10-29-2014 03:52 AM
Hi kdm,
you should have learned by now that attaching just a LVPROJ file will be (mostly) senseless.
We need your VIs!
Judging from your LVPROJ file:
Where did you check the file/folder creation?
There are two VIs in your sbRIO target. When you create files/folders on your sbRIO you will have to check for their presence on exactly that sbRIO target!
10-29-2014 04:01 AM - edited 10-29-2014 04:06 AM
I checked for it in the test2_rt(2) vi.
What do you mean by "When you create files/folders on your sbRIO you will have to check for their presence on exactly that sbRIO target!"?
(I checked it in c drive. Can't I create log file on c drive?)
Here are my VIs.
10-29-2014 04:10 AM - edited 10-29-2014 04:12 AM
Hi kdm,
you didn't say where you checked for those folder(s) and file(s)…
But your "test2_rt (2).vi" shows a big, very big, HUGE problem:
You create a file path by using string constants. THAT'S PLAIN WRONG! Use path constants whenever you want to handle paths!
10-29-2014 05:12 AM - edited 10-29-2014 05:22 AM
Hi Gerd,
Now I've changed it. Thanks.
But I'm still not able to find the log file. I checked it in c drive.
I use sbRIO 9641. How do you check whether it is on the sbRIO target?
There is small green circle on the "NI-sbRIO9641-01624006" line. It indicates that the device is connected and I have the VIs under them. Does that mean I'm on the sbRIO 9641 target?
10-29-2014 05:24 AM
Do you make sure to create the NewTest directory before writing to a file in it?
Do you check the error that CreateDirectory returns?
Do you check the error that Write to Spreadsheet file or whatever other function you use to write to the file does return?
10-29-2014 05:56 AM
Hi rolfk,
Yes, I have the NewTest folder created.
No error returned from create folder
No error returned from Write to text file either.