12-01-2011 12:49 PM
I'm using the Visa modules to communicate with Agilent PNA.
I'm wondering how they works. Sometimes code is executing further not waiting for PNA to finish the operation (for example basis sweep).
Is the data flow paradigm broken here? Are they run in the separate thread?
Also I have the similar behaviour when I'm calling the .NET modules. Are they running as separate thread as well?
K.
12-01-2011 12:54 PM - edited 12-01-2011 12:55 PM
Waiting for an instrument to finish an operation is your responsibility, not that of VISA. The VISA functions send the specified command and return once the command has been sent. They have no way of knowing how long a command will actually take. If you have an operation that's going to take a long time then you need to use something like *OPC?.
This is no different in .NET (or any other programming environment).
12-02-2011 06:00 AM
Does it reffers to .net as well?
For example, if the .net module is starting some threads, processes and other stuff, can it run the furthel LV flow having all its internal stuff (processes & threads) it started not finished?
Is this mechanism valid for all externals modules, not only for VISA & .net I'm asking in this post?
K.
12-02-2011 08:45 AM
@MimiKLM wrote:
Does it reffers to .net as well?
I said:
This is no different in .NET (or any other programming environment).
Is there something about that that is not clear?
Again: It is your responsibility to wait if an operation takes a long time and the instrument cannot accept another command because it's busy. Most instruments queue up commands, but they have a limited buffer. You need to look at the documentation of the instrument and determine what you can and cannot do as far as queueing of commands.
12-02-2011 08:54 AM - edited 12-02-2011 08:55 AM
Much clearer would be "This is no different when you using .net or any other programing enviroments".
Or "It is common for ALL other programming environments. All of them are 'external' to the LV"
Maybe we are touching semantic here; but English is not my first language.
Thanks anyway.