Fast switching between dynamic and static IP for PLC programming?

Binaural

Member
Join Date
Jul 2005
Location
Sydney
Posts
366
Hello all,

When I am working in the office I am often switching between a static IP (192.168.127.whatever, for example) for programming PLCs and HMIs over Ethernet, then switching back to a dynamic IP so I can get my email on the office network. I might switch 5-10 times a day if I am getting a lot of email, and it takes an annoyingly long time to swap going through network connections etc.

My IT guy is being cheap about buying a second Ethernet card for the controls engineers here so that's not an option either unfortunately.

So, does anybody know a better way, program or Windows script that will do this simple task quickly and easily? There seems a few things out there on the internet but nothing that looks like it was made for this sort of simple task.

Cheers!
 
I know what you mean. On my laptop, I have my wireless card set to DHCP, and my 'wired' NIC set with a static address. I use the wireless button to toggle back and forth.

I would buy a second NIC card and be done with it. They're awfully cheap these days. Just buy your own and install it... No one will know... ;)

There may be some way to do 'fast switching' in Windows, but I don't know. I wonder if you could setup two user accounts using different network settings. Then just log in/out to switch IPs... :confused:

🍻

-Eric
 
I am almost ready to buy a USB to ethernet adaptor so I can do the same for my notebook. If they are cheap enough I might even get one for each factory I work in. Regards Alan Case
 
Maybe this isn't an option for you but on our network I have about 10 IP addresses that are reserved for my use. I just give one of those to the PLC or HMI I am programming. This way I can be always be connected to my e-mail without having to switch back and forth.
 
I set up a couple of cmd batch files using the netsh command to change the IP address back and forth and put a couple of shortcuts on my desktop. check it out in the XP help center.
 
Here ya go

Here's the batch file I use, I used it to switch between home or DHCP and work which is a static address. Modify to your needs. You will need choice.com in your system32 directory. Our IT guy put this together.

Greg

@echo off
cls
choice.com /c [H,W]
echo Please wait while changes are made...
if %errorlevel%==1 goto home
if %errorlevel%==2 goto work
goto done
:home
netsh interface ip set address "local area connection" dhcp
netsh interface ip set dns "local area connection" dhcp
goto done

:work
netsh interface ip set address "local area connection" static 10.1.x.5 255.255.x.0 10.1.x.1 1
netsh interface ip add dns "local area connection" 10.1.x.x
netsh interface ip add dns "local area connection" 10.1.x.x
goto done

:done

:end
 
On my XP laptop, I have it configured for DHCP as my primary address and a 192.168.1.x address configured as the secondy option.

When I plug into the company network I get a dynamic address, when I plug into a network or VLAN with no DHCP server it defaults to the 192.168.1.x address.
 
Greg, that is the easy

How do you switch domains? At work we have a login server called \\Delta. At home I use a workgroup called HOME. I have found that I can switch between the wired Ethernet and the wireless Ethernet no problem and access the internet. It is switch the domains that give me fits. I can't access the HOME workgroup if the log in domain server isn't available. I just got XP for my laptop. It looks like it can be done but it isn't automatic and will be a pain in my rear as long as I have Windoze Xtra Poor.
 
Peter Nachtwey said:
How do you switch domains? At work we have a login server called \\Delta. At home I use a workgroup called HOME. I have found that I can switch between the wired Ethernet and the wireless Ethernet no problem and access the internet. It is switch the domains that give me fits. I can't access the HOME workgroup if the log in domain server isn't available. I just got XP for my laptop. It looks like it can be done but it isn't automatic and will be a pain in my rear as long as I have Windoze Xtra Poor.

Check out the net user command. Its a carryover from NT.
 
Peter Nachtwey said:
How do you switch domains? At work we have a login server called \\Delta. At home I use a workgroup called HOME. I have found that I can switch between the wired Ethernet and the wireless Ethernet no problem and access the internet. It is switch the domains that give me fits. I can't access the HOME workgroup if the log in domain server isn't available. I just got XP for my laptop. It looks like it can be done but it isn't automatic and will be a pain in my rear as long as I have Windoze Xtra Poor.

Also, what login mode for windows XP are you useing? the actual 'Login Box', or the click-list of user names?

If it's the login box, you may have to open the options, or advanced button, but there you can switch from logging into the domain, or the local machine itself.

If you don't have the login box, you need to go to user accounts in control panel, advanced tab, and check off the 'Secure Logon' button at the bottom to get the login box.

Good luck
 
Derek McFarland said:
Where do you get choice.com?

You don't need choice.com by just making 2 batch files: HomeIP.bat & WorkIP.bat and put the lines needed in each.

Or a bit of clever re-coding of the original batch file, with a parameter, will also do away with it.
 

Similar Topics

D
I am currently working on a shaking machine to remove metal parts after they have been punched on a punch press. I can't seem to figure out how to...
Replies
3
Views
3,623
Hi, I have a din rail mounted, two output optocoupler (I named it) and its funtion is: there is a position control sytem and the PLC gives...
Replies
4
Views
2,923
Hi All, I've been playing with 2 stratix switches in my test bench and seeing how different configurations affect the behaviour when 2 managed...
Replies
3
Views
206
Dear all, Im using Allen Bradley Compact Logix L36ERM as a PLC. and facing a problem where I need to create a FIFO buffer that fills an...
Replies
5
Views
1,648
Dear Members; We have Fluke 754 hart communicator. We have wired up three transmitters of Rosemount Model C3051 with this input module. But when...
Replies
4
Views
1,832
Back
Top Bottom