┬ÁTasker Forum > MODBUS

MODBUS IP to serial (RTU) gateway

(1/3) > >>

jezc:
Hi Mark,

I've been asked to look into providing a simple MODBUS gateway to allow serial (RTU) devices (RS232 & RS485 but not necessarily both at the same time) to be connected via Ethernet (MODBUS IP).

Having had a read of the documentation, this looks to be a pretty simple application for the uTasker MODBUS implementation.

I have a pretty wide range of devices to choose from (ColdFire Kirin3/Kinetis, NXP LPC2xxx/LPC17xx, STM32, TI) though the preference for development tools/compiler would be to use IAR (for ARM or ColdFire).

Can you suggest what the relative benefits/drawbacks of the various platforms are for the uTasker/MODBUS combination? I'd imagine that most would be capable of supporting the simple case above but any indication on which dev kits would be suitable for initial prototype development would be a great help.

Initial minimum project features are for MODBUS IP (IP v4 though the option for IP v6 would be good) & either RS232 or RS485 (possibly as two hardware builds) purely as a gateway.

Next phase would be to add in some simple web server applications & possibly support more than one serial connection at once (e.g. RS232 & RS485).

Then we'd be looking to add in USB Host functionality (we have our own flavour of MODBUS over USB bulk transfers we'd like to support)

We may also be wanting to offer a plain (non-MODBUS) Ethernet to serial gateway (but so far the options for providing a virtual serial port on the PC is looking problematic for this)

We'd like to be able to support this within a family of processors (maybe scaling the memory/package sizes as the complexity rises) rather than mixing solutions across the different vendors.

Any thoughts or suggestions (from you or your other MODBUS customers) would help

Cheers,
    Jez

mark:
Hi Jez

I don't have any real recommendation for device becaause all are supported to work with all MODBUS functionality.
Generally if you are open to processor types, the freescale Kinetis family are very popular at the moment and are optimal for Ethernet and RS485 work since they have TCP/IP checksum offloading - I just updated a benchmak showing its performance benefits here: http://www.utasker.com/docs/uTasker/uTaskerBenchmarks.PDF Its UART has automatic RS485 RTS control, which is nice too. There are a wide range of chips and they have up to 6 UARTs - IAR works well with them too.

The MODBUS TCP interface uses IPv4 but the Kinetic package has IPv6 TCP support so it would be quite simple to adapt it to IPv6 (or dual stack) operation if required.

The uTasker project supports only USB device at the moment and not Host. USB CDC has been used for MODBUS as USB device (there is a define for this) but I don't know how you would like to use host. Kinetis USB device is however also fully implemented.

Since you are looking at a scalable solution the Kinetis is also a good choice since it has good scalability.


Regards

Mark




jezc:
Hi Mark,

Thank you for the response - I've tried to make a start with the simulator for both Kinetis & LPC17xx families but both fail to compile when I include the 'real' MODBUS.c & .h files...

\utasker\modbus\modbus.c(1383): error C2039: 'timer_reference' : is not a member of 'stPIT_SETUP'
\hardware\kinetis\kinetis.h(5857) : see declaration of 'stPIT_SETUP'
\utasker\modbus\modbus.c(1383): error C2065: 'MODBUS0_TIMER_CHANNEL' : undeclared identifier


I've quickly tried the same with the 52259 DEMO board & that seems to build ok for the simulator & run.

Do I need a later version of MODBUS.c & modbus.h fiels to support Kinetis /LPC17xx/2xxx ?
Looking at the comment at the top of MODBUS.c I appear to have v1.06 (2/9/2009)...

Is there any chance to get the updated files to allow me to use Kinetis or LPC targets please?
Or, if it's easier to just let me know what changes I need to add in to support one or other, that would be most helpful.

In the meantime I'll try and get some of the basic functionality/configuration sorted out with the 52259 ssimulation.

Cheers,
    Jez

mark:
Hi Jez

It looks like your version doesn't support all chips - there are sometimes some special HW related routines to control timers that are a bit chip-dependent.

You can always get the latest version here: http://www.utasker.com/forum/index.php?topic=1424.0 where also the changes are documented.


Regards

Mark

jezc:
Hi Mark,

Ok, thanks for confirming that is the problem. The next problem is for me to find the original password again...

I'll continue proving the ideas with the 52259 build until I can retrieve the password.

Thanks once again for your support!

Cheers,
    Jez

Navigation

[0] Message Index

[#] Next page

Go to full version