LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

data logging

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).



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 11 of 19
(1,283 Views)

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.

 

 

Message 12 of 19
(1,281 Views)

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.

0 Kudos
Message 13 of 19
(1,271 Views)

@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

0 Kudos
Message 14 of 19
(1,255 Views)

 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

Message 15 of 19
(1,241 Views)

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.

 

 

0 Kudos
Message 16 of 19
(1,229 Views)

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?

Download All
0 Kudos
Message 17 of 19
(1,222 Views)

So how does your project explorer look like?

0 Kudos
Message 18 of 19
(1,188 Views)

Hi dkfire.  An image of my project explorer is attached.

0 Kudos
Message 19 of 19
(1,164 Views)