I am new to LabVIEW and a friend told me that sometimes the codes made for specific Keithley models do not work in newer or older models. I was wondering which are the common steps to do, or which things to check when a LabVIEW code designed for a K2400 needs to be adapted for a K2600.
Thanks all for your answers!
Solved! Go to Solution.
Well in general if one model has functions or ranges the other does not. Then code written for one model will not run on the other model if it uses those functions or ranges.
Also most "Initialize" VIs do an IEEE 488.2 IDN* query to see if that certain model is present and will error out if it is not. The ID query is often an option though and can be disabled.
Sometimes newer instruments are backwards compatible with older instrument code, but they might have to be placed in a special mode. For instance we have a lot of code for HP/Agilent/Keysight 3497xA DAQ/Switch units. Keysight has replaced the 3407xA series with a new DAQ97xA line. The DAQ97xA can be put in 3497xA mode so it is compatible with programs written for the 3497xA series.
Depending on your program you may want to write a Hardware Abstraction Layer (HAL) class and a child class for each device inheriting from the HAL class. The HAL class with have an initialize.vi where it send an IDN command to get the model number to determine which child class to use. The output of the intialize.vi is dynamically dispatched to instantiate the correct child class.
Those instruments were designed about a decade apart, and they don't use common commands.
- Keithley 2400 is a single SMU which uses SCPI commands.
- Keithley 2602 is a dual SMU that uses LUA. It does have a 2400 emulation mode, but using that mode has limitations; its slower, its only for a single SMU.
As noted, there are NI drivers for both, and they are not interchangeable. The K2400 driver uses SCPI commands, while the K2602 uses LUA. You can look at the old code for the K2400 and its structure to see if it makes sense for the K2602 design. If you are using the NI drivers you won't have to make that many modifications to get the code working with the K2602.
Hope that helps