If you need it to handle an input such as "3F2" you'll need to check for this and do something to the input (I'll let you figure out what) before passing it into your loop. This assumes that your input string is always a multiple of 2 characters in length. If you want it in string form you can convert it using Byte Array to String. The output from the indexing terminal you created will now be a U8 (byte) array containing the data converted from the input string. Use an Empty String/Path? function to exit the While loop when the string being passed back into the shift register is empty.Wire the output of this function to the right-hand side of the While loop and make the terminal indexing (via right-click).Wire the default input of this function to a numeric constant with value 0 and type U8.Right-click on the numeric indicator and select Properties. Wire the substring before match output to a Hexadecimal String to Number function On your LabVIEW block diagram, add the Fract/Exp String to Number function (Functions Palette String String/Number Conversion) Right-click the number output node and select Create Indicator. Wire the match + rest of string output to the right-hand shift register terminal. split the string into the first two characters, and the rest
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |