LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

grouping the incoming boolean data in groups of two

Solved!
Go to solution

Hello, 

 

I ve 4 bit digital data(boolean) coming into the DAQmx continuously, and i need to group the data into groups of two, concatenate the elements in the group and convert it into ascii charaters and display . I m not getting much idea as to what to do, to implement this.

 

This is what to do

Data stream: 4,8,6,F,2,0,3,5.......etc

 

data groups:48,6F,20 etc

 

Need help regarding grouping of elements. I dont think storing it into an array is gona help me, coz i need to display the ascii charater as soon the data in its group arrives. ie if 48 is for 'H', i need to display 'H'  as soon  4 and 8 arrives, by grouping them together, similarly for 6F to be converted to 'o' and so on.

 

Thank you

0 Kudos
Message 1 of 6
(2,208 Views)

would concat the chars into a string then use number string to hex help? giving you the hex number to then convert to the respective char help?

Please remember to accept any solutions and give kudos, Thanks


LV 8.6.1, LV2010,LV2011SP1, FPGA, Win7
0 Kudos
Message 2 of 6
(2,207 Views)

i m sorry , i didnt completely understand the "number string to hex" part that  the concatenated string works on. In fact my doubt is  if the string is 486F2078, as i ve mentioned earlier, the output should not be 48,86,6F,F2,20  but instead 48,6F,20,78 etc.  Please be kind enough to explain this

Thanks

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

number string to hex is a vi in the string ->string conversion menu. it takes a string of hex charecters and converts them to a hex number data type. so once you have group your string subset you can pass it in to convert the format. i would use a for loop and string subset commands to get the numbers correctly and display as appropriate. sorry I havent a chance at the moment to put together a rough vi for you but can discuss ideas

 

hope it helps 

Please remember to accept any solutions and give kudos, Thanks


LV 8.6.1, LV2010,LV2011SP1, FPGA, Win7
Message 4 of 6
(2,200 Views)
Solution
Accepted by topic author walker_is_here

Hi Walker_is_here,


Check out the attached vi. It may help you.


Regards,
NitZ

(Give Kudos to Good Answers, Mark it as a Solution if your problem is Solved:)) 

Message 5 of 6
(2,193 Views)

Thanks NitzZ and Akiel, So much grateful for your help

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