Modbus TCP/IP and Interupts

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Modbus TCP/IP and Interupts

1,331 Views
BoSCHoW
Contributor II
Hello everyone,

i am trying to implement modbus tcp/ip into the cold fire microchip. The TCP/IP part it is already done and the client connect to the server via TCP/IP and then the client request a modbus transaction. But the server "microchip" send TCP/IP ack again.

since i dont know what is wrong i am askign you guys for some help.

TCP/IP functions are like this:
SocketListen(UINT16 socket);
SocketRcv(UINT16 socket, UINT8 *data, UINT16 max_length, UINT8 time);
SocketSend(UINT16 socket, UINT8 *data, UINT16 length);
SocketCloase(UINT16 socket);

Another thing that i want to know is that if i need to make an interupt for successfully implementing Modbus TCP/IP, if so can please somebody explain or write a nexample how to  "call" an interupt?

thanks and best regards,
BoSCHoW.
Labels (1)
0 Kudos
2 Replies

396 Views
arush
Contributor I

Is there Modus TCP/IP code for M52233DEMO

0 Kudos

396 Views
mjbcswitzerland
Specialist V

 

Hi

 

There is complete MODBUS support for the M522xx family here: http://www.utasker.com/modbus.html

 

Detailed user's guide: http://www.utasker.com/docs/MODBUS/uTasker_MODBUS.PDF

 

It includes:

  • MODBUS Serial RTU/ASCII
    • Multiple serial master and slave interfaces (limited only by processor UART availability)
    • Multiple slaves at each UART interface (each with its own slave address, resources and application interface)
    • Routing of received messages to other MODBUS master interfaces based on function codes, access ranges or other decisions
    • RS485 RTS control
    • Serial/serial bridge function
    • ASCII slave support via USB
  • MODBUS/TCP
    • Multiple master and slave TCP ports
    • Each slave TCP port supports multiple sessions (multiple master connections)
    • Configurable idle connection timeout on each TCP port
    • Multiple slaves on each TCP port (each with its own slave address, resources and application interface)
    • Slave gateway operation to TCP or serial MODBUS masters
    • Slave routing operation to multiple TCP or serial masters via a single TCP port
  • General
    • Autonomous handling of commands and requests or with application intervention
    • Coils and discrete elements can be optimally overlaid with registers (architecturally independent)
    • Simple generation of public MODBUS function data content, simplifying application interface
    • Supports delayed slave responses while external data is accessed
    • Complete MODBUS projects can be simulated in the µTasker simulator

 

In addition, the project is fully compatible with the Kinetis family so can be moved between Coldfire and Kinetis projects with very little effort. Supported and proven in many industrial projects since 2009.

 

Regards

 

Mark

 

 

0 Kudos