C.Guillo Posted May 31, 2018 Report Posted May 31, 2018 Hello, I am developping an application that uses Bronkhorst mass flow controllers with modbus communication. Some years later, I used a vision V570 with success. This time, I am using an Unistream and reading floats with modbus doesn't work properly : the 2 registers are inverted so the value is wrong. I tried to revert the register by using buffers and it works perfectly for read values but values to be written are rounded so I can't send setpoint to my controllers. Does anyone have an explanation ? Below is a snapshot of the conversion code :
MVP 2023 Joe Tauser Posted June 3, 2018 MVP 2023 Report Posted June 3, 2018 Have you tried the Swap Single Tag Bytes function? It's in the Logic tools. Joe T.
C.Guillo Posted June 8, 2018 Author Report Posted June 8, 2018 In fact, I have solved my problem by storing the result of the conversion in an UINT32 and write it in the modbus register. Chris.
Joa Posted November 6, 2023 Report Posted November 6, 2023 Hello, I am new to Modbus programming and would like to ask for advice on the above topic. In my application I should write a decimal number into a register of a Danfoss control valve. What is the best way to convert a REAL value to a UINT? Below is my first draft, but I get a status error. Can someone explain to me what I did wrong?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now