So is there a way for it to count once and wait for a new string to process the don't you try to use the "Number of Bytes at Port" property node to define the number of bytes you want to read and it will only read one full message at a time.īytes at Port is the wrong thing to use 99% of the time, and certainly the wrong thing to use here! In this example I can adjust the time to send the characters from Arduino to the Serial port but with a real problem I want to make the strings send up with any interval. So how do you calculate the sum only once after it receives the incoming string, and wait until a new string of characters is submitted after the next 10 seconds and then calculate the total once and then wait. After the first calculation, it again calculated the sum until the 10s were out and waited for the next string (the next string is "A10B20C30D40 ") come. The problem is that after getting the first data "A1B2C3D4" I calculated their sum of 10. I created a VI to read these posts, then split the numbers and their sum. They are the strings "A1B2C3D4" and "A10B20C30D40" and after the first string transmission, after 10s, I transmit the next string, the process can be seen in the picture below. I use Aruino and programmatically transmit the sequence to the computer via the serial port. I have a small test related to receiving data from a computer USB port.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |