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

TOPIC: Modbus TCP/IP Server Offset for digitals I/O

Modbus TCP/IP Server Offset for digitals I/O 1 year 3 weeks ago #10273

  • brunad
  • brunad's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 224
  • Karma: 0
Hello,

I want to simulate a distant Modbus TCP/IP (Crevis/Kep) slave rack (server) to simulate a process that I own in my laboratory.
For analog I/O, it's working perfectly, but for digitals I/O it's a mess beacause I can't choose the starting offset to match with the real I/O.
Address mapping of the KEP/Crevis distant I/O (it's not possible to choose) client (master):

-4xChanAI 12 bits at address 0..3 ReadInputRegster
-4xChanAo 12 bits at address 2048..2051 WriteMultipleRegister
-8xChanDi at address 64..71 ReadDiscreteInput
-8xChanDo at adress 4166..4173 WriteDiscreteOutputs

Here is the server side (Di and Do don't work as well)
Can you help me a bit ?
/Bruno

Capturedu2019-04-2918-56-49.png


Capturedu2019-04-2918-57-05.png


Capturedu2019-04-2918-57-21.png


Capturedu2019-04-2918-57-33.png


Capturedu2019-04-2918-57-54.png


Capturedu2019-04-2918-58-09.png


Capturedu2019-04-2918-58-23.png
Last Edit: 1 year 3 weeks ago by brunad.
The administrator has disabled public write access.

Modbus TCP/IP Server Offset for digitals I/O 1 year 3 weeks ago #10275

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 2750
  • Thank you received: 371
  • Karma: 118
Hi Bruno,

I'm afraid the Modbus server isn't designed to simulate other devices, so you have to use other addresses for the digital I/O during simulation. These can be set in the pwrp_alias.dat file and thus you don't need to change the original addresses in the development database.

The start address for the Do in your configuration will be 2048 + 8, and for Di 8. The Number is the bit number in the 8-bit byte and should be 0-7.

/Claes
The administrator has disabled public write access.

Modbus TCP/IP Server Offset for digitals I/O 1 year 3 weeks ago #10276

  • brunad
  • brunad's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 224
  • Karma: 0
Thank you Claes :)
/Bruno
The administrator has disabled public write access.

Modbus TCP/IP Server Offset for digitals I/O 2 months 3 weeks ago #10529

  • brunad
  • brunad's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 224
  • Karma: 0
Hi Claes,

I have modified modbus TCP server object, it seems to work so far.
I put it on proviewr GIT
Here is modified objects:

mtcpsm.png


helpmtcps.png

Remove the .c on the last file:

File Attachment:

File Name: rt_io_m_mb_tcp_server.c
File Size: 32 KB


File Attachment:

File Name: otherio.wb_load.c
File Size: 391 KB








/Bruno
Last Edit: 2 months 3 weeks ago by brunad.
The administrator has disabled public write access.

Modbus TCP/IP Server Offset for digitals I/O 2 months 3 weeks ago #10530

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 2750
  • Thank you received: 371
  • Karma: 118
Thanks Bruno,

I'll insert it to the next release.

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