Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

how to integrate 2 equivalent devices in the same software

I have LV code that's using one turntable. How can I reuse my LV code to access another turntable (different manufacturers). But these 2 turntable will operate exclusively. Thanks in advance.
Louis.
0 Kudos
Message 1 of 3
(3,206 Views)
I believe your want your program to use your 'turntable driver' for both turntables which is a great idea and here's how you do it:

/ turntable 1 driver
software - turntable driver
\ turntable 2 driver

So make your 'turntable driver' a set of VI's with functionality common to both turntables. In the 'init' function you can specify which model your refering to. From then on, every call to a 'turntable driver' VI will break out into the lower level VI which is specific to that turntable. If you make your software (application) call the high level turntable driver VI's and never the lower level ones, then you will be able to freely interchange the two tables. If you are using both at once,
you need a system for the high level driver calls to know which model to talk to on every call (might be able to do *IDN?, otherwise you can pass it around as a wire, or a real fancy way is to bundle the VISA session and the model name together in a cluster and pass that around just like you would a VISA session)
0 Kudos
Message 2 of 3
(3,206 Views)
Thanks.
0 Kudos
Message 3 of 3
(3,206 Views)