General Category > Support Questions
Modbus 16bit addresses
(1/1)
zipfrog2022:
I am working on setting up some fairly basic actuator controls. All my single bit items work fine. What I need to know is how to read a 16bit address or write a 16bit address.
To send a operation command lets say for open / closed its function code 06, offset is 4096, bit 0= open, bit 1=closed, bit 2= setpoint.
How would I read these or write these. I would like to either use selector switch to change from open close using the bits above or push button to send the open / closed commands.
Help understanding how to work with the 16bit addresses would be greatly appreciated.
Thanks
Archie:
AdvancedHMI uses function code 3 to read 16 bit registers and function code 16 to write them.
Normally you use addresses in the 40000+ range, such as 40001
I
zipfrog2022:
Can you not use function code 6? 16 is to write multiple registers and 6 is to write a single register.
--- Quote from: Archie on February 12, 2024, 01:31:03 PM ---AdvancedHMI uses function code 3 to read 16 bit registers and function code 16 to write them.
Normally you use addresses in the 40000+ range, such as 40001
I
--- End quote ---
Archie:
I checked the code and it will use function code 6 if there is only a single register to read.
zipfrog2022:
Ok
Thank You
--- Quote from: Archie on February 12, 2024, 07:16:33 PM ---I checked the code and it will use function code 6 if there is only a single register to read.
--- End quote ---
Navigation
[0] Message Index
Go to full version