06-10-2014 11:01 AM
I have different settings for the range here that i can readout:
Solved now with your calculation:
-10V..+10V --> Range=10
-5V..+5V --> Range=5
-1V..+1V --> Range=1
-500mV..+500mV --> Range=0.5
-150mV..+150mV --> Range=0.15
But what to do with:
4mA..20mA
-10mA..20mA
0mA..20mA
-210°C..760°C
270°C..1372°C
...
can the calculation be changed to accept two values?
Thx again.
06-10-2014 11:27 AM - edited 06-10-2014 11:27 AM
Try this out:
06-11-2014 04:00 AM
Hm, found a problem...the given Read- value is a U16 and not an I16.
What do i have to change?
Thank you
06-11-2014 05:23 AM
@OnlyOne wrote:
Hm, found a problem...the given Read- value is a U16 and not an I16.
What do i have to change?
Thank you
Are you sure about that? That would not work for the -10V to +10V range. Possibly for the temperature one. In that case, you just need to add by the minimum value instead of the average of the max and min.
06-11-2014 05:47 AM - edited 06-11-2014 05:47 AM
I am sure because the open-source modbus-dll that provides the function to read out this register returns an ushort-array.
Here are some values that are displayed in the webinterface for +/- 10V-range:
FFFC = -0,001
F32D = -1,001
E662 = -2,001
BFF7 = -5,001
8CB8 = -9,006
8000 = -10V
-------------
0005 = 0,001
0CD3 = 1,001
199E = 2,001
4008 = 5,003
7340 = 9,006
7FFF = 10V
So it looks like 0V..10V is displayed as 0005x to 7FFFx
and
the negative values are 8000x to FFFFx in opposite order.
But how to put this in a vi including the different ranges?
Thanks
06-11-2014 06:10 AM
@OnlyOne wrote:
I am sure because the open-source modbus-dll that provides the function to read out this register returns an ushort-array.
Here are some values that are displayed in the webinterface for +/- 10V-range:
FFFC = -0,001
F32D = -1,001
E662 = -2,001
BFF7 = -5,001
8CB8 = -9,006
8000 = -10V
-------------
0005 = 0,001
0CD3 = 1,001
199E = 2,001
4008 = 5,003
7340 = 9,006
7FFF = 10V
So it looks like 0V..10V is displayed as 0005x to 7FFFx
and
the negative values are 8000x to FFFFx in opposite order.
But how to put this in a vi including the different ranges?
Thanks
It is actually using 2's Complement. By definition, that is an I16.
06-11-2014 06:42 AM
Thx -
Now, after everything is working, i found in the module an option to set the return-value to Engeneering-format 🙂
06-11-2014 06:46 AM
@OnlyOne wrote:
Thx -
Now, after everything is working, i found in the module an option to set the return-value to Engeneering-format 🙂
Well, I hope you at least learned something through this experience.