optoKummenberg

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Attributes | List of all members
optoKummenberg.registers.InputStage.SignalGenerator Class Reference
Inheritance diagram for optoKummenberg.registers.InputStage.SignalGenerator:

## Public Member Functions
| __init__ (self, int channel=0, board=None, sys_id_base=0x60)
| SetUnit (self, UnitType or int value)
| Sets the unit type of the values set to the signal generator.
UnitType | GetUnit (self)
| Gets the unit type of the values set to the signal generator.
| Run (self)
| Starts the signal generator.
| Stop (self)
| Stops the signal generator.
| GetRunningStatus (self)
| Gets the running status of the signal generator.
| SetShape (self, WaveformShape or int value)
| Sets the shape of the generated signal.
WaveformShape | GetShape (self)
| Gets the shape of the generated signal.
| SetFrequency (self, value)
| Sets the frequency of the generated signal.
| GetFrequency (self)
| Gets the frequency of the generated signal.
| SetAmplitude (self, value)
| Sets the amplitude of the generated signal.
| GetAmplitude (self)
| Gets the amplitude of the generated signal.
| SetOffset (self, value)
| Sets the offset of the generated signal.
| GetOffset (self)
| Gets the offset of the generated signal.
| SetPhase (self, value)
| Sets the phase delay of the generated signal.
| GetPhase (self)
| Gets the phase delay of the generated signal.
| SetCycles (self, value)
| Sets the number of cycles the generated signal.
| GetCycles (self)
| Gets the number of cycles the generated signal.
| SetDutyCycle (self, value)
| Sets duty cycle of the generated signal.
| GetDutyCycle (self)
| Gets duty cycle of the generated signal.
| SetExternalTrigger (self, value)
| Sets the external trigger mode.
| GetOutput (self)
| Gets output of the signal generator.
Public Member Functions inherited from optoKummenberg.registers.ClassAbstracts.InputStage
| SetAsInput (self)
Public Member Functions inherited from optoKummenberg.registers.ClassAbstracts.System
| set_register (self, str or int register_name_or_id, value, bool set_internal=False)
| set_register_id (self, int register_id, value, type=None)
| get_register (self, str or int register_name_or_id)
| get_register_id (self, int register_id)
| get_register_names (self)

## Static Public Member Functions
| help ()

## Public Attributes
| name
| sys_id
| unit
| run
| shape
| frequency
| amplitude
| offset
| phase
| cycles
| duty_cycle
| external_trigger
| output
Public Attributes inherited from optoKummenberg.registers.ClassAbstracts.InputStage
| name
Public Attributes inherited from optoKummenberg.registers.ClassAbstracts.System
| name
| register_list

## Protected Attributes
| _channel
Protected Attributes inherited from optoKummenberg.registers.ClassAbstracts.System
| _channel
| _is_a_system
| _board

## Additional Inherited Members
Protected Member Functions inherited from optoKummenberg.registers.ClassAbstracts.System
| _get_register_list (self)
Static Protected Attributes inherited from optoKummenberg.registers.ClassAbstracts.InputStage
bool | _is_a_system = False
Static Protected Attributes inherited from optoKummenberg.registers.ClassAbstracts.System
bool | _is_a_system = False

## Detailed Description

    Input Channel Systems - Signal Generator Channel
    System ID for channel 0: 0x60

    *
    *  Signal Generator is a system for generating input signals of particular \ref WaveformShape "shapes".
    *  It is an input stage system, meaning that it is a system used as the very first stage of
    *  \ref signalflow.
    *
    *  To set it up, all the appropriate registers (seen in the table below) have to be configured first.
    *  The shape of the signal, its frequency, amplitude, offset and phase can be adjusted.
    *  For the square and pulse waveforms, the signal's duty cycle can be configured.
    *
    *  The unit type of the value being output by the
    *  SignalGenerator, must match to the control mode selected by the \ref SignalFlowManager "Signal Flow Manager".
    *
    *  By default, the Signal Generator will continuously output the waveform corresponding to the configuration.
    *  If only a single period is desired (or N periods for some finite positive integer N),
    *  the number of desired periods to execute has to be set to the "cycles" register before running the system.
    *  A negative value in this register corresponds to infinite looping.
    *
    *  Finally, to get the configured SignalFlow generator to run, the following steps have to take place:
    *   -# The Signal Generator system has to be set as active Input Stage system for the corresponding channel. This is done through the \ref SignalFlowManager "Signal Flow Manager" system.
    *   -# The "Run" register of the corresponding Signal Generator system has to be set to true (any non-zero value).
    *
    *   ### Register Map:
    *
    *  | Address    | Name                     | Default Value | Description                                                                                                               | Type                  | Access
    *  | -----------|--------------------------|---------------|---------------------------------------------------------------------------------------------------------------------------|-----------------------|-------------------
    *  | 0x6[0-7]00 | Unit type                | 0             |                                                                                                                           | \ref ChannelValueType | read write
    *  | 0x6[0-7]01 | Run                      | false         | Turn Signal Generator on/off                                                                                              | boolean               | read write
    *  | 0x6[0-7]02 | Shape                    | 0             |                                                                                                                           | \ref WaveformShape    | read write
    *  | 0x6[0-7]03 | Frequency                | 0.0           | Frequency in Hz of generated signal                                                                                       | float                 | read write
    *  | 0x6[0-7]04 | Amplitude                | 0.0           | Amplitude of generated signal                                                                                             | float                 | read write
    *  | 0x6[0-7]05 | Offset                   | 0.0           | Offset of generated signal                                                                                                | float                 | read write
    *  | 0x6[0-7]06 | Phase                    | 0.0           | Phase in rad of generated signal                                                                                          | float                 | read write
    *  | 0x6[0-7]07 | Cycles                   | -1            | Number of cycles to be generated. Run flag is turned off after completion. Negative value corresponds to infinite looping | int32                 | read write
    *  | 0x6[0-7]08 | Duty cycle               | 0.5           | Duty cycle of square and pulse shapes                                                                                     | 0 to 1 float <BR> Resolution is frequency/10000 | read write
    *  | 0x6[0-7]09 | External trigger         | 0             | Vector Pattern Unit can be synchronised with external signal (0=disabled, 1=rising/falling edge, 2=rising edge trigger)   | uint32                | read write
    *  | 0x6[0-7]0a | Output                   | N/A           | Output of signal generator                                                                                                | float                 | read only
    *  | 0x6[0-7]0b | Stair count              | 5             | Count + direction of stairs for staircase shape<BR> (ignored for other shape types)                                       | -100 to 100 int32     | read write
    *  | 0x6[0-7]0c | External trigger GPIOx   | false         | Turns GPIOx pin to trigger input source (GPIOx default is trigger output) and disables global external trigger SYNCx pin  | boolean               | read write
    *

    registers table 1:

    +---------------+-------+
    | Waveform Unit | Value |
    +===============+=======+
    | Current       | 0     |
    +---------------+-------+

    registers table 2:

    +---------------+-------+
    | Wavform Shape | Value |
    +===============+=======+
    | Sinusoidal    | 0     |
    +---------------+-------+
    | Triangular    | 1     |
    +---------------+-------+
    | Rectangular   | 2     |
    +---------------+-------+
    | Sawtooth      | 3     |
    +---------------+-------+
    | Pulse         | 4     |
    +---------------+-------+

## Constructor & Destructor Documentation

## ◆ __init__()

optoKummenberg.registers.InputStage.SignalGenerator.__init__ | ( |  | self,
|  | int | channel = 0,
|  |  | board = None,
|  |  | sys_id_base = 0x60 )

Reimplemented from optoKummenberg.registers.ClassAbstracts.InputStage.

## Member Function Documentation

## ◆ GetAmplitude()

optoKummenberg.registers.InputStage.SignalGenerator.GetAmplitude | ( |  | self | ) |

Gets the amplitude of the generated signal.

Unit is specified by SetUnit method.

## ◆ GetCycles()

optoKummenberg.registers.InputStage.SignalGenerator.GetCycles | ( |  | self | ) |

Gets the number of cycles the generated signal.

Value -1 represents running the signal generator in the loop.

## ◆ GetDutyCycle()

optoKummenberg.registers.InputStage.SignalGenerator.GetDutyCycle | ( |  | self | ) |

Gets duty cycle of the generated signal.

Default is 0.5 (range 0-1)

## ◆ GetFrequency()

optoKummenberg.registers.InputStage.SignalGenerator.GetFrequency | ( |  | self | ) |

Gets the frequency of the generated signal.

[Hz]

## ◆ GetOffset()

optoKummenberg.registers.InputStage.SignalGenerator.GetOffset | ( |  | self | ) |

Gets the offset of the generated signal.

Unit is specified by SetUnit method.

## ◆ GetOutput()

optoKummenberg.registers.InputStage.SignalGenerator.GetOutput | ( |  | self | ) |

Gets output of the signal generator.

## ◆ GetPhase()

optoKummenberg.registers.InputStage.SignalGenerator.GetPhase | ( |  | self | ) |

Gets the phase delay of the generated signal.

[rad]

## ◆ GetRunningStatus()

optoKummenberg.registers.InputStage.SignalGenerator.GetRunningStatus | ( |  | self | ) |

Gets the running status of the signal generator.

1 = running, 0 = stopped

## ◆ GetShape()

WaveformShape optoKummenberg.registers.InputStage.SignalGenerator.GetShape | ( |  | self | ) |

Gets the shape of the generated signal.

## ◆ GetUnit()

UnitType optoKummenberg.registers.InputStage.SignalGenerator.GetUnit | ( |  | self | ) |

Gets the unit type of the values set to the signal generator.

## ◆ help()

optoKummenberg.registers.InputStage.SignalGenerator.help | ( |  | ) |
| static

## ◆ Run()

optoKummenberg.registers.InputStage.SignalGenerator.Run | ( |  | self | ) |

Starts the signal generator.

## ◆ SetAmplitude()

optoKummenberg.registers.InputStage.SignalGenerator.SetAmplitude | ( |  | self,
|  |  | value )

Sets the amplitude of the generated signal.

Unit is specified by SetUnit method.

## ◆ SetCycles()

optoKummenberg.registers.InputStage.SignalGenerator.SetCycles | ( |  | self,
|  |  | value )

Sets the number of cycles the generated signal.

Setting -1 runs the signal generator in the loop until stopped.

## ◆ SetDutyCycle()

optoKummenberg.registers.InputStage.SignalGenerator.SetDutyCycle | ( |  | self,
|  |  | value )

Sets duty cycle of the generated signal.

Default is 0.5 (range 0-1)

## ◆ SetExternalTrigger()

optoKummenberg.registers.InputStage.SignalGenerator.SetExternalTrigger | ( |  | self,
|  |  | value )

Sets the external trigger mode.

Signal generator can be synchronised with external signal (0=disabled, 1=rising/falling edge, 2=rising edge trigger)

## ◆ SetFrequency()

optoKummenberg.registers.InputStage.SignalGenerator.SetFrequency | ( |  | self,
|  |  | value )

Sets the frequency of the generated signal.

[Hz]

## ◆ SetOffset()

optoKummenberg.registers.InputStage.SignalGenerator.SetOffset | ( |  | self,
|  |  | value )

Sets the offset of the generated signal.

Unit is specified by SetUnit method.

## ◆ SetPhase()

optoKummenberg.registers.InputStage.SignalGenerator.SetPhase | ( |  | self,
|  |  | value )

Sets the phase delay of the generated signal.

[rad]

## ◆ SetShape()

optoKummenberg.registers.InputStage.SignalGenerator.SetShape | ( |  | self,
|  | WaveformShape or int | value )

Sets the shape of the generated signal.

## ◆ SetUnit()

optoKummenberg.registers.InputStage.SignalGenerator.SetUnit | ( |  | self,
|  | UnitType or int | value )

Sets the unit type of the values set to the signal generator.

## ◆ Stop()

optoKummenberg.registers.InputStage.SignalGenerator.Stop | ( |  | self | ) |

Stops the signal generator.

## Member Data Documentation

## ◆ _channel

optoKummenberg.registers.InputStage.SignalGenerator._channel
| protected

## ◆ amplitude

optoKummenberg.registers.InputStage.SignalGenerator.amplitude

## ◆ cycles

optoKummenberg.registers.InputStage.SignalGenerator.cycles

## ◆ duty_cycle

optoKummenberg.registers.InputStage.SignalGenerator.duty_cycle

## ◆ external_trigger

optoKummenberg.registers.InputStage.SignalGenerator.external_trigger

## ◆ frequency

optoKummenberg.registers.InputStage.SignalGenerator.frequency

## ◆ name

optoKummenberg.registers.InputStage.SignalGenerator.name

## ◆ offset

optoKummenberg.registers.InputStage.SignalGenerator.offset

## ◆ output

optoKummenberg.registers.InputStage.SignalGenerator.output

## ◆ phase

optoKummenberg.registers.InputStage.SignalGenerator.phase

## ◆ run

optoKummenberg.registers.InputStage.SignalGenerator.run

## ◆ shape

optoKummenberg.registers.InputStage.SignalGenerator.shape

## ◆ sys_id

optoKummenberg.registers.InputStage.SignalGenerator.sys_id

## ◆ unit

optoKummenberg.registers.InputStage.SignalGenerator.unit

The documentation for this class was generated from the following file:

- C:/Users/filip.stary/Documents/142-421-00_optoKummenberg/src/main/python/optoKummenberg/registers/InputStage.py