Dear Alain,
You are correct, your firmware must detect whether or not a query was present in the input queue message buffer before returning from the InputQueueEventHandler. From my investigation into the IEEE 488.2 specification, the message exchange protocol does not make any provisions for an execution error. If the user places a valid query header, the parser should set the query message true (i.e., returning false from the InputQueueEventHandler). If the Execution control then realizes that the query is unexecutable due to an execution error, the device will not have a response to the query. The device will still, however, move from QUERY to RESPONSE in the MEP diagram. There are three scenarios:
1) If the host application clears the device (if, for exa
mple, it had generated SRQ and the host determined it was in an error state), the MEP transitions to IDLE.
2) If the host application attempts to read the query, it will timeout and the MEP remains in RESPONSE.
3) Finally, if the host application sends another set of data, the MEP will transition to READ generating a query error.
Therefore, you should just return true from the InputQueueEventHandler when you detect a valid query header. The EXECUTION error should have no direct affect on the MEP.
Thanks,
Eric Singer
National Instruments
eric.singer@ni.com