Basically only one app should access the instrument. But in
some circumstances, two apps may need access at a time.
For instance, one app sets up the measurement mode, and
another app retrieve measurement data.
In this case the app1 posts setting cmd/query and/or retrieves
responses. And the app2 posts measurement cmd/query. Actual
scenario is like below:
app1:
Lock()
viWrite(vi, ":xxx:meas:mode yy")
viWrite(vi, ...)
viRead(vi, ...)
Unlock()
app2:
Lock()
viWrite(vi, ":xxx:meas:voltage?")
viRead(vi, ...)
Unlock()
Because app1 & app2 are in different processes, Windows critical section or
semaphore are not enough. Instead you need use a mutex. I don't know
if VISA lock/unlock are enough for this purpose.
makoto
"Kamran S." w
rote in message
news:506500000005000000755A0000-1011517314000@exchange.ni.com...
> That's a good point, you should be able to access the interface
> through two different applications but you should never really access
> the same instrument at the same time with two different applications.