An easier method than locking is to build a higher level vi that handles complete commands (writing and reading) to the analyzer. In this way labview will automatically schedule the first caller and put the second (or more) caller on wait.
This synchronisation is perfect for such an application. Locking on visa level is needed when you are running more executables at the same time.
greetings from the Netherlands