Pfeiffer TPG 366 Agent

The Pfeiffer TPG 366 Controller is a six channel pressure gauge monitor. The Pfeiffer agent communicates with the Controller module, and reads out pressure readingss from the six different channels.

usage: python3 agent.py [-h] [--ip_address IP_ADDRESS] [--port PORT]
                        [--mode {acq,test}]

Agent Options

--ip_address
--port
--mode

Possible choices: acq, test

Default: “acq”

Configuration File Examples

Below are useful configurations examples for the relevent OCS files and for running the agent in a docker container.

OCS Site Config

To configure the Pfeiffer TPG 366 Agent we need to add a PfeifferAgent block to our ocs configuration file. Here is an example configuration block using all of the available arguments:

{'agent-class': 'PfeifferAgent',
 'instance-id': 'pfeiffer',
 'arguments': [
   ['--ip-address', '10.10.10.20'],
   ['--port', '8000'],
   ['--mode', 'acq'],
   ]}

You should assign a static IP address to Pfeiffer device, and record it here. In general, the Pfeiffer device will assign port 8000 by default. This should not need to be changed unless you you specificy the port otherwise.

Docker Compose

The Pfeiffer Agent can be run via a Docker container. The following is an example of what to insest into your institution’s docker-compose file.

ocs-pfeiffer:
  image: simonsobs/socs:latest
  hostname: ocs-docker
  network_mode: "host"
  environment:
    - INSTANCE_ID=pfeiffer
  volumes:
    - ${OCS_CONFIG_DIR}:/config:ro

Agent API

class socs.agents.pfeiffer_tpg366.agent.PfeifferAgent(agent, ip_address, port, f_sample=2.5)[source]
acq(sampling_frequency=2.5, test_mode=False)[source]

Process - Get pressures from the Pfeiffer gauges.

Parameters:
  • sampling_frequency (float) – Rate at which to get the pressures [Hz]. Defaults to 2.5 Hz.

  • test_mode (bool) – Run the Process loop only once. This is meant only for testing. Defaults to False.

Example Clients

Below is an example client to start data acquisition:

from ocs.ocs_client import OCSClienti
import time
pfeiffer = OCSClient("pfeiffer", args=[])
params = {'auto_acquire': True}
pfeiffer.acq.start(**params)
pfeiffer.acq.wait()
time.sleep(0.05)

Note

If ['--mode', 'acq'] is specified in the ocs configuration file, acquisition will begin automatically upon agent startup, so there may be no need to run this client.