fluisgirardi / pascalscada_v0

GNU Lesser General Public License v2.1
33 stars 13 forks source link

Add Modbus command $11 for getting a device ID. #1

Closed LongDirtyAnimAlf closed 2 years ago

LongDirtyAnimAlf commented 2 years ago

I have only done this for RTU. But TCP should be easily adapted.

fluisgirardi commented 2 years ago

I'm trying to understand why you are using the Registers with a modbus function that wasn't designed as data exchange function

fluisgirardi commented 2 years ago

About replicate these changes to TCP: function 0x11 is RTU/serial exclusive or I'm wrong?

fluisgirardi commented 2 years ago

How the reply to 0x11 request is limited to 255 bytes, I think that's better create a new PModbusPLC[plc]._0x11area with fixed size (256 bytes) and fixed initial address (always from 0) instead using Register area. What do you think?

LongDirtyAnimAlf commented 2 years ago

You are the expert. I just tried to implement this function without deep knowledge of your PascalScada. So I will fully agree with you about a better method of implementing this ! Thanks for looking into this. And thanks for implementing in a more suitable manner.