10-05-2005 10:44 AM
10-05-2005 11:05 AM
10-05-2005 11:14 AM
10-05-2005 11:31 AM
Thanks
at moment, i can use the parallel execution in some queue function, and my new problem is i need to transfer the data (which is in serial port) in subvi to main vi to process. but actually I don't know which function i will use in lanview to store the data in serial port.
thanks
10-05-2005 11:38 AM
10-06-2005 03:12 AM
The reason why i use parallel execution is: the test system i develop is for testing different termianl. the different termianl will send different bytes at the begining through the rs232.
i firastly set up a bytes to read( thread) , but actually i don't know how many bytes will be send from another termianl. So i try to use the parallel execution, the subvi is only to do read data from rs232 and put in itnto buffer, which is also use to get response from the termianl when doing the test. and the main vi is to do read the data from the buffer and process the data.
so, my questions are:
1) i try to use a vi to result the function, but the string i read from subvi can't stay, for instance, firstly, the bytes is 300 bytes and it dispaly in windows and then 150 bytes come in and then display, but the first one was been flushed. i just want to keep the first received string.
2) in fact, when i received the string, i also need to use them to compare with some existing string. so how to process theses string displayed in windown in labview.
many thanks
10-06-2005 12:23 PM - edited 10-06-2005 12:23 PM
In your main vi, create a parallel loop and a string indicator array. Inside the loop, call your subvi that gets the serial data. Just get the serial data once, and pass it back to the main through the connector pane. In main, create a shift register in the loop, and each time the serial subvi is called, insert the string received into the array using the shift register and Insert Into Array function. That way, each time serial data is read, the array becomes populated with the new data. Old data is still there. See picture:
Message Edited by tbob on 10-06-2005 11:24 AM