devices.pfeiffer:MPT200
MPT200 pressure gauge interface.
Usage
devices.pfeiffer:MPT200(interface)Provides methods to interact with a MPT200 pressure gauge through a VISA interface.
Methods
| Name | Description |
|---|---|
| __init__() | Initialize the MPT200 device. |
| checksum() | Calculate the checksum for a command string. |
| getFilamentState() | Get the current filament state. |
| getPressure() | Get the current pressure reading. |
| id() | Get the identification information of the device. |
| query() | Send a query to the device with calculated checksum. |
| resolvePressureValue() | Convert the device pressure reading to a float value. |
| setFilamentState() | Set the filament state. |
__init__()
Initialize the MPT200 device.
Usage
__init__(interface)Parameters
interface: str- VISA resource name or interface identifier.
checksum()
Calculate the checksum for a command string.
Usage
checksum(var)Parameters
var: str- The string to calculate checksum for.
Returns
int- The calculated checksum (0-255).
getFilamentState()
Get the current filament state.
Usage
getFilamentState()Returns
int- The current filament state (0=off, 1=on).
getPressure()
Get the current pressure reading.
Usage
getPressure()Returns
float- The current pressure value.
id()
Get the identification information of the device.
Usage
id()Returns
str- The device identification string.
query()
Send a query to the device with calculated checksum.
Usage
query(msg)Parameters
msg: str- The message to be sent.
Returns
str- The response from the device.
resolvePressureValue()
Convert the device pressure reading to a float value.
Usage
resolvePressureValue(reading)Parameters
reading: str- The raw pressure reading from the device.
Returns
float- The pressure value in appropriate units.
setFilamentState()
Set the filament state.
Usage
setFilamentState(state)Parameters
state: int- The desired filament state (0=off, 1=on).