09-12-2013 01:38 PM
I have my Visa Read and Write Access in multiple Event Structures under a while loop. I write and read different messages with some events. I send a message and expect a certain response back from the EUT. But I can also turn on errors in the EUT to get an error message at any time,not related to any event. How can I parse the Visa Read buffer to look for error messages without any event taking place? How do you know if there is data in the read buffer? Are the Visa Ports correct to be in the Event Structure? Any Examples?
Thanks
09-12-2013 01:51 PM
What I have done is use a second loop to constantly read the serial port. This loop can parse the data and then send the data up to the other loop using User Events, Notifiers, or even queues. This really only works if you have a good definition of the transmission inclusing sync byte, command ID, and command data format.
09-12-2013 03:02 PM - edited 09-12-2013 03:04 PM
@Roadrunna wrote:
... in multiple Event Structures under a while loop.
I am not familiar with that design pattern and it sounds silly. (Why multiple events? Where is "under"??) Can you show your code?
Why don't you poll the port in the timeout event?