10-27-2015 05:23 AM
hi,
Hopefully a quick question. can anyone point me in the right direction as to why my CRio is offering the following error message:
The program has been running happily for a few months. Today I seem to of included an undesirable character.
10-27-2015 05:28 AM
Did you run out of disk-space on the cRIO?
10-27-2015 05:37 AM
That was our first thought - deleted all the large data files so there should be some space
10-27-2015 05:42 AM
Is there any particular reason why you are writing to a binary file instead of a text file?
Does the 'File Name' global get written to anywhere in the code?
Is the path correct? It doesn't look right to me but then you say that it's been working fine for months so unless the path has changed, it should be fine. See here for details of paths on RT targets: http://www.ni.com/tutorial/14669/en/
How do you write to the path global?
10-27-2015 11:03 AM
Your filename is invalid. It should look like a normal Windows filename (ie C:\LabVIEW Data\newrun.txt). "ni-rt" is not a valid drive letter. Make sure the folder exists on the cRIO as well.
10-27-2015 11:20 AM
I've tried many permeations of drive identities none of which work.
As I understand C drive should be the hard drive on my cRio 9024 and therfore read c:\ni-rt\LabView Data\....
But I get the same error.
10-27-2015 11:22 AM
Does the folder C:\ni-rt\LabVIEW Data exist on the cRIO? What if you simply make the path C:\filename.txt?
Are you sure you're running this code on the cRIO, versus running the code on your computer and simply using the cRIO for data acquisition?
10-27-2015 11:25 AM
Yes, the folder is setup and is where we've been data logging to for a few week.
10-27-2015 11:31 AM
Put a probe on the File Name global variable - what is the value?
Maybe you've accidentally included a new-line character in the path. I've seen this situation before: the user is allowed to enter a filename into a string control, and the string control is not set to "Limit to Single Line." The user hits "enter" thinking that it will end data entry, but instead it puts a newline in the string control, which makes it look like the string control is empty (because it's only tall enough for a single line). Then the user re-enters the filename, and gets an unexpected error when the code tries to log data.
10-27-2015 11:59 AM
Hi
Thanks for all the advice. You was kind of right earlier. Everything was running via PC so the path ni-rt:\ wasn't understood and C:\ refered to my C drive on my pc not on the cRio. I reinstalled the program on cRio and all is well.
ni-rt:\LabVIEW Data\.... WORKS!!!
Thought I was going mad.
Not sure why I'd lost the program on cRio though