03-25-2009 06:51 PM
Hi, everybody.
I have the message based device. I don't know when the device will send the message, so I didn't know how should I create the VISA read function to read whole string from the device(because it reads only data, which are enabled at serial port buffer).May be it can be done by using VISA bytes at port in while loop, but I don't know exactly how.Can you explain it to me?Or do you have any other solution?Thank you for your help.
Solved! Go to Solution.
03-25-2009 06:54 PM
03-26-2009 03:13 AM
03-26-2009 05:22 AM
Hi
I reworked the basic serial read and write example, just to give you some programming hint. Also remember that then reading from the serial buffer, you do not need to read all the content. Read the number of bytes you need. The serial buffer is FIFO type. So the oldest content will always be first in the queue to read.
My example is somewhat simple, and I did not test it but should work. Check out queues and notifiers (in example finder) for more advanced programming techniques.
03-26-2009 05:52 AM