LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Eliminate empty string elements in an array

Altenbach,

                    My problem was i could only transmit 8 bits through my usb controller.So i will be sending 30,00,000 of data and i need to convert this back to 15,00,000 of 16bit data and i will convert this back to an image.

 

 

Thanx a ton for the suggestion altenbach.You are right i am not very conversant with data types. Sure will take up your suggestion.

0 Kudos
Message 11 of 19
(2,052 Views)
Just a little info altenbach.The inplace function u see was suggested by you again.Thanx once again
0 Kudos
Message 12 of 19
(2,050 Views)

Hi altenbach,

                       I am getting this

 

 

Message Edited by muks on 08-30-2008 07:58 AM
0 Kudos
Message 13 of 19
(2,044 Views)

My expected output is this altenbach. I think i misunderstood your suggestion.

 

 

 

 

Message Edited by muks on 08-30-2008 08:00 AM
0 Kudos
Message 14 of 19
(2,041 Views)

muks wrote:

Just a little info altenbach.The inplace function u see was suggested by you again.Thanx once again


You lost me here. I don't see any "inplace" function in any of your code, so what exactly do you mean by your statement?


muks wrote:

                       I am getting this

 

 


You really have a serious problem with even the simplest code. 😮

Of course you will get a different result if you wire up a completely different program than what I suggested!!!

 

  • In my image the type is a U16 array, so why in the world would you change this to I64??? Makes no sense at all!
  • Why did you change "little endian" to "big endian"?
Message 15 of 19
(2,025 Views)

muks wrote:

My expected output is this altenbach. I think i misunderstood your suggestion.

 

 


NOOOOO!!!!!

 

This is NOT how you join 8 bit values to form 16 bit values! This is total garbage! 😮

 

Remember that 8 bit values are as follows (displaying all 8 bits)

 

00000001 (1)

00000010 (2)

00000011 (3)

00000100 (4)

 

So, after joining in the correct byte order, we get two 16 bit values:

 

0000001000000001 (513)

0000010000000011 (1027)

 

The way you are joining the values is completely meaningless and ambiguous, because there is no way to reconstruct the original data from the result. With your method, a result of 10011 could have come from e.g. [0:10011], [100:11], [1001:1], etc. with equal probability.

 

Attached is a quick draft, see if you agree with my results! 🙂

 

 

 

Message Edited by altenbach on 08-30-2008 10:07 AM
Message 16 of 19
(2,020 Views)

Just for completeness, here's another very simple alternative. 🙂

 

Message Edited by altenbach on 08-31-2008 06:33 PM
Download All
Message 17 of 19
(1,974 Views)


The way you are joining the values is completely meaningless and ambiguous, because there is no way to reconstruct the original data from the result. With your method, a result of 10011 could have come from e.g. [0:10011], [100:11], [1001:1], etc. with equal probability.

 

Attached is a quick draft, see if you agree with my results!


 Thanx for pointing that ou.I totally agree. The inplace function i mentioned was used inside the while loop of serial communication.

0 Kudos
Message 18 of 19
(1,961 Views)

muks wrote:

The inplace function i mentioned was used inside the while loop of serial communication.


There is no inplace function, but you can do certain operations "in place", e.g. using shift regsiters and replace operations. Still you need to initialize the array with the correct representation, U8 in this case.

 

LabVIEW 8.5 and higher has the "in place element structure" (see image), it can be useful sometimes. I first thought you were talking about this. 😉

 

Message Edited by altenbach on 09-01-2008 12:15 AM
Message 19 of 19
(1,949 Views)