Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Encapsulated MODBUS RTU in MODBUS TCP

Encapsulated MODBUS RTU in MODBUS TCP 5 years 4 months ago #9885

  • barnes
  • barnes's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 92
  • Karma: 0
I fixed a few bugs in the new RTU encapsulated hack code, if anyone is interested, I can upload the progress later.

The issue was around the MBAP header not being present in the return RTU packet.Testing is still going on. I had to create a fake MODBUS MBAP header transaction identifier to pass on to the following packet processing. I will test the write holding register function next. Read holding registers seems to be working fine now.

Parsing the packet down by type casting of the different structures took me a while to figure out. Once you lay the structures side by side it becomes obvious.
The administrator has disabled public write access.

Encapsulated MODBUS RTU in MODBUS TCP 5 years 4 months ago #9889

  • barnes
  • barnes's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 92
  • Karma: 0
Here is the current code that is running. Read holding registers works and write holding registers works.

I hope this may become useful to someone in the future.
Done for now.

I learned a lot looking through this.

File Attachment:

File Name: rt_io_m_mb_tcp_slave_2018-10-30.c
File Size: 40 KB


File Attachment:

File Name: rt_io_mb_locals_2018-10-30.h
File Size: 7 KB


File Attachment:

File Name: pwr_otherioclasses.h
File Size: 55 KB
The administrator has disabled public write access.

Encapsulated MODBUS RTU in MODBUS TCP 8 months 3 weeks ago #11997

  • ceccon
  • ceccon's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 46
  • Karma: 0
Hello Claes/Barnes, since this is a very old topic may I ask if this option is already available in a new ProviewR version?

I will need to configure a communication like this file attached

Comunication.PNG





Thanks
BR
/Ceccon
Last Edit: 8 months 3 weeks ago by ceccon. Reason: Attach file
The administrator has disabled public write access.

Encapsulated MODBUS RTU in MODBUS TCP 8 months 3 weeks ago #12005

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3170
  • Thank you received: 497
  • Karma: 133
Hi Ceccon,

The modifications described above has not been implemented in any ProviewR release.

/Claes
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Time to create page: 9.708 seconds