LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

save file via network

Hi

I'm trying to save a simple textsheet file (*.txt) via a small network.
I want to save data from my rt-engine (CVS1455) to my host computer.
My problem is, how do I define a filepath to save my txt-file?
Currently I'm using the "create new-file.vi" and the "write to file.vi". At the moment I only get error messages (errorcode 7). So I think my filepath is not correct. It looks like this: \\192.168.10.x\data\datafile.txt.
 
My host-pc has Windows XP installed and I use labview 7.1 for programming.

Hope someone can help me. Thanks
0 Kudos
Message 1 of 14
(6,509 Views)
make sure you have permission to access the folder you're trying to access
 
try to:
1. make a new vi (don't have to save it)
2. put a path control on the front panel
3. paste the address you have \\192.168.10.x\
4. click on the little browse folder, it should open up the data folder in your host machine.  if not, that means you don't have access or the ip address is wrong.
0 Kudos
Message 2 of 14
(6,499 Views)
Hm - that's interesting.
 
I just tried it using the ip of my computer ( \10.2.xx.yy\C ) and pushed the browse button - and LV did not react anymore.
In addition I was not able to terminate it.
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 3 of 14
(6,493 Views)

really??... that's really bad...

did you have 1 '\' or 2 before your ip?  it worked on my LV 8 on WinXP...

** i think it freezes when the address is invalid... it did that when i mistyped my ip, also, when i put my computer ip in there and hit browse, it took me to my folder in the network instead of my computer, not sure if this is caused by the way the network's setup in my company or what... **

Message Edited by Elsa Fung on 01-18-2006 07:13 AM

0 Kudos
Message 4 of 14
(6,494 Views)
I typed two "\" (I just left one out in the post to keep it as text).
 
I also tried it with network-name of my computer and I got the same result. LV froze, I could not close the window and I was not able to terminate the process either.
 
As you may have seen I use LV7.0 on WinXP professional.
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 5 of 14
(6,485 Views)
hmm... did you try taking out the C drive part? (just use the \\xxx.xx.x.xx\)
 
LabVIEW crashes so easily...
0 Kudos
Message 6 of 14
(6,484 Views)
Same problem as well - but never mind I'll switch to LV8.0 soon. Smiley Wink
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 7 of 14
(6,483 Views)
When you want to access a server this way you need to access a folder that's been shared and you access it like this:

\\serverName\sharedFolderName\directory1\directory2\filename.ext

serverName can be an IP address if you don't want to use the network name.

To access the C drive directly on a remote computer you need to access it like this: \\serverName\C$. See figure. This works on an NT-family of computer since C$ is one of those automatic administrative shares. Of course, to do this you need administrative access priviledge of on the target computer.

There is no difference in the method of access with respect to the version of LabVIEW.
Message 8 of 14
(6,471 Views)
That is woth a try.

So, I use for the path:   \\192.168.10.x\d:\data\datafile.txt

I hope, I understand it correctly. And the folder "data" is shared for the network.

For now, thank you for the help
0 Kudos
Message 9 of 14
(6,453 Views)
No, that's not correct. You cannot use "d:" in the path. You can't use the colon character at all. To directly access a drive remotely you must use the administrative share which is drive letter followed by a "$" character.

Thus:

If the folder "data" is a shared folder you would set the path to be: "\\192.168.10.x\data\datafile.txt". Note no reference to the 😧 drive.

If you want to access it directly via the D drive you would set the path to be: "\\192.168.10.x\D$\subdirectory1\subdirectory2\datafile.txt". So, if the "data" folder resides at "D:\data", then the path you would use would be "\\192.168.10.x\D$\data".

Generally speaking, for this sort of thing you should use shared folders rather than accessing a drive directly.

-Saverio
Message 10 of 14
(6,435 Views)