Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POLARIS: support for Keithley 2420 (specifically for thermoelectric cell) #2801

Closed
kjwoodsISIS opened this issue Nov 29, 2017 · 13 comments
Closed

Comments

@kjwoodsISIS
Copy link
Contributor

As a visiting scientist, I would like to use a Keithley 2182 voltmeter to make measurements on POLARIS.

Acceptance Criteria

  1. I can control a Keithley 2182 voltmeter from IBEX
  2. I can log data collected by the Keithley 2182 voltmeter.

Notes:

  1. Keithley 2182A
  2. We may have existing LabVIEW VIs for the Keithley 2182A. We could wrap these up in lvDCOM.
  3. Jamie Nutter (Electronics) may have an alternative device (for which we do have drivers) and we could use that instead.
  4. Scientists would like to test this on Wednesday/Thursday (6th/7th December 2017), if possible.
@Tom-Willemsen
Copy link
Contributor

How many distinct things do they need to measure? If it's just a few, maybe it would be sufficient to set up the SDTest ioc?

@kjwoodsISIS
Copy link
Contributor Author

From: Seb Long (external)
Sent: 29 November 2017 12:41
To: Woods, Kevin (Tessella,RAL,ISIS); Smith, Ron (STFC,RAL,ISIS); Howells, Gareth (STFC,RAL,ISIS)
Cc: Nutter, Jamie (STFC,RAL,ISIS); Hull, Stephen (STFC,RAL,ISIS)
Subject: Re: Polaris - Ibex - Keithley interface

Hi Gareth,

Ive just had a look at the source meter and it looks like it is possible to invert the current between constant current voltage measurements.

And just to confirm, the 3 measurements from the source meter would be:

  1. voltage
  2. resistance with a constant current of say 30 mA
  3. resistance with a constant current of -30mA

Seb

@GDH-ISIS
Copy link

Currently, I believe the measurement is going to be done with a Keithley 2420. Electronics has given me a unit that is now in our office (in the corner where the devices are kept).

@John-Holt-Tessella
Copy link
Contributor

I suggest then that we test the device using the following.

  1. Add the Keithly 2400 to a config
  2. Add some user blocks for the three items needing measurement
  3. Write a python script function which:
    1. Sets the IOC to use passive measurements
    2. Loops around:
      1. Set into voltage mode
      2. Measure the voltage (process the record) puts it in the user pv
      3. Goes into current mode
      4. Sets current to 30 mA and measures the resistance puts it in the user pv
      5. Set the current to -30mA and measures the resistance puts it in the user pv
  4. Wrap the function in a thread which can be started/stopped so other python scripts can be run alongside

Measurements need to go into a user block because the different values are taken for different reasons.

@GDH-ISIS
Copy link

Path to existing LabVIEW vi is :
C:\LabVIEW Modules\Drivers\Keithley 2410\Keithley 2410 - Thermoelectric Cell.llb\Keithley 2410 - Thermoelectric Cell - Front Panel.vi
Note : This vi does not cover the complete procedure Seb now requires.

@GDH-ISIS
Copy link

I have asked for a test resistor and cabling from electronics.

@GDH-ISIS
Copy link

GDH-ISIS commented Nov 30, 2017

Test resistor and cabling now connected to Keithley 2420 in R3 office. Device is set to 9600 baud rate.
It is necessary to put device into auto ohms source manual mode. This is done by :

  1. Press the CONFIG key.
  2. Press the MEAS Ω key.
  3. Select the SOURCE menu item.
  4. Select the MANUAL ohms source mode.
    The resistance measurement can then be made with a user defined current - for this ticket 0, +30mA and -30mA

@GDH-ISIS
Copy link

User is currently not here at RAL. Maybe consider contacting him via email when this has been implemented.

@Tom-Willemsen
Copy link
Contributor

Tom-Willemsen commented Nov 30, 2017

I believe the following script has the right behaviour (tested on Keithley 2420 in the office).

khly2420.zip [Edit: this is an outdated version, see new version below]

Setup:

Keithley 2400 IOC settings:
Baud = 9600
Bits = 8
Port = COM13 (COM 9 in office moxa)
Stop = 1
Everything else default.

To set up blocks:
keithley2420_resistance_2 -> TE:NDWxxxx:PARS:USER:R2
keithley2420_resistance_1 -> TE:NDWxxxx:PARS:USER:R1
keithley2420_voltage -> TE:NDWxxxx:PARS:USER:R0

Set up precisions and units:

caput TE:NDW1799:PARS:USER:R2.PREC 5
caput TE:NDW1799:PARS:USER:R1.PREC 5
caput TE:NDW1799:PARS:USER:R0.PREC 5

caput TE:NDW1799:PARS:USER:R2.EGU ohm
caput TE:NDW1799:PARS:USER:R1.EGU ohm
caput TE:NDW1799:PARS:USER:R0.EGU volt

Script is intended to be used as a context manager so that they can easily wrap their existing scripts

i.e.

with ThermoElectricCell(current1=0.01, current2=-0.01):
    do_existing_script

If they want to run it standalone, just give it an infinite function in the body of the with statement, e.g.

with ThermoElectricCell(current1=0.01, current2=-0.01):
    raw_input("Press return to stop thermo electric cell")

It does all it's commands in a different thread so should not interfere with any existing scripts they have.

Check behaviour against LabVIEW driver in C:\LabVIEW Modules\Drivers\Keithley 2410\Keithley 2410 - Thermoelectric Cell.llb - should be the same.

Note: In the office the keithley is set up with a resistor, it's best to use a smaller current (say, +10mA and -10mA) currents.

If the keithley box complains "can't set source in auto resistance mode" then follow the process that Gareth detailed two comments above to put it into manual mode

I also found and fixed a (tiny) bug in the keithley driver as part of this ticket, so when reviewing please check you have the change introduced in ISISComputingGroup/EPICS-ioc@536e0b9

Needs to be reviewed by 5th Dec as they want to test it on the 6th/7th

@Tom-Willemsen
Copy link
Contributor

Tom-Willemsen commented Dec 5, 2017

Version that fixes the resistance mode setting:
khly2420.zip

Some changes required to protocol file. Replace the following commands in the Keithley 2400 protocol (C:\Instrument\Apps\EPICS\support\Keithley_2400\master\data\Keithley2400.proto) with the following commands (leave other commands untouched:

# /// Read the voltage from the data string. Format is %f (V), %f (I), %f (R), %f (Timestamp), %f (Status)
get_V {
   ExtraInput = Ignore;
   out ":MEAS:VOLT?";
   in "%f,%*f,%*f";
}

# /// Read the resistance from the data string. Format is %f (V), %f (I), %f (R), %f (Timestamp), %f (Status)
get_R {
   ExtraInput = Ignore;
   out ":MEAS:RES?";
   in "%*f,%*f,%f";
}

Remember to undo these changes after the experiment is complete.

@Tom-Willemsen
Copy link
Contributor

Also turned off all scans/PINIs for Polaris' Keithley 2400 IOC. That will also need undoing when the experiment is over.

@GDH-ISIS
Copy link

GDH-ISIS commented Dec 6, 2017

Current source range needs to be set on the device before hand.

@GDH-ISIS GDH-ISIS changed the title POLARIS: support for Keithley 2182A POLARIS: support for Keithley 2420 (specifically for thermoelectric cell) Dec 6, 2017
@GDH-ISIS GDH-ISIS added completed and removed review labels Dec 6, 2017
@Tom-Willemsen
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants