dual gateways


Recommended Posts

Hello

We have recently added a Moxa MGate MB3480 to our sytem to enable TCP to 485 allowing us to remove the serial cards and add flexibillity. The only way I can comunicate with the TCP to serial gateway when using Daqfactory is by giving the Mgate a fixed IP address and setting the PC default gateway to the same address this works great and gives far less errors in our communications than the old system, problem is we lose our conection to the adsl modem and the internet, I have tried numerous combinations of settings including adding extra gateways in the advanced TCIP settings but is still its either TCP Modbus or Internet not both someone suggested two nics but as I can see the mgate and the modem configuration pages I do not think this is a requirement, just hoping that some one has a simillar setup that is working. many thanks.

Link to comment
Share on other sites

First of all, you should ALWAYS use static IP addresses when using any ethernet based hardware device. I've hard arguments with manufacturers before about this, but DHCP does NOT always give the same IP address to a device, so DAQFactory (or any other tool) will not reliably be able to find a device that is setup with a dynamic IP. What's worse, if you had two Modbus devices, both with DHCP, its possible that the IPs would swap and all the sudden you'd be communicating with the wrong device!

That said, you should be able to setup your Moxa with a static IP that is not the gateway, but is on your subnet. You shouldn't have to set the gateway of the PC to the Moxa. It should be set to your router. So, for example, if your router is normally at 192.168.1.1, with a subnet of 255.255.255.0, your PC can be DHCP (with a gateway of 192.168.1.1, but that will be set dynamically), but your Moxa should be set to 192.168.1.x where x is something other than 1, and ideally not in the DHCP IP range set in your router (check your router config). If you want your PC on a static IP as well behind a router, than you can give it a different 192.168.1.y address. Both the PC and the Moxa should have a gateway set to the router, in my example, 192.168.1.1. .1 is typical for gateways.

If your PC is connected directly to the modem, then, well, you need to go buy a router. You actually should never connect directly to a modem anyway as this exposes your PC directly to the Internet. A router provides a certain amount of firewall protection just from its NAT setup and will protect from viruses like the old Blaster virus that come directly through security holes in Windows. Putting the Moxa directly on a modem is even worse, because now anyone who figures your modem's Internet IP could send Modbus commands to it!

If you don't really understand this, I recommend hiring someone who knows IT to make sure you set things up correctly. Anyone who knows IT can do this in less than an hour and it won't cost you much. With SCADA systems, you really don't want to mess around with Internet security.

Finally, I've seen a couple people buying the Moxa gateways and while these are certainly acceptable units, I'd just like to point out that you don't need to buy a Modbus TCP to RTU gateway. You can just buy an Ethernet to 485 gateway. DAQFactory can communicate using Modbus RTU over Ethernet and does not need the protocol translation offered by the Moxa unit. This is especially important when doing multiple 485 chains with multi-port converters like the Moxa (which has 4 serial ports). The Moxa unit becomes a bottleneck because DAQFactory can only establish one connection to the device. If you instead had a standard Ethernet to 4 port 485 gateway, you could create four different connections that could run simultaneously and thus quadruple your throughput.

Link to comment
Share on other sites

  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.