01-24-2014 07:17 AM
This is running in an RT system of some sort (nice catch there, dkfire). An RT system does not have a UI. So really need to supply a set file location. And since it is an RT system, it cannot save to the C drive on your computer. It has its own file system. You need to either save the data to its own file system or make a shared folder on your computer and have it write to there (remember you have to use the network name of the shared folder).
01-24-2014 07:25 AM
Your test vi, was that runing on windows or the sbRIO ?
Like crossrulz is saying, the sbRIO do not have any GUI, so it can't display you a file dialog box, as this is Windows based.
Then you might say: " Okay but I can run my vi and see its front panel"
That is true, but was really is happening is, that you are running the code on the sbRIO and all the front panel values are transfered between the sbRIO and the PC, but the front panel stays on the PC. This is only for debug and you should not build anything for runing on the sbRIO that needs the front panel.
Try to specify a file and a path to the create file function. That could be something like "c:\test.txt".
Then the file will be stored on the sbRIO, and you need to transfer the file to your windows PC to read the file.
01-24-2014 09:21 AM
I really appreciate the help. I tried both things you suggested but am still having trouble:
1 - I typed in the file name as C:\test.txt and ran the VI. I then opened windows explorer and typed in my sbRIO cards address (\\xxx.xxx.x.xxx) to try an gain access to the file. It came back and told me the remote device would not accept the connection. Am I not accessing the file structure correctly?
2 - I created a shared folder called labviewdata in my PC root directory and gave it read/write privileges. I then wrote the filename as \\GSLOUGH-W7\labviewdata\test.txt in Open/Create/Replace File dialog as GSLOUGH-W7 is the network name of my computer. I get error 1430 Not a Path when I do this.
01-24-2014 10:45 AM
@cgs1960 wrote:
I really appreciate the help. I tried both things you suggested but am still having trouble:
1 - I typed in the file name as C:\test.txt and ran the VI. I then opened windows explorer and typed in my sbRIO cards address (\\xxx.xxx.x.xxx) to try an gain access to the file. It came back and told me the remote device would not accept the connection. Am I not accessing the file structure correctly?
2 - I created a shared folder called labviewdata in my PC root directory and gave it read/write privileges. I then wrote the filename as \\GSLOUGH-W7\labviewdata\test.txt in Open/Create/Replace File dialog as GSLOUGH-W7 is the network name of my computer. I get error 1430 Not a Path when I do this.
Both errors might be due to the same thing. I'm less familiar with cRIOs, but I have worked with files on remote PCs. When you specify a remote file, the usual notation is \\<Machine Name or IP>\<Share Name>\<Path, ending in Filename>. Oops, I didn't read your Point 2 carefully enough -- you said you did create a share called "labviewdata" and put test.txt in it, so I would have expected Point 2 to work (I'll do some experiments and maybe post a followup).
PCs treat drives as "hidden shares". If you were trying to do Point 1 on a PC (instead of a cRIO), you would say \\<IP>\c$\test.txt. I'm not sure if/how shares work on a cRIO, but you might try this.
BS
01-24-2014 11:11 AM
2 - I created a shared folder called labviewdata in my PC root directory and gave it read/write privileges. I then wrote the filename as \\GSLOUGH-W7\labviewdata\test.txt in Open/Create/Replace File dialog as GSLOUGH-W7 is the network name of my computer. I get error 1430 Not a Path when I do this.
How are the PC and cRIO connected? In particular, are they directly connected with a cross-over cable or through a simple hub? Specifying your PC as \\GSLOUGH-W7 requires DNS to "translate" that name to an equivalent IP address -- if there is a direct connection, this doesn't happen. Try using the IP address of the PC's Network port (you can find it by opening a Command prompt and typing IPConfig/all). A "hint" that this is the problem can be found in your cRIO's IP -- if it is something like 192.168.x.x or 10.x.x.x, then it is on a "private network" and almost certainly doesn't have DNS.
BS
01-24-2014 12:33 PM
Thanks Bob. The sbRIO and my PC are connected through a hub and the IP address of the device is 192.168.1.101. I did run IPConfig/all and the results are attached. I assume that I use the IPv4 address? If true, would I write the filename in the Open/Create/Replace as \\192.168.1.100\labviewdata\test.txt?
I did try this and still got error 1430.
01-24-2014 12:46 PM
Just to reiterate a point I made in a previous post, I did create a simple VI shown in simple1.jpg. This does pop up a File Name window as shown in simple2.jpg and does save data to where ever I want on my local PC.
The big difference between this simple VI and the one I am trying to get to work, is that I use the FPGA in the one that does not work. Could this be part of the problem?
01-24-2014 03:33 PM
So how does your project explorer look like?
01-27-2014 06:59 AM
Hi dkfire. An image of my project explorer is attached.