TEXIO PW-Aシリーズの外部コントロール/TEXIO PW-A Series Control

Introduction

TEXIO PW-A Series LV power supply is widely used in Japanese HEP community. It has an option board IF-41 series with GPIB/USB/RS232 interface for remote control. This page introduces an example software for remote control and monitoring output voltage and current.

Ingredients

PC to control

Linux (Developed on CentOS 7 with gcc7 by devtoolset-7 of SCL, see here)

Power supply unit

TEXIO PW-A Series Power Supply (e.g. PW8-3AQP)

Adapter board

IF-41RS (IF-41USB was also tested but no chance to readout I/V values…)

USB-RS232 interface

Tested with 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 USB-RS232 interface:

#Check which /dev/ttyUSBXX is your RS232 interface

#Option 1:
#plug/unplug and check messages by dmesg.
#You may see one like below...
usb 1-5: pl2303 converter now attached to ttyUSB2
#or like
usb 1-5: FTDI USB Serial Device converter now attached to ttyUSB2
#In this case, ttyUSB2 should be your USB-RS232 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 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 LV device:

Push "A" key (current setting key) while turning on the main power, then select the system address to be non-zero value. To store the address, push the MEMORY button.
**NOTE** See details on the PW-A series manual.
**NOTE** Daisy chaining PW-A devices is also supported. Set an appropriate address for each device.

Preparing a config file:

#Config file in a json format is passed for each executable.
#Example in configs/HV/example_keithley24XX.json
{
    "devicetype": "PW18-1.3ATS",
    "devicefile": "/dev/ttyUSB_PORT1-5",
    "address": 0,
    "channels": [
        {
            "channel": "A",
            "voltage": 1.7,
            "current": 1.1
        },
        {
            "channel": "B",
            "voltage": null,
            "current": null
        },
        {
            "channel": "C",
            "voltage": 1.7,
            "current": 1.1
        },
        {
            "channel": "D",
            "voltage": null,
            "current": null
        }
    ]
}

Explanation of each entry:
"devicetype" : Specify your device name (currently meaningless...).
"devicefile" : Specify the device file checked above.
"address"    : Specify the system address set above.
"channels"   : Voltage and current limit settings.
               Units are [V] and [A]. Don't need "-" for the negative voltage.
               Channel "A"("D") is the output port on the most right(left).
               Some models don't have four outputs, but you can specify "null" for voltage and current.
               Specigying "null" for existing ports, the output will be disabled.

How to control TEXIO PW-A Series via the executables.

Command sets with no-interactive session:

#Several primitive executables are provided.

#Emulating OUTPUT ON/OFF button
#NOTE: they won't touch the LV setting
bin/output_on_texio_pw_a [your config file]
bin/output_off_texio_pw_a [your config file]

#Configure the voltage and current limit settings.
bin/config_texio_pw_a [your config file]

#Monitoring the voltage and current value.
bin/read_iv_texio_pw_a [your config file]
#This command returns outputs like below. Use grep, cut, awk etc to monitor your detector.
A: Mon Mar 25 20:30:52 2019 +0900 : Voltage = 1.80061 [V], Current = 0 [A], CV
B: Mon Mar 25 20:30:52 2019 +0900 : Voltage = 0.01051 [V], Current = 0 [A], CV
C: Mon Mar 25 20:30:52 2019 +0900 : Voltage = 1.79995 [V], Current = 0.00033 [A], CV
#NOTE: Output format uses the timezone of your system.
#NOTE: The last character indicates CV(Constant Voltage) or CC(Constant Current) mode.

Common mistakes, TIPS

  • If your device won’t respond,,,

    • Check the device file name. Rebooting PC may give a different device file name.

    • Check the serial cable type. Straight type gender changer will mess up the serial communication lines.

    • Check the system address. The number must be in range of 1-26.

    • Put “sleep” in betwee two commands. Some machines may react slowly, then some commands might be skipped in your device.

  • The config command uses the preset 4 (as it’s treated as the default by TEXIO).

  • Your device may be in the state of the local-lockout (LL) to prevent manual operation by the keys. You can cancel it by holding down the KEY LOCK/LOCAL.

  • User has to remind yourself which output channel gives negative voltage in your application. You don’t need “-” sign in both config files. Terminal output doesn’t show “-” sign neither.