LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change IP-number and Subnet-mask with LabView?

To upgrade the software on a CRio-System, the user needs to change some settings in the TCP/IP-configuration.

To simplify this task I think on a possiblity to do (and at the end redo) the changes in the TCP/IP-Configuration of the Windows PC.

What I need is:
- Change the IP-Adress (from "Obtain IP adress automatic" to IP xyz...)
- Change subnet-mask
- Redo this settings by saving an existing config or set to "Obtain IP adress automatic"

Who knows if and how it's possible to do that in LabVIEW?
Perhaps I have to call a script  /.bat-file?

LabVIEW 6,7 and 8 available 🙂




0 Kudos
Message 1 of 13
(6,266 Views)
Try netsh and a bat file. Rename the first file to .bat.

Message Edited by unclebump on 08-23-2006 06:03 AM

Message Edited by unclebump on 08-23-2006 06:05 AM

Download All
Message 2 of 13
(6,264 Views)

hi there

you can use the netsh environment on the command line. for example

netsh set address name="LAN-Verbindung" source=static addr=10.0.5.99 mask=255.255.255.0 gateway=10.0.5.1

see windows help for more information.

Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
Message 3 of 13
(6,259 Views)

Hi, its a really interesting stuff to read. Did anyone try doing it ?

 

One thing that I wanted to know was: How long does it take to do this ? Since Im using a time critical application, can this entire operation happen in 100 milli seconds ?

 

Will be glad to hear from you.

 

Regards

Sreedhar

0 Kudos
Message 4 of 13
(5,549 Views)

 


@Sreedhar T wrote:

Hi, its a really interesting stuff to read. Did anyone try doing it ?

 

One thing that I wanted to know was: How long does it take to do this ? Since Im using a time critical application, can this entire operation happen in 100 milli seconds ?

 

Will be glad to hear from you.

 

Regards

Sreedhar


I have used this for a program that needs to have a host IP address for High sped cameras. I have it change the IP address to the required address and change it back when I am done. Here is a very simple Labview version of this code with out the switch back.

 

Tim
GHSP
Message 5 of 13
(5,532 Views)

 


@Sreedhar T wrote:

Hi, its a really interesting stuff to read. Did anyone try doing it ?

 

One thing that I wanted to know was: How long does it take to do this ? Since Im using a time critical application, can this entire operation happen in 100 milli seconds ?

 

Will be glad to hear from you.

 

Regards

Sreedhar


If you want to know how long it takes, run it yourself. You certainly do not need LabVIEW to run a DOS command. If I recall, it's going to be pretty dependent on your OS and pc. I also don't recall ever coming close to 100 msec but it's been a few years since I've done it and the timing was not at all critical for me.

 

Message 6 of 13
(5,514 Views)

You can set the system exec not to "wiat until complete". This will return an error code and you can react to that.

Tim
GHSP
0 Kudos
Message 7 of 13
(5,503 Views)

Hi,

 

Could you please explain me: "set the system exec not to "wiat until complete"."

Is it done in LabVIEW ? if yes, how and where.

 

I tried running this batch file on my PXI-8109, but it is taking some 3-4 sec. Any help to improve this will be highly appreciated. I need to complete the entire operation with-in 100ms.

 

Regds

Sreedhar

0 Kudos
Message 8 of 13
(5,473 Views)

In the code that I sent the system exec is the VI that looks like this.

 

22679iC74230686D547832

 

The boolean that is on top is the wait until complete boolean. Set this to true and look for the return code.

 

22681i3C4C9C03F20381E5

Tim
GHSP
0 Kudos
Message 9 of 13
(5,451 Views)

Sorry for the trouble. After I checked your code, I was pretty clear what you meant.

 

But, I'm still facing the timing issue, it is taking almost 2-3 seconds for its completion. By making the "Wait till Completion" as false, I am only releasing the CPU for my internal operations, but I cannot use the new IP address untill it is actually changed.

 

Thinking to implement virtual ip concept, will keep posting

 

thanks.

0 Kudos
Message 10 of 13
(5,443 Views)