07-15-2013 01:34 PM
Same comment here about the VISA events.
Why are you doing a VISA close in parallel with a VISA read? You have a race condition. If the close occurs before the 53 bytes are read, you will lose those bytes.
07-15-2013 01:36 PM
Even with them there is problem. You are right I can remove concatenate string.
Yes the antenna constantly sending data. What do you think can I keep open and close inside the loop? In this case working properly.
07-15-2013 01:50 PM
Why is the antenna system sending data continuously? That just confuses things if you are also trying to slip some command/request communication in the middle of that.
If the antenna only sent data when you requested it, that would be better. Right now, it doesn't look like you are trying to read or do anything with that data besides the Read Position data you are actually requesting.
07-15-2013 02:05 PM
The vi only works because VISA open (And Close. Clears the buffers. the loop should be "Flush buffer (To get rid of the old outdated data) then, Read" Write appears unnecessary since the device contunually spews the latest data to the buffer. No need to wait for the button press either. just keep up with the data.
07-15-2013 02:13 PM
@sam009 wrote:
Yes the antenna constantly sending data.
Then I would create a second loop that does nothing but read that COM port. You can then display/store the latest information. You can use a queue or notifier to send that data back to your main loop.
You should probably also put your numerics in the event structure with their own Value Change event.