Andreas:
Needing synchronization is a very common issue because if one area of code writes a query, and then another section of code comes along and does a query, there are a couple of issues:
1) In most 488.2 instruments, the response to the second query will overwrite the response to the first query. Only one of the two pieces of code (depending on which runs next) will get that response.
2) Even if the instrument generates two responses, it is possible the pieces of code will be interleaved, generating strange results. For example, write A1, (context switch), write A2, (context switch), read A1, (context switch), read A2.
There are several solutions. You can use LabVIEW semaphores, which you have done. You can also use VISA locks, which do p
retty much the same thing, as long as each section of code has its own session. If you use the same session in both pieces of code, then VISA locks wouldn't help you.
So since your solution works as is, keep it. It's good, it's needed in your case, and it's the right thing to do.
Dan Mondrik
National Instruments