11-05-2008 04:42 AM
Hi All,
In a previous application I wrote using Agilent VEE I created a Configure Equipment and Initialise Panel for the user to select for example a signal generator from a drop down list of different types, and when initialised the functions for that item would loaded into a generic library called Signal Generator into my main program. I could then call these functions in my main program
When I wrote the instrument drivers I named each function the same for each type of signal generator I could offer the user. e.g. Set_Frequency (would be in all instrument drivers)
I would like to do this in LabVIEW and am struggling to find out how to do it.
Does anyone have any suggestions? And I hope what I have said above makes sense.
TIA
Martin
11-05-2008 06:09 AM
I solved this task with the vi-server vis.
Each instrument is controlled by one source-vi with 'standard' terminals having type defined in and output clusters. In my case one of the inputs is a strictly type defined enumerate called action-control (startup,setup,init device, configuration, measure, free device, close,...) realized as a state MC. Each source-vi could run for his own, but don't need to show up a front panel.
If a vi that is called via vi-server open a reference to its own, the caller vi might even be closed and the source will still run in the background. Nice if you collect data (longtime) from a lot of different sources where one source might crash/stop but the others should keep on working.
The main vi calls these sources, collect the data .....
All sources where places in subdirectory tree, so one can 'simply' add sources without touching the main system. However these sources might even be distributed over different PCs
11-05-2008 06:41 AM
You should find some ideas and implementation searching for 'plug-in architecture' in the forum. Also the SubPanel might be of interest to you.
Felix
11-05-2008 07:57 AM
Hi Henrik,
Thanks for that. Do you have any code examples? I'm still getting to grips with VI-Server, and its capabilities.
TIA
Martin
11-05-2008 08:54 AM
11-05-2008 08:59 AM
I'm also investigating whether IVI drivers will be able to do what I want. Has anyone used IVI for instrument control?
11-05-2008 09:02 AM
Marty H wrote:Has anyone used IVI for instrument control?
Yes. What's your question? ![]()
Seriously, though. IVI is nothing new, and there are many instrument driver examples in the Instrument Driver Network. There are also several KnowledgeBase articles on IVI, such as:
Using IVI Drivers to Build Hardware-Independent Test Systems with LabVIEW and LabWindows/CVI
11-05-2008 10:13 AM
My question is the same as my first post, which is can you program LabVIEW so the user can select a signal generator that they may use of different manufacturer, ie. Agilent, R&S, Anritsu, and then call a generic function in your main program, lets say Set Frequency, and determined from the choice, control that signal generator correctly.
I have also found how to create a library and add VIs to it. Could you tell me what the library is for? And how can you load/call them up in a VI.
Cheers
Martin
11-10-2008 08:50 AM
With regards to communicating with hardware
from other manufacturers, yes you are able to do this using LabVIEW
provided the drivers are available from National Instruments, or
sometimes the manufacturers themselves provide LabVIEW VIs to use with
their instruments.
To configure the device it may be worth
implementing some form of popup dialog box to input the values for your
particular configuration. This can be done by creating a SubVI where
you are able to input the values and once a button is pressed the
dialog box closes (as in the example I have attached)
Just to
mention also, VI Libraries are mainly for organization purposes, and
grouping VIs together. It also allows you to protect your VIs by
setting them to private, which means they are only able to communicate
with other VIs within that particular library.
Hope this Helps,
Steve