LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating Classes Example Code.

Greetings:

 

I am new to LabWindows and want to create my own classes for instrument drivers.

I have the manual with SCPI commands that are available so would like to have functions where setvoltage(), getvoltage() etc.  Also would need to instantiate the instrument (here I would pass a string of the name of the instrument to connect to).

 

I do not see any codes examples.

 

Any ideas on how this can be done?

 

Sorry if this was previous posted and I missed it.

 

Thanks

0 Kudos
Message 1 of 2
(2,034 Views)

Have you tried searching for your instrument into the Instrument Driver Network (IDNet)? It is possible that a driver already exists for it and you save the time to write the relative code.

Besides that, "classes" does not apply to CVI as it is a pure C environment. You may write your own set of functions to communicate with the instrument on the appropriate channel.

This tutorial can be a good starting point to start discovering the instrument driver approach, it includes also some link to additional resources for you to read:

How to Use an Instrument Driver in LabWindows/CVI Tutorial



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 2
(2,009 Views)