############################################################################## ケースレー24XXのリモートコントロール/Remote control for Keithley 24XX ############################################################################## Introduction ================== Keithley 2400 Series SourceMeter is commonly used as a HV supplier for silicon detectors in the HEP community. It has a GPIB (IEEE488) or RS232 interface for remote control. This page introduces an example software for remote control and monitoring output voltage and current. Ingredients ================== ===================== =================================================== Device details ===================== =================================================== PC to control Linux (Developed on CentOS 7 with gcc7 by devtoolset-7 of SCL, see `here `_) Power supply unit Keithley 2400 Series SourceMeter (e.g. 2410, 2400 etc.) USB-GPIB or USB-RS232 Tested with Prologix USB-GPIB, Buffalo BSUSRC06 and UGREEN USB-RS232 Converter with PL2303 ===================== =================================================== Command line interface software ==================================== You can find a software with a command line interface at my GitLab repo. `here `_. Download and compile --------------------------------- :: git clone https://gitlab.cern.ch/hirose/SerialConsole.git cd SerialConsole make ls bin Before using the software:: --------------------------------- Check the device file of the GPIB, or RS232 interface:: #Check which /dev/ttyUSBXX is your GPIB/RS232 interface #Option 1: #plug/unplug and check messages by dmesg. #You may see one like below... [1040519.380505] usb 1-1: new full-speed USB device number 19 using xhci_hcd [1040519.552252] usb 1-1: New USB device found, idVendor=0403, idProduct=6001 [1040519.552262] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [1040519.552269] usb 1-1: Product: Prologix GPIB-USB Controller [1040519.552276] usb 1-1: Manufacturer: Prologix [1040519.552281] usb 1-1: SerialNumber: PX1ULNHZ [1040519.558184] ftdi_sio 1-1:1.0: FTDI USB Serial Device converter detected [1040519.558265] usb 1-1: Detected FT232RL [1040519.559511] usb 1-1: FTDI USB Serial Device converter now attached to ttyUSB2 #In this case, ttyUSB2 should be your GPIB interface. #Warning: this device file might be changed after rebooting your PC!! #Option 2: #Making a permanent device file based on a USB port number. #Create /etc/udev/rules.d/90-usb-aliases.rules #Add below to the file. SUBSYSTEM=="tty",KERNELS=="1-1",SUBSYSTEMS=="usb",SYMLINK+="ttyUSB_PORT1-1" SUBSYSTEM=="tty",KERNELS=="1-2",SUBSYSTEMS=="usb",SYMLINK+="ttyUSB_PORT1-2" #...until your desired number of ports. #To check which bus and port number exist, test all existing ports to plug/unplug while checking dmesg. If you see... usb 1-3: FTDI USB Serial Device converter now attached to ttyUSB2 #the port which you pluged a cable is 1-3. #The device file of your GPIB/RS232 interface will always have same name like /dev/ttyUSB_PORT1-2. Check the device file permission:: #If you see no write permissin on /dev/ttyUSBXX, do below to make your life easier. sudo gpasswd -a $USER dialout #Then open /lib/udev/rules.d/50-udev-default.rules, and modify the line below KERNEL=="tty[A-Z]*[0-9]|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*", GROUP="dialout" #to KERNEL=="tty[A-Z]*[0-9]|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*", GROUP="dialout", MODE="0666" Setting in your SourceMeter:: ###For GPIB Go to MENU->COMMUNICATION->GPIB. Then select a desired GPIB device address. **NOTE** Address=0 has to be avoided (reserved for the USB-GPIB interface). **NOTE** The address should be unique if you are daisy chaining your devices on one GPIB interface. ###For RS232 Go to MENU->COMMUNICATION->RS-232. Then select a desired GPIB device address. **NOTE** Make sure that the RS232 settings in Keithley is set as below. **NOTE** BAUD=9600, BITS=8, PARITY=NONE, TERMINATOR=, FLOW-CONTROL=NONE Preparing a config file:: #Config file in a json format is passed for each executable. #Example in configs/HV/example_keithley24XX.json { "devicetype": "Keithley 2400", "devicefile": "/dev/ttyUSB_PORT1-1", "address": 23, "interfacetype: "GPIB", "channels": [ { "channel": "A", "voltage": 20., "current": 40.E-6 } ], "sweep_steps": 50 } Explanation of each entry: "devicetype" : Specify your device name (currently meaningless...) "devicefile" : Specify the device file checked above. "address" : Specify the GPIB address set above. "interfacetype" : Specify the interface type. "GPIB" or "RS232" are the option. "channels" : Voltage and current compliance settings. Units are [V] and [A]. Put "-" for the negative voltage. "sweep_steps" : N steps to change an applied voltage to the target value. How to control Keithley 24XX via the executables. --------------------------------- Interactive session:: #If you just control only one SourceMeter, it may be the best to use ./bin/run_keithley24XX. ./bin/run_keithley24XX. configs/HV/example_keithley24XX.json #Then it prompts your action like below. ==================================================== Please specify what you want to do... 0: Initializing Keithley2410 1: Reset Keithley2410 2: Configure HV value 3: Sweep HV value to the target 4: Output ON 5: Output OFF 6: Read voltage/current 100: Change #sweep steps 101: Change sweep interval 99: exit No = (waiting for your type...) #This prompt repeats until you specify "99" to exit. Explanation of each operation: 0: Configuring Keithley 2400 to be V source mode with appropriate V range. 1: Reset Keithley 2400 to go back to the state just after main power on. 2: Change the HV value setting. 3: Same as 2, but sweep HV value with specified the number of sweep steps. 4: Make Output ON. 5: Make Output OFF. 6: Read voltage and current. You can return to the prompt by hitting any key. Read values are shown on your terminal and stored in a file named data/IV_KEITHLEY2410_addrXX.dat. 100: You can change the number of sweep steps. Note that the minimul voltage step is 1 V. 101: You can change the interval between sweep steps. The unit is millisecond. 99: Exit the application. #NOTE: You can exit the application while keeping output ON. ***Typical workflow:*** 0(config)-> 4(Output ON)-> 3(Sweep HV to your desired value)-> 6(Monitor IV)-> (Your measurement)-> 3(Sweep HV to 0 V)-> 1(Reset)-> 99(Exit) #NOTE: OUTPUT ON/OFF won't touch HV setting. It's just emulating the OUTPUT ON/OFF button!! Command sets with no-interactive session:: #If you control multiple SourceMeters or controling them with combination of other DAQ, executables below might be useful. bin/output_off_keithley24XX [your config file] bin/output_on_keithley24XX [your config file] bin/output_sweep_keithley24XX [your config file] bin/read_iv_keithley24XX [your config file] #They are basically having a same function as the operation 3-6 as above.