Solved Read and Write Modbus register on HMI
-
With reference to the link above, what would be the approach to read the actual value of a register and to use the same "entry box" to write a new value to that same register (if it is possible at all).
I'm considering something to use a flag checking if "read value" is equal to the "entry field value" in the HMI.
But maybe I make it to complicated.Looking forward for feedback on this.
Regards,
Peter -
@rexpeter
Hi Peter,
you can use the refresh_from atribute from the Input component, as shown in the picture bellow.
The value atribute (Input_W in my example) will be assigned to CNI100:icn parameter and the refresh_from (Input_R in my case) atribute to the MBM__readReg:value.
I think this should work for you.
Cheers,
Jan -
@reitinge
Hi Jan,Sorry for a delay in responding to you, but this was the perfect working solution. Thank you very much for that!
Regards,
Peter -
@rexpeter
Hi Peter,
no problem. I'm glad, it's works.Cheers,
Jan