Dressler

Cesar1312 RF Generator

class instruments.dressler.Cesar1312(filelike)[source]

Communicate with the Dressler Cesar 1312 RF generator.

Various connection options are available for different models. This driver has been tested using the RS-232 option. The instrument for which this driver was tested required odd parity mode. You must provide the correct parity for your device when opening the serial connection.

Note that you must set the control mode to ControlMode.Host in order to send any commands from the computer to the device.

Example:
>>> import serial
>>> import instruments as ik
>>> port = '/dev/ttyUSB0'
>>> baud = 115200
>>> inst = ik.dressler.Cesar1312.open_serial(port, baud, parity=serial.PARITY_ODD)
>>> inst.control_mode = inst.ControlMode.Host
>>> inst.rf  # query RF state
False
>>> inst.rf = True  # turn on RF
class ControlMode(*values)[source]

Control modes of the Cesar 1312 RF generator.

FrontPanel = 6
Host = 2
UserPort = 4
class RegulationMode(*values)[source]

Regulation modes of the Cesar 1312 RF generator.

ExternalPower = 8
ForwardPower = 6
LoadPower = 7
query(package: bytes, len_data=1) bytes[source]

Send a package to the instrument, assert it’s all good, and return answer.

This sends the package and checks the response. If the response is NAK, it retries until an ACK is received or the number of retries is reached.

Once an ACK is received, it listens for the response of the instrument parsed the header, command, and optinally the data length (if > 6), then listens to the data and checksum and ensures that the overallc hecksum is zero. If not, it will send a NAK and retry reading until the checksum is zero. Then it will send an ACK to finish the communication.

Parameters:

package (bytes) – The package to send.

Returns:

The data received from the device.

Return type:

bytes

sendcmd(pkg: bytes) None[source]

Send a package to the instrument and assert it’s all good.

Uses the query routine and interprets the data, which should be one byte, as a CSR. If the CSR is not OK (0), will print a warning with the message.

Parameters:

pkg (bytes) – The package to send.

property address: int

Set/get the address of the device.

Note that an address of 0 is the broadcast address. Most likely, you can leave this at the default of 1.

Returns:

The set address.

Return type:

int

property control_mode: ControlMode

Set/get the active control of the RF generator.

Possible values are given in the ControlMode enum. For computer control, you likely want to set this to ControlMode.Host.

..note:: If you set the control mode at any time back to

ControlMode.FrontPanel, the RF will turn off.

Returns:

The current control mode.

Return type:

ControlMode

Example:
>>> inst.control_mode = ik.dressler.Cesar1312.ControlMode.Host
>>> inst.control_mode
<ControlMode.Host: 2>
property name: str

Get the supply type and size of the RF generator.

Returns:

The supply type and size.

Return type:

str

Example:
>>> inst.name
'CESAR_1312'
property output_power: Quantity

Set/get the output power of the device in W.

Returns:

The output power in W for the defined mode.

Return type:

u.Quantity

Example:
>>> inst.output_power = 10 * u.W
>>> inst.output_power
<Quantity(10, 'watt')>
property reflected_power: Quantity

Get the reflected power in W.

Returns:

The reflected power in W.

Return type:

u.Quantity

Example:
>>> inst.reflected_power
<Quantity(0, 'watt')>
property regulation_mode: RegulationMode

Set/get the regulation mode.

Possible values are given in the RegulationMode enum.

Returns:

The current regulation mode.

Return type:

RegulationMode

Example:
>>> inst.regulation_mode = ik.dressler.Cesar1312.RegulationMode.ForwardPower
>>> inst.regulation_mode
<RegulationMode.ForwardPower: 6>
property retries: int

Set/get the number of retries if a command fails.

Returns:

The number of retries as an integer.

Return type:

int

property rf: bool

Set/get the RF output state of the device.

RF on will be True while RF off will be False.

Returns:

The current RF state.

Return type:

bool

Example:
>>> inst.rf = True
>>> inst.rf
True