c# - Which IVI references should I use? -
i'm new basic .net projects attempting make test system use t & m instruments communicates using scpi on various media such gpib, usb, etc. have keysight io libraries installed , have been reading visa.net documentation therein.
i program visa vendor-neutral (as possible) decided stick using implementation via ivi.visa interfaces. thinking of coding communications instrument following psuedo-code:
//access implementation via ivi interfaces keep things vendor neutral using ivi.visa; // session manager var session = (igpibsession)globalresourcemanager.open(alias, accessmode, timeout); // use formatted io interface of session var io = session.formattedio; // communication operations // usercommand faux type object io.printfandflush("%s", usercommand.tostring); if (usercommand.query) io.scanf("%s", out usercommand.result); // doesn't seem close method on resource manager, session or interface? session.discardevents(eventtype.allenabled); session.dispose(); i noted while thought com examples saw in other documentation referred older usage, com examples still being referred (eg sending scpi/gpib commands on usb c#).
exploring further in visual studio reference manager see not there visa com type library, there instrument specific ivi assemblies (eg: ivi scope assembly) , similar com type libraries (eg: iviscope 3.0 type library).
i'm bewildered these , ones i'm supposed use or not use!
what for? mean, differences between them or why use 1 on other? (maybe there source succinctly explains difference or general use cases somewhere?).
here background info. in end, don't think can give up-to-date information directly answers question.
you can communicate instrument different levels:
- low-level i/o
- visa
- vendor-provided ivi driver
- class ivi driver
the different levels might depend on presence of components lower level , might allow access lower-level specific features.
low-level i/o drivers either provided operating system or i/o hardware manufacturer. usbtmc , gpib examples.
visa abstracts i/o drivers, allowing general code independent of particular installation's i/o hardware. allow detection of i/o resources features can have branches perform special operations needed, such rs-232 line termination detection or low-level gpib feature. data send have match instrument's command language, such scpi.
an ivi driver library provides instrument domain-specific functions. driver interacts instrument through command language don't need code that. might provide passthrough functions read , write using instrument's command language features library doesn't cover. ivi driver might use visa communications (usually does), , might require particular visa vendor (usually doesn't).
an ivi class driver library provides common domain-specific functions 1 class of instruments such dmms , signal generators. allows program code independent of instrument vendor. class driver require class-compliant, vendor-provided ivi driver installed.
now, visa implementations either com or shared library (function exports), either of can used in visual basic (and other .net languages). don't have recent experience these few years ago, between agilent , ni, agilent provided com interfaces , ni provided shared library interfaces.
Comments
Post a Comment