LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

U8 to I32

Hello everybody ,
 
I am using LV8.2, I have problem to index my array subset with an U8 value looks like the array subset accept only I32 type, I am trying to read an XL files in csv format and need to read from a certain lines that is ways I need to index the aary.
Any idea how to solve the issue?
see the pic attached.
 
thanks
 
 
 
0 Kudos
Message 1 of 11
(3,906 Views)

On the Functions Pallette:

Numeric/Conversion/To Long Integer

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 2 of 11
(3,896 Views)
The index array does accept a U8. If it didn't, you would have a broken wire. All that you have is a coercion to the default I32 input.
0 Kudos
Message 3 of 11
(3,890 Views)

I have already tried that but doesn't work you can see the red flag in the input, in LV7.1 I could connect immediately the result of the substraction to the index of the arraysubset without any troubles.

Do you know how I can solve this issue?

0 Kudos
Message 4 of 11
(3,887 Views)

Althought there is no broken wire my indictor DATABUILD UP does not display any lines, but if I connect a control I32 it is working, but I need the value coming frome the SFR adress which is in U8 format.

As I said before I didn't have this problem in LV7.1.that is strange

0 Kudos
Message 5 of 11
(3,886 Views)
Hi Benio,
why don't you post the relevant part of the code so we can reproduce the problem.
Greets, Dave

P.S. Is the value at your first index (row) greater than the available rows? If the value passed to "Address" is less than 127, the index value will be not negative or zero (as you may expect), it's (Address - 127) + 256 !
Greets, Dave
0 Kudos
Message 6 of 11
(3,870 Views)

Hi Benio,

As Dave points out, the values may not  be what you may expect for values of the U8-127 if the values are less than 127.  If you are aware of this then disregard this post.  If you re not then view the post attachment for an illustration.  as a not or a quick test you can change the constant "127" representation to I32 and see if that works for you.

0 Kudos
Message 7 of 11
(3,861 Views)
The reason why I substract 127 is because my SFR address I need to read start from 128 see attached file, I have put and offset of -1 because the first row define the header(B0-B7).
So after the substarction operation I need to set my arraysubset index which doesn't work because the lenght is not ok.
 
0 Kudos
Message 8 of 11
(3,818 Views)
I have solved the solution by just putting a control instead of a constant to substract 127 and it works.
 
 
0 Kudos
Message 9 of 11
(3,805 Views)
That is not possible.  A control is the same as a constant.  You must have changed the representation as well.
0 Kudos
Message 10 of 11
(3,788 Views)