06-23-2023 02:34 AM
Hi all, could someone explain to me why if a value is written to the variable in this case 3.003, in reading mode I only read 3 if all the indicators are of type Double. I tried changing the properties of the indicator as well.
06-23-2023 03:41 AM
Hi a.,
@a.garciaperez wrote:
Hi all, could someone explain to me why if a value is written to the variable in this case 3.003, in reading mode I only read 3 if all the indicators are of type Double. I tried changing the properties of the indicator as well.
That could be anything from race conditions to different indicator formatting…
For a detailed analysis you need to attach code. Real (and complete) code!
06-23-2023 04:00 AM
Here is an example of what I do
06-23-2023 04:07 AM - edited 06-23-2023 04:25 AM
06-23-2023 08:13 AM - edited 06-23-2023 08:14 AM
You are "binding" it to another shared variable with the same name. So what's that datatype of that other one?
(Showing an example with a greedy loop and glaring race condition does not inspire a lot of confidence.)
06-26-2023 02:12 AM
Thanks for the answer, I'm sorry I didn't understand what you meant by real code, in fact the code works. But i use the Holding Register variables of the Modbus Slave and as soon as I create it, I put it at the address 40005 and give it Double data type, and still not work.
06-26-2023 02:24 AM
Hi a.,
@a.garciaperez wrote:
But i use the Holding Register variables of the Modbus Slave and as soon as I create it, I put it at the address 40005 and give it Double data type, and still not work.
Does your Modbus device support float values on its holding register?
06-26-2023 04:13 AM
06-26-2023 04:38 AM
Sorry I didn't create a loop gracefully it was to show how "simple" what I try to do is that as I wrote in earlier answer basically it is a virtual connection in which through the VI I send the values to the Holding Register variables on the "4000xx" addresses I put them in "read/write" mode so that I can send the values to the "4000xx" variable and read them with ModScan32 or any other software. I created the variable using the Modbus Slave of I/O Server function and I chose the address "4000xx" and data type Double