LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

String-to-path does not work on cRIO?

I am running LV8.20 on my laptop and cRIO-9012.  The laptop runs Win XP SP2.
 
From the attached snapshot, you can see that I am trying to form a file path from concatenated strings, using the string-to-path node.  When I run this vi in Windows target, it works perfectly.  The "x=y?" boolean returns true.
 
When I run it on CompactRIO, I get error 1430 ("The path is empty or relative.  You must use an absolute path.").  The "x=y?" boolean returns false.  I have already created the "paths" subdirectory on cRIO with an FTP utility.  If I wire the file path definition constant (as opposed to the one generated by string-to-path) directly to the "open file" node, cRIO recognizes it and writes the file... usually!
 
What am I missing?  Any help is greatly appreciated.
 
By the way, I don't know how the "Wait for front panel activity" nodes work (also shown in the snapshot), but they certainly don't seem to cause the program to wait for front panel activity.  Both in Windows and cRIO targets, they seem to be completely ignored.
0 Kudos
Message 1 of 5
(4,137 Views)

I am not familiar with cRIO, but most likely, the path syntax is different that on Windows.

Path constant automatically adapt to the current OS, but strings are just strings. Try the following:

Make a path (not string!) constant containing "c:\paths\", then use "built path" to combine it with the filename. Don't use "concatenate strings" and "string to path".

 

Message 2 of 5
(4,125 Views)
David:
 
Most of the time, this error is thrown when LabVIEW FPGA cannot resolve a specific I/O node used in the FPGA VI. It is possible that the name of an FPGA I/O was changed in the Project Explorer with
the FPGA VI closed and then the FPGA VI was compiled. Since the FPGA VI was not updated with the new I/O node, LabVIEW FPGA cannot resolve the specific IO node reference.
 
In order to verify that this is actually the source of the problem, create a new project from scratch which includes some I/O, create a new FPGA VI that uses these I/Os and then try compiling it. If the compile is successful, then the resolution to this problem would be to check the original FPGA VI and make sure that it has valid I/O nodes corresponding to the ones defined the Project Explorer.
 
I hope this helps and please let me know what you find.
 
Regards,
 
Rudi N.
 

Message Edited by Rudi N on 04-24-2007 02:27 PM

0 Kudos
Message 3 of 5
(4,109 Views)

Hi David,

The cRIO-9012 and cRIO-9014 controllers run on a VxWorks Real-Time OS.  VxWorks uses unix-style paths, so you have to give it paths that are valid for unix-style OS, for example ( /c/folder/subfolder/filename.txt ).

Regards,

Steve Bassett

Message 4 of 5
(4,091 Views)
As altenbach and Bassett Hound suspected, the file syntax was the key issue.  Much obliged for your rapid responses!
0 Kudos
Message 5 of 5
(4,031 Views)