LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need to combine 16 elements of 1-D array into one element without trying to use either shift registers and/or concatenate string?

Currently in my file i have a two arrays which i pass on to a second segment in which i combine every 16 elements of the array into one element. My array is of type string but is actually a binary number(0 or 1). I need to combine every 16 elements for one hex word. My constraint in the time in doing the logic. When i use the shift registers and/possibly or the concatenate string function the results for a large amount of samples take a very long time which i want to cut down. Attached is the file i am currently using with comments above the block that i need to change. Any help would be appreciated.
Thanks
0 Kudos
Message 1 of 6
(3,320 Views)
I think you have attached nothing there!

By the way, to my understanding, if you only need to handle string array of 1s & 0s and obtain its hex equivalent. Attached method may be of useful to you, I hope.

Regards
ian.f k
labview@ianfung.net
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 Kudos
Message 2 of 6
(3,320 Views)

Does anyone have an example of this I am trying to do the same thing, reading n elements of a 1D array and combining 16 of them together to make a hex value.

 

Thanks

0 Kudos
Message 3 of 6
(2,780 Views)

Hi Nashm,

 

what's wrong with the example given more than 11 years before by ian?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 6
(2,769 Views)

I had not converted the code properly for my use but having looked twice at it I have got it working. Now I am just trying to create a 1D array with the hex values 

 

Thanks

0 Kudos
Message 5 of 6
(2,756 Views)

@nashm999 wrote:

I had not converted the code properly for my use but having looked twice at it I have got it working. Now I am just trying to create a 1D array with the hex values 


You need to be much more clear. Nobody knows what you mean by "hex values", that term is very ambiguous and does not even define the datatype (formatted, binary, numeric, string, etc.).

 

Please attach a simplified version of your code. Create controls that have typical default values and create an indicator that contains the expected output. Make current values default before saving. Also please start a new thread so you can properly mark a solution. 

0 Kudos
Message 6 of 6
(2,743 Views)