05-01-2015 04:29 PM
Hello,
I'm using a custom command and I would like to have my response to a fill slide
my problem is that the response is an u8 and it needs to be a number.
How do I need to do this?
Thanks in advance!
05-01-2015 04:51 PM
You shouln't have any problem? What makes you think it doesn't work?
The U8 should be coerced to double automatically.
05-01-2015 04:52 PM
A U8 is a number. The "U" part means "Unsigned", the "8" means "8-bits". Thus a U8 can represent numbers from 0 through 255 (in binary, from 00000000 to 11111111). If you simply displayed it, you would see that it took on these numeric values.
Contrast this with I8, an 8-bit integer, with the highest bit being the "sign" bit. Here, binary 11111111 will represent -1 (anything with the high bit set is negative). Note that adding binary 00000001 (or "1") to binary 11111111 (or -1) gives 0 (as in -1 + 1 = 0).
Bob Schor
05-01-2015 05:00 PM
Perhaps he has a string in hexadecimal format and doesn't know the proper vocabulary.
05-01-2015 05:45 PM
joap wrote:I'm using a custom command and I would like to have my response to a fill slide
my problem is that the response is an u8 and it needs to be a number.
How do I need to do this?
As others have said, U8 is a number (for convenience, it can be displayed in many ways, decimal, hexadecimal, binary, etc. but that does not change the underlying data value).
Any scalar numeric source (control, diagram constant) can be wired to a fill slide. Make sure the fill slide is an indicator.
Do you get a broken wire? If so, what does it tell you when open the context help (ctrl+h) and hover over the broken wire?
Please explain what you mean by "response". Where does the value come from, how often?
Easiest would be if you could show us your code. Make a typical value of your U8 the default before saving.
05-02-2015 03:17 AM
I don't have a broken wire.
response: I send a variable from my Arduino to labview, this variable is the response.
here is a part of my code:
05-02-2015 03:21 AM
Can you show us what this U8 looks like on the front panel? It's an array of U8, each element probably represents a char....
05-02-2015 04:23 AM
05-02-2015 11:56 AM
Try using the "Byte Array to String" function: http://zone.ni.com/reference/en-XX/help/371361L-01/glang/byte_array_to_string
05-02-2015 12:27 PM