Connecting to a PLC through VM Ware

dshaffst

Member
Join Date
Apr 2024
Location
Indianapolis, IN
Posts
4
I haven't encountered problems connecting to a PLC through VM Ware but I am with this particular machine. I'm running Windows 7 on a Windows 10 machine in order to talk to PLC. I'm only a week into this job and this was the laptop my predecessor used. At any rate, when connected to the PLC Ethernet port, I can't read any of the devices (all red X's). I tried pinging the PLC IP address through VM Ware and kept getting a "Destination host unavailable". However, I can successfully ping the PLC through the host machine. I've made sure the IP address for Windows 7 is compatible but I keep getting the same result.

Are there some other walls I'm potentially running into or settings not turned on? Would I be better off trying to get my hands on an older Win 7 machine if possible?
 
Have you ethernet - usb dongle or are you using vmware virtual adapter?
It can be windows firewall which blocks ports. (VMware or mian windows as not know how you connect to VMware)

If you have virtual network to vmware then is is brigded or NAT?
I prefer usb adapters as then vmware is connected directly to ethernet port.
 
The VM machine IP is different than your host PC
On the VM under Network Adapter, I always use "Bridged" and also "Replicate physical network connection state"
Hope this helps.
 
I've been using VMWare VMs for a very long time and *most of the time* have 2 network adapters inside the VM. The first is "Host-only" and is used for licenses while the second is NAT. Both are set up to use DHCP so VMWare handles them.

I use a USB Ethernet adapter connected to the host. In the host, the USB adapter is configured with a static IP address in the correct subnet for the PLC. So far, that's rarely been an issue.

I have a Wifi adapter on the laptop to connect to the company LAN when I'm out and about and my docking station has a wired NIC that stays connected to the office LAN when I'm at my desk. The USB NIC connects to my test setup at my desk.

For a while, I used Bridged connections in the VMs, but as the number of VMs and laptops expanded, it got too cumbersome to make sure each VM had its own IP address so we switched to NAT, which generally worked.

I generally connect the USB adapter directly to VM in 2 circumstances:
1) I need to use BOOT/P to set the IP address of a device and it doesn't work from the host. It's easier to disable the NAT and Host-only adapters in the VM so that the only NIC that's enabled is the USB one instead of the NICs on the host that I'm actively using for other things.
2) At my last place, some of the machines came in with IP addresses in the 169.x.x.x range, which is what Windows uses when DHCP fails. VMWare will not route those addresses from the host to the VM, so I had to attach the USB NIC to the VM directly.
 
Easiest way to troubleshoot....open up a cmd prompt and use ipconfig. That will tell you the ip address of the physical network device in the VM. Should be the same subnet as the PLC you're trying to connect to.
 
Issue is resolved now, though in an unexpected way. Within the Internet Protocol properties screen, upon exiting I checked the "Validate settings upon exit" box. This initiated some sort of automatic network diagnostic. What happened after that was too quick to fully describe, but the end result was the assigning of an IP address completely different from that of the PLC; an address to the effect of 192.168.17.xxx (the PLC address is 10.2.102.xxx). To my surprise, I finally got a response upon pinging the PLC! Our IT guy who's been trying to help with this issue (and is experienced with VM Ware) was initially surprised as well but he has an idea why this worked. I'm still trying to wrap my head around why this is the case, but he briefly explained that it's because VM Ware uses it's own IP address (for such and such reasons).
 
Easiest way to troubleshoot....open up a cmd prompt and use ipconfig. That will tell you the ip address of the physical network device in the VM. Should be the same subnet as the PLC you're trying to connect to.
not true if the vm is set to nat mode. if you want the vm to have its own ip on the physical network then use bridged mode.
 
Issue is resolved now, though in an unexpected way. Within the Internet Protocol properties screen, upon exiting I checked the "Validate settings upon exit" box. This initiated some sort of automatic network diagnostic. What happened after that was too quick to fully describe, but the end result was the assigning of an IP address completely different from that of the PLC; an address to the effect of 192.168.17.xxx (the PLC address is 10.2.102.xxx). To my surprise, I finally got a response upon pinging the PLC! Our IT guy who's been trying to help with this issue (and is experienced with VM Ware) was initially surprised as well but he has an idea why this worked. I'm still trying to wrap my head around why this is the case, but he briefly explained that it's because VM Ware uses it's own IP address (for such and such reasons).

it will make more sense if you understand how the VM uses ethernet connections through and to the host. Is that VM set up with bridged or NAT? what other network adapters are present on the VM? what is the virtual network editor showing you? what are the settings in the VM's network settings?


It sounds like your VM adapter is set to Host only or NAT. and the IP you're seeing that looks "wrong" is the IP you'll find in your virtual network editor under the Edit dropdown. the IP will show up as that for the VM, but you will be using the host machine's adapter settings.
 

Similar Topics

Hi, I want to exchange data between two L55 PLCs using ENBT PLC1 is the main PLC and consist of 1756- CNB, L55 CPU and ENBT. Five remote I/O racks...
Replies
7
Views
1,035
Hello, In my project work i am Connecting two Allen-Bradley HMIs (PanelView Component C600 and PanelView Component C1000) to Allen-Bradley PLC...
Replies
1
Views
3,145
I want to know the hardware needed to connect SIEMENS S7-300 CPU-315-2DP through MPI port of PLC to the COM port of PC? Thank you.
Replies
2
Views
3,268
Hi, I've never written a program to gather data from a PLC before so I'm very new to this. I've found a lot of information about the DF1 protocol...
Replies
6
Views
7,953
Good Day to all of you, this is my first post, i will try to explain as best as possible, english is not my natural language. I am performing an...
Replies
0
Views
58
Back
Top Bottom