LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I establish a network connection in LabVIEW?

I have many macintosh systems that store data daily to a fileserver using apple event vis. I am in the process of converting them to windows XP based systems. How do I program LabVIEW to log on to the filserver to store the data?
 
Another apple event I currently use is to open .pdf documents from a pull down menu. The apple event will automatically open the document in adobe acrobat. How can this be done in windows XP?
0 Kudos
Message 1 of 5
(4,268 Views)
For your first question: Specify a network-based file path to your file I/O functions, like the following
     \\server-name\shared-folder-name\rest-of-path
You would need proper access rights to the shared folder. You can look at this post for more gory details.

For your second question: You can use the System Exec VI to launch Acrobat Reader giving it the name of the file to launch (e.g., "C:\Program Files\Adobe\Acrobat 7.0\Reader\AcroRd32.exe pathtofile\myfile.pdf"). Or, you can use a web browser control to launch it that way via a URL.

If you need more specific help let us know.

Message Edited by smercurio_fc on 02-21-2006 11:06 AM

Message 2 of 5
(4,254 Views)
Thanks, both ideas worked.
 
The network-based file path worked if I logged into the fileserver with the username and password manually. Can LabVIEW login with the username and password?
0 Kudos
Message 3 of 5
(4,227 Views)
No, because that's coming from Windows. What you can do is to map a network drive so you can provide the credentials at that time and then you'll have a drive letter to access that folder on the remote machine. Then, in LabVIEW you specify the path using that drive and you won't get the user authentication prompt. When you map the network drive you can opt to have Windows automatically connect to it whenever you log in and you can also have it save the password so you won't get prompted.
Message 4 of 5
(4,219 Views)
If you are really sure that you want to map a network drive using Labview then the easiest way to achieve it is probably to use the System Exec.vi.

Use the NET USE command
e.g.

NET USE K: \\server\sharename password /USER:mydomain\username

Command syntax
"NET USE
[devicename | *] [\\computername\sharename[\volume] [password | *]]
        [/USER:[domainname\]username]
        [/USER:[dotted domain name\]username]
        [/USER:[username@dotted domain name]
        [/SMARTCARD]
        [/SAVECRED]
        [[/DELETE] | [/PERSISTENT:{YES | NO}]]

NET USE {devicename | *} [password | *] /HOME

NET USE [/PERSISTENT:{YES | NO}]"

Using this command you can then map a network drive using a username and password of your choice to map a drive as you require.
Note also that the user profile used to access the share can be an alternate to the local account (I am thinking domain / cross domain usage here) which is also very handy as you can use, for example, an increased security level for your LabVIEW accessing account!

There is a Microsoft knowledgebase article on the subject here:-
http://support.microsoft.com/?kbid=308582

The information also pertains to previous operating systems i.e. NT4, 2000 and XP.


Message 5 of 5
(4,209 Views)