04-29-2020 09:06 AM
Hi I am trying to understand this program. This is a modbus master program. If you look into this you will under the registers to write point in Write Multiple Holding Registers, you will find that to it a array with value 4095 is connected. Can anyone explain to me what is that 4095. What kind of a value is 4095. What could it be trying to represent. Can anyone help me. Thank You.
Solved! Go to Solution.
04-29-2020 09:29 AM
4095 is an integer.
To know what it means, you need to read the manual for the device and what the register it is being written to means.
Now the register's starting address is a very Rube Goldberg way of defining it. It doesn't make sense to write 100 as a string ( or 200, 300) then use a Hex String to number. It would have made more sense to right click the input and create constant. Now you'd have a U16 integer constant. Right click and set it for hex display mode and show the radix. Then type in 100.
Now since the array reads Config 24DIO, I'm thinking that the register may be a way for setting the bits (possibly input vs. output) of a whole series of digital inputs in one value. 4095 in binary is 1111 1111 1111, so it seems to be "turning on", a series of 12 bits or digital inputs.