This is more of a general network question, but since it involves a couple of R2 controllers, I thought I’d post here to see if anyone else has done this or perhaps suggest alternatives.
Here’s the configuration. I have two cabinets, each with an embedded PC and two SNAP R2 controllers, each on a 16-slot rack (one for inputs, one for outputs). The cabinets run independently. A simple Ethernet switch is installed in each cabinet allowing the PC and R2s to communicate.
In each cabinet, one R2 runs the strategy. The strategy includes two I/O Units, the R2 running it and the other R2. I’m writing a program on the PC that will communicate directly with both R2s to retrieve I/O and scratchpad data.
So far so good. I can set the PC and R2 addresses the same for each cabinet (e.g. PC = 192.168.1.10, R2(1) = 192.168.1.11, R2(2) = 192.168.1.12) and I can run the same program and strategy in each cabinet.
Now I want an external PC to be able to retrieve I/O and scratchpad data from both cabinets. So, I will have to connect both cabinets to the external Ethernet network (through the aforementioned network switch). Problem is I will have address conflicts because both cabinets use the same IPs and now they can “see” each other.
I really don’t want to have two separate strategies/programs with the only difference being the IP addresses.
I don’t know much about networking but I think I need a router for each cabinet between the external network connection and the switch. The router will forward packets from the external PC to the proper R2. Does this sound right? Is there another way I can do this? If I do need a router, any suggestions (make/model)? I’ve googled routers and most of what comes up are wireless routers or cable/dsl modems.
Thanks again and sorry for the general nature of the question.