Anapico
Bases: VisaDriver
A driver for controlling Anapico signal generators via the VISA interface.
This class provides methods to control and query the Anapico signal generators, including setting and querying the frequency, power, and RF state of a specified channel.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
resource_location
|
str
|
The VISA resource name used to connect to the device. |
required |
Initialize the Anapico object with the specified resource location.
The constructor configures the communication termination character as a newline character.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
resource_location
|
str
|
The VISA resource name used to connect to the device. |
required |
Source code in driverlib/anapico/anapico.py
16 17 18 19 20 21 22 23 24 |
|
idn
property
idn
Retrieve the identification string.
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
The identification string of the device. |
get_frequency
get_frequency(channel)
Query the frequency of a specified channel.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
channel
|
The channel number. |
required |
Returns:
Name | Type | Description |
---|---|---|
float |
The frequency of the specified channel in Hz. |
Source code in driverlib/anapico/anapico.py
26 27 28 29 30 31 32 33 34 35 |
|
set_frequency
set_frequency(channel, value)
Set the frequency of a specified channel.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
channel
|
The channel number. |
required | |
value
|
The desired frequency in Hz. |
required |
Returns:
Name | Type | Description |
---|---|---|
self |
Returns the instance itself to allow for method chaining. |
Source code in driverlib/anapico/anapico.py
37 38 39 40 41 42 43 44 45 46 47 48 |
|
get_power
get_power(channel)
Query the power of a specified channel.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
channel
|
The channel number. |
required |
Returns:
Name | Type | Description |
---|---|---|
float |
The power of the specified channel in dBm. |
Source code in driverlib/anapico/anapico.py
52 53 54 55 56 57 58 59 60 61 |
|
set_power
set_power(channel, value)
Set the power of a specified channel.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
channel
|
The channel number. |
required | |
value
|
The desired power in dBm. The Anapico cannot output less than -10 dBm. |
required |
Returns:
Name | Type | Description |
---|---|---|
self |
Returns the instance itself to allow for method chaining. |
Raises:
Type | Description |
---|---|
ValueError
|
If the specified power value is less than -10 dBm. |
Source code in driverlib/anapico/anapico.py
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
|
get_rf_state
get_rf_state(channel)
Query the RF output state of a specified channel.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
channel
|
The channel number. |
required |
Returns:
Name | Type | Description |
---|---|---|
int |
1 if the RF output is enabled (on), 0 if disabled (off). |
Source code in driverlib/anapico/anapico.py
83 84 85 86 87 88 89 90 91 92 |
|
set_rf_state
set_rf_state(channel, state)
Sets the RF output state of a specified channel.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
channel
|
The channel number. |
required | |
state
|
The desired state. True to enable (on) the RF output, False to disable (off). |
required |
Returns:
Name | Type | Description |
---|---|---|
self |
Returns the instance itself to allow for method chaining. |
Source code in driverlib/anapico/anapico.py
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
|
close
close()
Close the connection to the device.
Source code in driverlib/visa_driver.py
64 65 66 |
|
get_error
get_error()
Retrieve the error message from the device.
Returns:
Name | Type | Description |
---|---|---|
str |
The error message. |
Source code in driverlib/visa_driver.py
77 78 79 80 81 82 83 |
|
print_error
print_error()
Print eventual errors occurred.
Source code in driverlib/visa_driver.py
85 86 87 |
|
reset
reset()
Reset instrument to factory default state. Does not clear volatile memory.
Source code in driverlib/visa_driver.py
89 90 91 92 |
|
clear
clear()
Clear event register, error queue -when power is cycled-.
Source code in driverlib/visa_driver.py
94 95 96 97 |
|