05-26-2017 09:07 AM
Hi everyone, i am a student with a small knowledge on labview.
I just have this confusion, here is my project in attachment, on the variable called dInputSFP, when i insert it into a cluster, it changes the positive value to negative, although i have checked the "adapt to source".
Any idea? Help? I can always just create a new numeric indicator and just put it inside, but I would love to understand why it changes. Hope you guys can help. Thank you.
Solved! Go to Solution.
05-26-2017 09:20 AM - edited 05-26-2017 09:22 AM
I can't open your file but I'm going to bet that the representation of the number is set to U16 or U32, which is an unsigned integer (only positive numbers). Right click the control and change it to a signed integer (I16 or I32).
Edit: I misread your post. You said it changes a positive number to negative.
05-26-2017 09:21 AM - edited 05-26-2017 09:37 AM
Your shared variables are U16 (unsigned 16 bit) which have a range of 0-65535
Your cluster uses I16 (signed 16 bit) which have a range of -32768 to 32767. So the large half of the numbers of a U16 can't fit into a I16. The highest bit is the sign bit in an I16.
You need to have consistency in your datatypes. Make the cluster have U16 arrays to match the shared variables. If you need numbers that are larger than 32767, but also need to have negative numbers, then you need a larger datatype such as an I32 consistently used.
Turn on context help (Ctrl-H) and hover over the various wires.
05-26-2017 09:26 AM
cheers man! It worked.
05-16-2018 12:26 AM
This is what I use.