KIKUSUI PCR500MA Agent
This agent is designed to interface with KIKUSUI’s PCR500MA AC power supply.
usage: python3 agent.py [-h] [--port PORT] [--ip-address IP_ADDRESS]
Agent Options
- --port
Port number for TCP communication.
Default: 5025
- --ip-address
IP address of the device.
Configuration File Examples
Below are configuration examples for the ocs config file and for running the Agent in a docker container.
OCS Site Config
An example site-config-file block:
{'agent-class': 'PCR500MAAgent',
'instance-id': 'pcr500ma',
'arguments': [['--port', 5025],
['--ip-address', '192.168.0.100']]
},
Docker Compose
The PCR Agent should be configured to run in a Docker container. An example docker-compose service configuration is shown here:
ocs-pcr500ma:
image: simonsobs/socs:latest
hostname: ocs-docker
network_mode: "host"
volumes:
- ${OCS_CONFIG_DIR}:/config:ro
environment:
- INSTANCE_ID=pcr500ma
- LOGLEVEL=info
The LOGLEVEL environment variable can be used to set the log level for
debugging. The default level is “info”.
Description
PCR500MA is an AC power supply that can be cotrolled via ethernet. This power supply will be used to the stimulator heater to raise its temperature.
The device only accepts 10/100BASE communication. Manual can be found here.
Agent API
- class socs.agents.kikusui_pcr500ma.agent.PCR500MAAgent(agent, ip_addr, port=5025)[source]
OCS agent class for PCR500MA current source
- Parameters:
ip (string) – IP address
port (int) – Port number
- acq(sampling_frequency=0.2)[source]
Process - Monitor status of the relay.
- Parameters:
sampling_frequency (float, optional) – Sampling frequency in Hz, defaults to 0.2 Hz.
Notes
An example of the session data:
>>> response.session['data'] {"I_AC": 0.00475843, "V_AC": 0.0371215, "P_AC": 0.0, "f_AC": 60.0, "output": 0, "timestamp": 1737367649.2595236 }
- set_output(output, force=False)[source]
Task - Turns the output on or off.
- Parameters:
output (bool) – True : output on False : output off
force (bool, default False) – Force output on / off without checking output value.
Notes
This function measures the output voltage when turning off and checks the voltage setting when turning on by default. If the voltage is too high it will not change state to avoid an abrupt change in applied voltage. Set force option to True when this behavior is unwanted.
- get_output()[source]
Task - Get output status.
Notes
The most recent data collected is stored in session.data in the structure:
>>> response.session['data'] {'output': True, 'timestamp': 1737367649.2595236 }
Supporting APIs
- class socs.agents.kikusui_pcr500ma.drivers.PCR500MA(ip_addr, port=5025, timeout=3)[source]
PCR500MA driver
- Parameters:
ip_addr (str) – IP address of the device
port (int) – Port number
timeout (float) – Timeout count in seconds
- set_output(output)[source]
Set output status
- Parameters:
output (bool) – True : output on False : output off
- get_output()[source]
Get output status
- Returns:
status – True : output on False : output off
- Return type:
bool
- set_coupling(pcr_coupling)[source]
Set output coupling
- Parameters:
pcr_coupling (PCRCoupling) – PCR coupling
- set_current_limit_ac(current_amp)[source]
Set AC current upper limit
- Parameters:
current_amp (float) – AC currrent upper limit in Ampere.
- get_current_limit_ac()[source]
Get AC current upper limit
- Returns:
current_amp – AC current upper limit in Ampere.
- Return type:
float
- set_current_limit_dc(current_amp)[source]
Set DC current upper limit
- Parameters:
current_amp (float) – DC currrent upper limit in Ampere.
- get_current_limit_dc()[source]
Get DC current upper limit
- Returns:
current_amp – DC current upper limit in Ampere.
- Return type:
float
- set_frequency(freq, freq_llim=None, freq_ulim=None)[source]
Set AC frequency.
- Parameters:
freq (float) – Frequency in Hz.
freq_llim (float) – Frequency lower limit in Hz.
freq_ulim (float) – Frequency upper limit in Hz.
- set_volt_ac(volt, volt_llim=None, volt_ulim=None)[source]
Set AC voltage
- Parameters:
volt (float) – AC voltage in V.
volt_llim (float) – AC voltage lower limit in V.
volt_ulim (float) – AC voltage upper limit in V.
- get_volt_ac()[source]
Get AC voltage setting
- Returns:
volt – AC voltage setting in V.
- Return type:
float
- meas_volt_ac()[source]
Measure AC voltage
- Returns:
volt – Measured AC voltage in V.
- Return type:
float