I'm realizing a little project. My problem is about the acquisition of data, generated from my device ( an electrocardiograph) by RS232. Actually The device produces a string of data like this: 2 bytes of header, 3 data bytes, and a byte for the time between 2 sampling. I realized the acquisition VI in attachment ( just the acquisition part, not the entire setup) which unfortunately gives data in group of 2 ( e.g. efa5 5ea3....). Is it possible to have data separately (e.g. ef 43 ff.....), so that it is possible to token the string with “match pattern vi”? The idea is in fact to divide the string into character and put them into an array.
you can break up the string, or ask for less data. simply wire less e.g.6 instead of 6000
You even can ask for the use of an endchar if you have one, or use the first char of the header as an endchar for the previous data.
In the stringpalette you see a lot of functions to handle strings/characters
Thanks for the reply but the point is not the string handling, but the form of the incoming string from rs232 that is in group of 4 characters (e.g. FF3A CA5D....) instead of (e.g. FF 3A CA 5D....). I need many characters so I have to set the number of byte to 6000 or more.
Thanks again for your help.
Thank you, your replay solved my problem. I succeded in dividing my string in single bytes. I have just an other little problem ( I hope ): I have a while loop to acquire from rs232, an other one to divide the string obtaining 3 array and finally I should convert my hexadecimal string in a decimal one. Unfortunately the "hexadecimal string to number vi" gives me only zeros. String arrays are full of characters, but the instrument converts all in zeros.
I would be really grateful if you could help me. In attachment there is my VI to make more clear my question.
Thanks a lot