Zen writes:
> Johannes Niess a écrit :
>
> >
> > In theory: Once. It depends on whether you have an initialisation
> > phase or want to avoid it. If you don't need high speeds, you can
> > leave it the way it is.
>
> I send a string everery two seconds, and raed the reponse from the
> device. I just don't know if the serial buffer is emptied before
> receiving the response string. If not, there might be left old caracters
> causing a wrong response string.
You should use VISA and forget about the low level stuff. If you have
non-binary communication (printable characters only, CR/LF) you can
try to read e. g. 1000 chars and VISA returns the string until the
first linefeed. And you get a timeout loop for free 🙂
Joha
nnes Nieß