Hi, all:
I use Visa to write/read data from hardware through COM port, the protocol is interactive communication, labview send commnd frame first, then hardware send back required data frame.if labview don't send command frame, then hardware send 0x00 continuously. frame length is 10 bytes.
My idea is: use Visa Write to send one frame down, then inside a While loop a Visa Read to get the data frame, when get the right data frame, stop while loop.
But I found the while loop can't stop, with probe, I found the data frame sliped once, it seems that Visa Read get the data then very soon it get 0x00 so that the comparison function can't finish to handle the data, then 0x00 arrives to the probe which sticked the input terminal of comparison funciton.
I solved this problem use a buffer string to store Visa Read's output read buffer, and make Visa Write and Visa Read a pair inside the while loop.
I wonder why the comparison function can't catch the data frame from Visa Read exactly.
Please refer to the attchment jpg file, it is not the real vi, just illustration