Overlapped Command and *OPC? #150
Replies: 3 comments 1 reply
-
It is not a good idea to create an overlapped query, because results would be in random order or executions will be synchronous anyway. So the practical usage is for overlapping commands, not queries. You can plan multiple measurements or configurations and when they are all done, you can read the results. |
Beta Was this translation helpful? Give feedback.
-
It makes sense that an overlapped query should not occur. I therefore do not know how I should implement the query.
So now I just need to figure out which way this required query should be implemented since it should not follow the specification. When the query comes in should I just return "0" or "1" for if the operation is complete, or should I return nothing or "1"? |
Beta Was this translation helpful? Give feedback.
-
Okay Thanks. It should be similar to the *WAI command then. |
Beta Was this translation helpful? Give feedback.
-
I am trying to figure out the best way to implement the "*OPC?" query when I have an overlapped command.
If I am reading the 488 spec correctly it is supposed to place a "1" into the output queue so the MAV bit gets set. I do not see how this can happen within the context of running "SCPI_Input()". Therefore I do not have the "*OPC?" query returning anything. I am guessing returning the result should then occur withing the context of determining that the overlapped commands have all completed. So am I supposed to just use "SCPI_ResultInt32(context, 1)" when the operation completes, or is there a better way? Is there some way that I can have it return "1\r\n" like the default "SCPI_CoreOpc()" call would do withing the context of SCPI_Input() call?
I guess my question can be made more generic by asking what is the best way of populating a result that occurs some time later and without blocking subsequent processing of the input buffer.
Beta Was this translation helpful? Give feedback.
All reactions