Hi Steve It's definitely possible to use a routerboard with a RS-232 port as a 'device serial server' - I have done so many times, usually to interface to an energy meter, inverter or other RS232 device. It's really easy to configure on the board. Something like: /port remote-access add allowed-addresses=0.0.0.0/0 log-file=serial port=serial0 protocol=raw tcp-port=10000 You can then use an application like VSPE ( http://www.eterlogic.com/Products.VSPE.html) to build a virtual serial port tunnel, which will create a fake local COM port. You'd just point your application at that local COM port. A box that does this off the shelf is called a 'serial device server'. The difference is that you are typically are given a proprietary application (varying in quality..) that creates the dummy COM port, and it will have additional settings to optimise for latency or throughput, additional serial options etc. A big advantage here is that these devices will support RS485 which may be better than using adapters. An entry level model is the O-Ring IDS-5012 at about AUD $120: http://www.oring-networking.com/product/cate.list/sn/102/Industrial%20Device... If you can spring for more, Moxa and Perle are two other brands, though you'll likely pay at least double that. Note that when using a serial device server, we don't need to know or care about the protocol that is being used over serial - it just creates a 'serial tunnel'. However, for something that is specifically talking Modbus, as your device is is, then a better solution could be a device that converts from Modbus RTU/ASCII (over RS232 or RS285 serial) to Modbus TCP (over IP/ethernet). These devices are typically called 'gateways' and they understand well Modbus enough to pass requests on to slave devices. Using a gateway, it is possible for your application to make Modbus requests (over Modbus TCP_ to a device that is talking Modbus RTU or ACII (over serial). This can be very advantageous as the Modbus TCP packets can be sent over any IP network, sent over NAT, etc. One example of this is the O-Ring IDS-M311 on that same page above. One 'gotcha' with both the scenarios above is that if there is any problem in your network, and a modbus request or reply does not get through, it is lost. Modbus does not have any native provision for timestamping or sending multiple values - you ask for a register (offset address) and you get a value in reply. Depending on your application, intermittency like this may or may not be a problem. If it is, you might consider placing your datalogger or Modbus client closer to the device. There are thousands of dataloggers that have both Ethernet and RS485 connectivity and would be a drop-in solution, though such 'industrial' devices tend to get really expensive really quickly. One product that I can really recommend for this is Mango Automation, distributed by Infinite Automation. The free version of the software is limited to 25 Modbus TCP data points and I have run it comfortably on a Raspberry Pi. The commercial license is around US$400 but for not much more you can get an actual appliance which has the fully licensed software on it plus a RS-485 port. If you want to use the free version on a Raspberry Pi then any generic USB RS-485 adapter should work. There is a slight learning curve to the software but once set up it is incredibly robust and reliable. The Modbus library used (Modbus4J) is very clever and makes it very straightforward. Out of the box, you can monitor points, save them to a database, and generate charts. You can create alarm conditions and when triggered, you can fire off emails, set values of other points, or use scripting for powerful logic. You can configure also have reports sent via email that include charts and CSVs. There's even a RESTful API now that lets you retrieve data. Feel free to contact me off-list if you'd like any further detail. I worked with the software professionally for a few years and am quite familiar with it, and very much a fan of it! Cheers Jeremy On Wed, Jun 8, 2016 at 7:00 PM, <public-request@talk.mikrotik.com.au> wrote:
Send Public mailing list submissions to public@talk.mikrotik.com.au
To subscribe or unsubscribe via the World Wide Web, visit
http://talk.mikrotik.com.au/mailman/listinfo/public_talk.mikrotik.com.au
or, via email, send a message with subject or body 'help' to public-request@talk.mikrotik.com.au
You can reach the person managing the list at public-owner@talk.mikrotik.com.au
When replying, please edit your Subject line so it is more specific than "Re: Contents of Public digest..."
Today's Topics:
1. Re: Industrial data (Jason Hecker (Up & Running Tech)) 2. Re: Industrial data (Russell Hurren) 3. Re: Industrial data (Mike O'Connor) 4. Re: Industrial data (Jason Hecker (Up & Running Tech))
---------- Forwarded message ---------- From: "Jason Hecker (Up & Running Tech)" <jason@upandrunningtech.com.au> To: MikroTik Australia Public List <public@talk.mikrotik.com.au> Cc: Date: Wed, 8 Jun 2016 12:00:35 +1000 Subject: Re: [MT-AU Public] Industrial data I think if you can convert the RS485 to RS232 you can hook into a serial port on one of the Routerboards that support serial. Then in the Mikrotik settings you can hook this serial port up to a TCP port and connect to it over telnet/WindowsVirtualCOMport/socat/netcat.
So: * Choose a Routerboard that supports Wifi and serial * Set up the Other End to capture the data from the serial port over TCP/IP using one of the above methods.
Can you have your MOBUS application at the Other End hook up to a virtual COM port in Windows? How do you want to capture or store the data?
On 8 June 2016 at 11:48, Steve Hille <stevehille84@gmail.com> wrote:
Greetings all,
I'm wondering if anyone has or is collecting data from MODBUS / RS485 or other type industrial electrical equipment using Mikrotik gear, or if it is even possible?
I'm thinking perhaps if I can somehow interface the MODBUS into a Groove or something similar as a 'station' and then shoot the data off to my access point, we will be able to collect data from this industrial equipment, just hoping for some gotchas before I really get into it.
Cheers,
Steve _______________________________________________ Public mailing list Public@talk.mikrotik.com.au http://talk.mikrotik.com.au/mailman/listinfo/public_talk.mikrotik.com.au
--
---------- Forwarded message ---------- From: Russell Hurren <russell@zeropointnetworks.com> To: "'MikroTik Australia Public List'" <public@talk.mikrotik.com.au> Cc: Date: Wed, 8 Jun 2016 10:02:15 +0800 Subject: Re: [MT-AU Public] Industrial data Hi Steve
I've never done it, but I presume you'd use something like this:
http://www.emtec.com.au/serial-and-usb/serial-to-ethernet-servers/single-por...
Then it's just a case of plugging it into the network (whether that's into a Groove or something else), installing the RealPort software on a computer and then collect data as though that computer was connected directly.
Regards
Russell
-----Original Message----- From: Public [mailto:public-bounces@talk.mikrotik.com.au] On Behalf Of Steve Hille Sent: Wednesday, 8 June 2016 09:49 To: public@talk.mikrotik.com.au Subject: [MT-AU Public] Industrial data
Greetings all,
I'm wondering if anyone has or is collecting data from MODBUS / RS485 or other type industrial electrical equipment using Mikrotik gear, or if it is even possible?
I'm thinking perhaps if I can somehow interface the MODBUS into a Groove or something similar as a 'station' and then shoot the data off to my access point, we will be able to collect data from this industrial equipment, just hoping for some gotchas before I really get into it.
Cheers,
Steve _______________________________________________ Public mailing list Public@talk.mikrotik.com.au http://talk.mikrotik.com.au/mailman/listinfo/public_talk.mikrotik.com.au
---------- Forwarded message ---------- From: "Mike O'Connor" <mike@oeg.com.au> To: MikroTik Australia Public List <public@talk.mikrotik.com.au> Cc: Date: Wed, 8 Jun 2016 11:38:05 +0930 Subject: Re: [MT-AU Public] Industrial data On 8/06/2016 11:18 AM, Steve Hille wrote:
Greetings all,
I'm wondering if anyone has or is collecting data from MODBUS / RS485 or other type industrial electrical equipment using Mikrotik gear, or if it is even possible?
I'm thinking perhaps if I can somehow interface the MODBUS into a Groove or something similar as a 'station' and then shoot the data off to my access point, we will be able to collect data from this industrial equipment, just hoping for some gotchas before I really get into it.
Cheers,
Steve _______________________________________________ Public mailing list Public@talk.mikrotik.com.au http://talk.mikrotik.com.au/mailman/listinfo/public_talk.mikrotik.com.au
Hi Steve
I have no idea about Mikrotik gear but I've done this sort of things for years using a number of different boards running Linux. Nowdays RPI is a good option.
I've written tools which will run as a mobus master or slave, talking TCP or RTU. Some of the code for this is on github at https://github.com/latproc/clockwork
---------- Forwarded message ---------- From: "Jason Hecker (Up & Running Tech)" <jason@upandrunningtech.com.au> To: MikroTik Australia Public List <public@talk.mikrotik.com.au> Cc: Date: Wed, 8 Jun 2016 12:08:37 +1000 Subject: Re: [MT-AU Public] Industrial data I'll add have a look at the Port feature in the Mikrotik.
http://wiki.mikrotik.com/wiki/Manual:Port
On 8 June 2016 at 11:48, Steve Hille <stevehille84@gmail.com> wrote:
Greetings all,
I'm wondering if anyone has or is collecting data from MODBUS / RS485 or other type industrial electrical equipment using Mikrotik gear, or if it is even possible?
I'm thinking perhaps if I can somehow interface the MODBUS into a Groove or something similar as a 'station' and then shoot the data off to my access point, we will be able to collect data from this industrial equipment, just hoping for some gotchas before I really get into it.
Cheers,
Steve _______________________________________________ Public mailing list Public@talk.mikrotik.com.au http://talk.mikrotik.com.au/mailman/listinfo/public_talk.mikrotik.com.au
--
_______________________________________________ Public mailing list Public@talk.mikrotik.com.au http://talk.mikrotik.com.au/mailman/listinfo/public_talk.mikrotik.com.au