LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read/Write Data (configuration files) to a Port Server using the Web Browser

I am trying to configure a port server (DIGI-ME) using html interface. I know how to open a web browser in Labview, but am not sure how I can pass my configuration (.cfg) files (to configure the port server). Normally, I would do it through the Back-up/Restore feature on the port server and browsing to my .cfg file located on my computer.
 
Now the way I want to do this, is that I when I run my vi, Labview (may or may not) opens the html browser page and asks for the .cfg file. And loads the file. Once done, the port server needs to be rebooted.
 
I am still not sure how to do this and I need some help in pointing me to the right direction.
 
Thanks,
 
Shoab
0 Kudos
Message 1 of 6
(3,401 Views)
How would you access the port server normally? Do you do so through your web browser? Do you have to click on a button or browse to a certain link to upload files? If we know how to do it manually, then there's a good chance we can emulate this process completely using ActiveX.
Jarrod S.
National Instruments
0 Kudos
Message 2 of 6
(3,378 Views)

Thanks for replying back Jarrod. Normally what I do is:

1) Configure the IP address of the port server (using DIGI Device Discovery Software tool).

2) Then I open up my IE browser and type in the IP address that I configured the port server with (above).

3) I click on the link to open the Backup/Restore window (pls see attached pic) and browse to the config file from here.

4) Once my port server is configured, then I have to click on "Reboot" button that appears after the screen refreshes.

5) Now am ready to run my other tests, which I have no trouble with.

Past this point, am good. But it would be cool if I can configure the port server using Labview.

Thanks,

Shoab

 

0 Kudos
Message 3 of 6
(3,371 Views)
What happens if you browse to the Backup/Restore link using ActiveX? Does that pop up the necessary dialog for browsing to config file?

I'm not sure step 1 can be accomplished unless that tool itself has an activeX interface or some exposed DLL functions you can call.

Jarrod S.
National Instruments
0 Kudos
Message 4 of 6
(3,359 Views)

I just found out that I can load my config file using Telnet FTP, so that part should be easy to do using the Command Line interface in Labview (on a side note, referring to your suggestion, the Backup/Restore button is embedded in the html page, and am not sure how that can accessed using ActiceX..?)

But like you said the problem still stands regarding step 1 (IP address configuration). The DIGI application that I can use to configure is just an exe file. Can I launch this exe file using ActiveX (I have just recently started playing around with the Labview ActiveX feature)? Is there a way, I can launch any exe file from the local machine?

Thanks..

0 Kudos
Message 5 of 6
(3,354 Views)
You can launch any executable from the command line using System Exec.vi. That should be easy enough. You might search around the forum for System Exec; it's been a common topic, and some of the posts might help you avoid some common pitfalls. Good luck!

Jarrod S.
National Instruments
0 Kudos
Message 6 of 6
(3,345 Views)