03-19-2012 03:31 AM
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
Solved! Go to Solution.
03-19-2012 03:35 AM
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?
03-19-2012 04:51 AM
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
03-19-2012 04:58 AM
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
03-19-2012 05:11 AM
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:))
03-19-2012 05:17 AM
Thanks NitzZ and Akiel, So much grateful for your help