diff --git a/README.md b/README.md index 7046df7..21b195a 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,9 @@ __\[fn_gen\]__ The Function Generator SCPI library in Python -### Description: A library for usage with SCPI compliant function generators (for now the DG2000 series from rigol) +### Description: + +A library for usage with SCPI compliant function generators (for now the DG2000 series from rigol) ### Installation: diff --git a/docs/all-documents.html b/docs/all-documents.html index ae892ab..fe7a4c3 100644 --- a/docs/all-documents.html +++ b/docs/all-documents.html @@ -139,7 +139,7 @@
Package
Package
PUBLIC
-
Undocumented
+
A library for usage with SCPI compliant function generators (for now the DG2000 series from rigol)
  • fn_gen.common
    @@ -147,7 +147,7 @@
    Module
    Module
    PUBLIC
    -
    Undocumented
    +
    Common functions that are used all over the package
  • fn_gen.dg2052
    @@ -155,7 +155,7 @@
    Module
    Module
    PUBLIC
    -
    No module docstring; 1/1 class documented
    +
    The main funciton generator module
  • fn_gen.enums
    @@ -163,7 +163,7 @@
    Package
    Package
    PUBLIC
    -
    Undocumented
    +
    Some enums that are used within this package
  • fn_gen.enums.comm_method
    @@ -171,7 +171,7 @@
    Module
    Module
    PUBLIC
    -
    No module docstring; 1/1 class documented
    +
    Communication Method Enumeration
  • fn_gen.enums.sweep_signal_type
    @@ -179,7 +179,7 @@
    Module
    Module
    PUBLIC
    -
    No module docstring; 1/1 class documented
    +
    Enumeration representing the different signal types used in a sweep
  • fn_gen.enums.sweep_spacing
    @@ -187,7 +187,7 @@
    Module
    Module
    PUBLIC
    -
    No module docstring; 1/1 class documented
    +
    The spacings used for the sweep
  • fn_gen.enums.sweep_trigger_slope
    @@ -195,7 +195,7 @@
    Module
    Module
    PUBLIC
    -
    No module docstring; 1/1 class documented
    +
    The different slopes used when the sweep_trigger_source is set to SweepTriggerSource.EXTERNAL
  • fn_gen.enums.sweep_trigger_source
    @@ -203,7 +203,7 @@
    Module
    Module
    PUBLIC
    -
    No module docstring; 1/1 class documented
    +
    The different sources available to trigger a sweep
  • fn_gen.errors
    @@ -211,7 +211,7 @@
    Package
    Package
    PUBLIC
    -
    Undocumented
    +
    A combination of errors used within the package
  • fn_gen.errors.undefined_communication_method_error
    @@ -219,7 +219,7 @@
    Module
    Module
    PUBLIC
    -
    Undocumented
    +
    An error type used when the communication method is not in the CommMethod enum
  • fn_gen.errors.undefined_value_error
    @@ -227,7 +227,7 @@
    Module
    Module
    PUBLIC
    -
    Undocumented
    +
    An error used when the value used is not defined
  • fn_gen.errors.value_out_of_bounds_error
    @@ -235,7 +235,7 @@
    Module
    Module
    PUBLIC
    -
    Undocumented
    +
    An error used when the value used is out of bounds for the function
  • fn_gen.errors.undefined_communication_method_error.UndefinedCommunicationMethodError
    @@ -291,7 +291,7 @@
    Function
    Function
    PUBLIC
    -
    Undocumented
    +
    Checks the whether the given value is within bounds
  • fn_gen.enums.comm_method.CommMethod
    @@ -444,30 +444,30 @@
    Class
    PUBLIC
    This is an object representing the Rigol DG2052 function generator. This object uses the SCPI protocol for communicating with the Rigol DG2052 function generator.
    -
  • +
  • -
    fn_gen.dg2052.DG2052.port
    -
    fn_gen.dg2052.DG2052.html#port
    +
    fn_gen.dg2052.DG2052.__comm
    +
    fn_gen.dg2052.DG2052.html#__comm
    Attribute
    Instance Variable
    -
    PUBLIC
    -
    The SCPI port describing the device, consists of a communication method and device port followed by the "::INSTR" keyword. communication method: can be either USB or TCPIP (other communication methods are not supported for this device) device port: either COMM4 or /dev/USB0 for USB in windows and posix systems respectively or the IP Address for TCPIP...
    -
  • +
    PRIVATE
    +
    Undocumented
    +
  • -
    fn_gen.dg2052.DG2052.rm
    -
    fn_gen.dg2052.DG2052.html#rm
    +
    fn_gen.dg2052.DG2052.__rm
    +
    fn_gen.dg2052.DG2052.html#__rm
    Attribute
    Instance Variable
    -
    PUBLIC
    -
    The resource manager object for pyvisa (for future use)
    -
  • +
    PRIVATE
    +
    Undocumented
    +
  • -
    fn_gen.dg2052.DG2052.comm
    -
    fn_gen.dg2052.DG2052.html#comm
    +
    fn_gen.dg2052.DG2052.__port
    +
    fn_gen.dg2052.DG2052.html#__port
    Attribute
    Instance Variable
    -
    PUBLIC
    -
    The communication method used (either TCPIP or USB)
    +
    PRIVATE
    +
    Undocumented
  • fn_gen.dg2052.DG2052.__init__
    @@ -483,7 +483,7 @@
    Function
    Method
    PUBLIC
    -
    shows the identification of the connected instrument
    +
    Shows the identification of the connected instrument
  • fn_gen.dg2052.DG2052.set_output
    @@ -499,7 +499,7 @@
    Function
    Method
    PUBLIC
    -
    Undocumented
    +
    Toggles the corresponding output channel
  • fn_gen.dg2052.DG2052.get_output_volt_limits
    @@ -515,7 +515,7 @@
    Function
    Method
    PUBLIC
    -
    Undocumented
    +
    Returns the output impedance.
  • fn_gen.dg2052.DG2052.get_output_load
    @@ -523,7 +523,7 @@
    Function
    Method
    PUBLIC
    -
    Undocumented
    +
    Returns the output load.
  • fn_gen.dg2052.DG2052.get_output_signal
    @@ -531,7 +531,7 @@
    Function
    Method
    PUBLIC
    -
    Undocumented
    +
    Returns the signal type and parameters.
  • fn_gen.dg2052.DG2052.get_output_state
    @@ -539,7 +539,7 @@
    Function
    Method
    PUBLIC
    -
    Undocumented
    +
    Returns the output state of the signal
  • fn_gen.dg2052.DG2052.is_output_on
    @@ -547,7 +547,7 @@
    Function
    Method
    PUBLIC
    -
    Undocumented
    +
    Returns a boolean representing the state of the output
  • fn_gen.dg2052.DG2052.set_dc
    @@ -555,7 +555,7 @@
    Function
    Method
    PUBLIC
    -
    Undocumented
    +
    Sets the output channel to DC voltage mode
  • fn_gen.dg2052.DG2052.set_sine_wave
    @@ -563,7 +563,7 @@
    Function
    Method
    PUBLIC
    -
    Undocumented
    +
    Sets the output channel to A Sine Wave
  • fn_gen.dg2052.DG2052.set_frequency
    @@ -571,7 +571,7 @@
    Function
    Method
    PUBLIC
    -
    Undocumented
    +
    Sets the frequency of the set signal
  • fn_gen.dg2052.DG2052.set_square_wave
    @@ -579,7 +579,7 @@
    Function
    Method
    PUBLIC
    -
    Undocumented
    +
    Sets the output channel to A Square Wave
  • fn_gen.dg2052.DG2052.set_ramp
    @@ -587,7 +587,7 @@
    Function
    Method
    PUBLIC
    -
    Undocumented
    +
    Sets the output channel to A Ramp (Triangular) Wave
  • fn_gen.dg2052.DG2052.set_sweep
    @@ -595,7 +595,7 @@
    Function
    Method
    PUBLIC
    -
    Undocumented
    +
    Sets the parameters of a signal sweep
  • fn_gen.dg2052.DG2052.trigger_sweep
    @@ -603,7 +603,7 @@
    Function
    Method
    PUBLIC
    -
    Undocumented
    +
    Triggers a sweep manually (Only works if the sweep was setup with trigger_source as SweepTriggerSource.MANUAL)
  • diff --git a/docs/classIndex.html b/docs/classIndex.html index a339ace..7c2eb1c 100644 --- a/docs/classIndex.html +++ b/docs/classIndex.html @@ -150,7 +150,7 @@
    API Documentation for fn_gen, generated by pydoctor - 23.9.1 at 2024-02-06 18:56:15. + 23.9.1 at 2024-02-29 14:55:42.
    + + + +classes + + + +fn_gen.enums.comm_method.CommMethod + +CommMethod + +name + + + + + +fn_gen.dg2052.DG2052 + +DG2052 + +comm +port : str +rm : ResourceManager + +get_output_impedance(channel: Literal[1, 2]): float +get_output_load(channel: Literal[1, 2]): float +get_output_signal(channel: Literal[1, 2]): str +get_output_state(channel: Literal[1, 2]): str +get_output_volt_limits(channel: Literal[1, 2]): tuple[float, float] +is_output_on(channel: Literal[1, 2]): bool +set_dc(channel: Literal[1, 2], offset: float) +set_frequency(channel: Literal[1, 2], freq) +set_output(channel: Literal[1, 2], state: bool) +set_ramp(channel: Literal[1, 2], freq: float, amp: float, offset: float, phase: int) +set_sine_wave(channel: Literal[1, 2], freq: float, amp: float, offset: float, phase: int) +set_square_wave(channel: Literal[1, 2], freq: float, amp: float, offset: float, phase: int) +set_sweep(channel: Literal[1, 2], amp: float, offset: float, phase: int, signal_type: SweepSignalType, htime_start: float, htime_stop: float, freq_start: float, freq_stop: float, marker: bool, freq_marker: float, rtime: float, time: float, spacing: SweepSpacing, step: int, trigger_slope: SweepTriggerSlope, trigger_source: SweepTriggerSource) +toggle_output(channel: Literal[1, 2]) +trigger_sweep(channel: Literal[1, 2]) +whoami(): str + + + +fn_gen.enums.sweep_signal_type.SweepSignalType + +SweepSignalType + +name + + + + + +fn_gen.enums.sweep_spacing.SweepSpacing + +SweepSpacing + +name + + + + + +fn_gen.enums.sweep_trigger_slope.SweepTriggerSlope + +SweepTriggerSlope + +name + + + + + +fn_gen.enums.sweep_trigger_source.SweepTriggerSource + +SweepTriggerSource + +name + + + + + +fn_gen.errors.undefined_communication_method_error.UndefinedCommunicationMethodError + +UndefinedCommunicationMethodError + + + + + + +fn_gen.errors.undefined_value_error.UndefinedValueError + +UndefinedValueError + + + + + + +fn_gen.errors.value_out_of_bounds_error.ValueOutOfBoundsError + +ValueOutOfBoundsError + + + + + + diff --git a/uml/packages.html b/uml/packages.html deleted file mode 100644 index e765c1e..0000000 --- a/uml/packages.html +++ /dev/null @@ -1,54 +0,0 @@ - - - -
    - - classDiagram - class fn_gen { - } - class common { - } - class dg2052 { - } - class enums { - } - class comm_method { - } - class output_channel { - } - class sweep_signal_type { - } - class sweep_spacing { - } - class sweep_trigger_slope { - } - class sweep_trigger_source { - } - class errors { - } - class undefined_communication_method_error { - } - class undefined_value_error { - } - class value_out_of_bounds_error { - } - fn_gen --> dg2052 - fn_gen --> enums - fn_gen --> errors - common --> errors - dg2052 --> common - dg2052 --> enums - dg2052 --> errors - enums --> comm_method - enums --> output_channel - enums --> sweep_signal_type - enums --> sweep_spacing - enums --> sweep_trigger_slope - enums --> sweep_trigger_source - errors --> undefined_communication_method_error - errors --> undefined_value_error - errors --> value_out_of_bounds_error - -
    - - diff --git a/uml/packages.svg b/uml/packages.svg new file mode 100644 index 0000000..9ea6f95 --- /dev/null +++ b/uml/packages.svg @@ -0,0 +1,181 @@ + + + + + + +packages + + + +fn_gen + +fn_gen + + + +fn_gen.dg2052 + +fn_gen.dg2052 + + + +fn_gen->fn_gen.dg2052 + + + + + +fn_gen.enums + +fn_gen.enums + + + +fn_gen->fn_gen.enums + + + + + +fn_gen.errors + +fn_gen.errors + + + +fn_gen->fn_gen.errors + + + + + +fn_gen.common + +fn_gen.common + + + +fn_gen.common->fn_gen.errors + + + + + +fn_gen.dg2052->fn_gen.common + + + + + +fn_gen.dg2052->fn_gen.enums + + + + + +fn_gen.dg2052->fn_gen.errors + + + + + +fn_gen.enums.comm_method + +fn_gen.enums.comm_method + + + +fn_gen.enums->fn_gen.enums.comm_method + + + + + +fn_gen.enums.sweep_signal_type + +fn_gen.enums.sweep_signal_type + + + +fn_gen.enums->fn_gen.enums.sweep_signal_type + + + + + +fn_gen.enums.sweep_spacing + +fn_gen.enums.sweep_spacing + + + +fn_gen.enums->fn_gen.enums.sweep_spacing + + + + + +fn_gen.enums.sweep_trigger_slope + +fn_gen.enums.sweep_trigger_slope + + + +fn_gen.enums->fn_gen.enums.sweep_trigger_slope + + + + + +fn_gen.enums.sweep_trigger_source + +fn_gen.enums.sweep_trigger_source + + + +fn_gen.enums->fn_gen.enums.sweep_trigger_source + + + + + +fn_gen.errors.undefined_communication_method_error + +fn_gen.errors.undefined_communication_method_error + + + +fn_gen.errors->fn_gen.errors.undefined_communication_method_error + + + + + +fn_gen.errors.undefined_value_error + +fn_gen.errors.undefined_value_error + + + +fn_gen.errors->fn_gen.errors.undefined_value_error + + + + + +fn_gen.errors.value_out_of_bounds_error + +fn_gen.errors.value_out_of_bounds_error + + + +fn_gen.errors->fn_gen.errors.value_out_of_bounds_error + + + + +