Jump to content

Two Cycle interaction


andreapede

Recommended Posts

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

Link to comment

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

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.