LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

problem to sort data in array

ouh sorry..i didnt know that

0 Kudos
Message 41 of 50
(369 Views)

How come you are still having problems?

 

Use string to byte array.  Then use Index array to break the 7 array elements apart to sent them where you want to go.

 

0 Kudos
Message 42 of 50
(365 Views)

yes i know to do like that..but how do i make it compatible with my current table

i mean i want every byte has it own column and it will append as it received new value

0 Kudos
Message 43 of 50
(357 Views)

@icycool wrote:

Yes I know to do like that.  But how do I make it compatible with my current table.

I mean I want every byte has it own column and it will append as it received new value.


Please learn capitization and punctuation so your messages are readable.Smiley Mad  Also, it makes the posts look professional rather than lazy teenager trying to text message.

 

So now you have an array of numbers, you need to convert them to their string equivalent and append that to your array of strings.

 

Message 44 of 50
(349 Views)

Im really sorry for that. One more thing i need to ask. From my attachment, my program will looks like this;

1st byte will go to 1st column,2nd byte to 2nd column and so on. But i want the 8th byte to go back to 1st column mean i have 7 column for 7 repeated byte received. If possible i want only my 2nd,4th,5th and 6th column are visible in front panel.

0 Kudos
Message 45 of 50
(342 Views)

You can use resphape array to take a (8 times N) 1-D array and turn it into a 8 x N 2-D array.  Then concatenate that array to your table.

 

If you need to only show certain columns, then use Delete from Array to remove the unwanted columns.

Message 46 of 50
(331 Views)

Thanks for that Raven,

Can I know how do I split my byte into bits and I want to take bit0 and bit1 from byte1 combine with byte2 to become one element then bit0 and bit1 from byte3 combine with byte4 to become another element?

0 Kudos
Message 47 of 50
(297 Views)

Now it seems like you are putting on some completely different requirement to how you want to manipulate the data.

 

What about the other bits in byte 1 and byte 3 and ...?  What about the 7 bytes as they are now you wanted posted into different columns?

0 Kudos
Message 48 of 50
(294 Views)

Actually I wanted to learn different type of data manipulation as my received data format is not yet been disovered.

So here, Im just using fake data as received data. Right now I want to make my program to read the data from mppt. I've attached a manual before.

What I need is only input voltage,input current, output voltage and temperature. You can see the attached manual for detail.

 

0 Kudos
Message 49 of 50
(290 Views)

Take your first byte and AND it with 3.  That will mask off bits 2-7 leaving it only with bits 0 and 1.  Then use Join Numbers (Numeric/Data Manipulation palette) to join that byte with the 2nd byte.  Since they are 2 8-bit bytes to start with, the result will be a single 16-bit word, though effectively only 10 bits are used.

 

Alternatively, you could Join the bytes first and AND it with 1023  (00000011 11111111 binary).

 

Message 50 of 50
(287 Views)