11-01-2023 11:26 AM
I wish to thank the community for the help in getting the Modbus tool to work for reading from my Watlow controller but, I am need of assistance in getting it to write. I do not get any errors when I run it but I also do not get a set point change either. I am trying to write to a single register (word address 2160) for a set point change but it does nothing when I run it. I write a single precision value to the register but again it does not seem to work and have ran out of ideas. Thank you for your patients.
11-01-2023 11:39 AM
Modbus registers are typically 16-bit unsigned integers. You're trying to put a 32 bit signed single-precision float in there. Do you see the red coercion dot on the Write call?
In my experience, in most cases, to write a value that "looks like" a floating point, a Modbus device will either:
Since we can't see what values you're trying to write, the address to write it to, nor do I know what the documentation of the Watlow you're using says about the register in question, I can't give more hints than that.
11-01-2023 12:02 PM
The Watlow is looking for 32 bit floating point which is in both the read and write registers. I tried to type cast to a U32 and then split it like suggested but it did not change the set point as before but that was a good thought. I am hesitant to use U(n) inputs since we need the I(n) ability to go to negative temps. The write address for changing the set point is 2160. For background I have been successfully using these for over a decade but with GMobdus which I cannot get a license for anymore.
11-01-2023 12:19 PM
I'm not sure if this applies to you but this document has a procedure on how to write set temp procedure.
As it was written before, a 32 float has to be break down in 2 16 bit in adjacent addresses.
11-01-2023 12:25 PM
This is from a Watlow manual which may or may not be the device you are using:
As such it could be that to set it you might need to set both 2160 and 2161, and without checking your device setup it's not possible to know which one should be which.
Since you do probably need to set two, you should probably be using a "write multiple registers" VI, not just a single register write. Try it in both ways.
Note that I said "Type cast", not "convert to". The difference is important. A SGL uses bits like this:
If you type cast properly, then you get those bits as a U32 which will often be a number in the millions or billions if you read it as an integer. If you just convert it you will get a number like "25". I mention this because you brought up the need to go negative as a reason not to use U32, implying that you might have just done a "convert".
11-01-2023 12:32 PM
Thanks I will do a deeper dive and see if I can find the issue with writing. I am sure it is a formting issue.
11-02-2023 07:07 AM
Thank you for your help and I now have a working solution.