andreapede Posted April 15, 2009 Report Share Posted April 15, 2009 I have one vi that control the writing and the reading on a serial device. I have the necessity to control in asynchronous way the writing routine and the reading routine. I would like to know which is the best approach to the problem considering the following issues: - writing low level routine write some data and read some data as acknowledge - reading low level routine is conceptually the same than writing ... I write some data and read some data Quote Link to comment
bbystrek Posted April 15, 2009 Report Share Posted April 15, 2009 QUOTE (andreapede @ Apr 14 2009, 06:49 AM) I have one vi that control the writing and the reading on a serial device.I have the necessity to control in asynchronous way the writing routine and the reading routine. I would like to know which is the best approach to the problem considering the following issues: - writing low level routine write some data and read some data as acknowledge - reading low level routine is conceptually the same than writing ... I write some data and read some data I'm not quite understanding the second approach. If the interaction is the typical command response, where the device never speaks on it's own such that it only speaks when asked a question, then the first approach would seem right. To avoid potential confusion in this sort of interaction, many of us typically flush any remaining characters in the VISA receive buffer before sending a new command to help ensure that when we go to wait for the response, it's not a stale one from a previous command that we may not have read out of the VISA buffer Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.