11-12-2012 03:16 PM
Hello,
I have Data in I-32 ( 1D-Array 32 Bit) and I want to convert it into U8 ( 1D-Array 8 Byte) how I can doing that with Labview?
BR
11-12-2012 03:34 PM
Give an example of the data you are trying to convert. An I32 ranges from +/- 2,147,483,648, while a U8 is from 0 to 255. So coercing data if it is negative or larger than 255.
11-12-2012 04:03 PM
Assuming you only care about the bits and not the actual numbers, look into the Type Cast function.
11-13-2012 01:11 AM
11-13-2012 03:26 AM
Hello, I have Lin Communication with RS232. At first I have Data with RS232-Write sent data [85.,125,23,2,39,5,255,255,255,255,186] so the Input ist a string in ASCII- Form. Data to send is 8 bit Integer so I convert the data at firt to I-32 then I use Convert number to Hexdecimal string.
With RS232 I try to get the answer, But the output string[553c17022705FFFF] so I try to to make from this string an Array [55,3C,17,02,27,05,FF,FF] and then I convert it with Hexdecimal string convert to Number in I32, then to U8 because, with data to rec and massage fram is in U8.
My problem is: to get the Data rec I have to use the Array-Subset where is the the array is the massage frame and the index is the message size from Data to send + 1 = 12 .
My resut in data rec is array with only the first value[55,3C,0,0,0,0,...] and the other value is zero.
So i don´t know wher ist the error? Can you help me
The result in the Frontpanel is:
Message_Frame: 55,7d,BA,55,7D,55,FF,FF,0,0,0
Data_rec is: 55,7D,0,0,0,0,0,0,0,0,
I think I have problem with convert but i can not see the erorr
11-13-2012 07:26 AM
11-13-2012 07:28 AM
Ok, maybe we should be asking this: What does the original data look like and what do you want in the end? I think you are over complicating things.