dso_trigger module
- class dso_trigger.Trigger(parent)
Bases:
objectThis module can control the Trigger function on your DSO
- bus_type() str
Returns the current bus type.
- Returns:
The current bus type, one of ‘UART’, ‘I2C’, ‘SPI’, ‘PARALLEL’, ‘CAN’, or ‘LIN’.
- Return type:
- can_trigger_on() str
Queries the CAN bus trigger condition.
- Returns:
The CAN bus trigger condition.
- Return type:
- external_probe_ratio() float
Queries the external probe ratio.
- Returns:
external probe ratio
- Return type:
- hlevel() float
- Queries the high trigger level.
Note: Applicable for Rise and Fall/Pulse Runt triggers.
- Returns:
trigger high level
- Return type:
- i2c_trigger_on() str
Queries the I2C bus trigger condition.
- Returns:
The I2C bus trigger condition.
- Return type:
- level() float
- Queries the trigger level.
Note: Not applicable to Pulse Runt and Rise & Fall triggers.
- Returns:
trigger level
- Return type:
- lin_trigger_on() str
Queries the LIN bus trigger condition.
- Returns:
The LIN bus trigger condition.
- Return type:
- llevel() float
- Queries the low trigger level.
Note: Applicable for Rise and Fall/Pulse Runt triggers.
- Returns:
trigger low level
- Return type:
- polarity() str
Queries the pulse width/runt/video trigger polarity.
- Returns:
POSITIVE|NEGATIVE
- Return type:
- set_bus_threshold(ch: int, threshold: float) None
Sets the threshold level for the specified channel.
- set_can_data_trigger(qualifier: str | None = None, size: int | None = None, value: str | None = None) None
Sets the CAN data trigger configuration for the DATA or IDANDDATA trigger condition.
- Parameters:
qualifier (str, optional) – Data qualifier for triggering. One of the following: - ‘LESSthan’: Triggers when data is less than the qualifier value. - ‘MOREthan’: Triggers when data is greater than the qualifier value. - ‘EQual’: Triggers when data is equal to the qualifier value. - ‘UNEQual’: Triggers when data is not equal to the qualifier value. - ‘LESSEQual’: Triggers when data is less than or equal to the qualifier value. - ‘MOREEQual’: Triggers when data is more than or equal to the qualifier value.
size (int, optional) – Length of the data string in bytes (1 to 8).
value (str, optional) –
Binary data string used for the CAN trigger: - Use ‘1’ for binary 1. - Use ‘0’ for binary 0. - Use ‘x’ as a “don’t care” placeholder. - Number of characters depends on the data size setting (size * 8). - Example:
For size 1 (8 bits): “01010X1X”.
- set_can_frametype_trigger(frame_type: str) None
Sets the frame type for a CAN FRAMEType trigger.
- Parameters:
frame_type (str) – The frame type to set. One of the following: - ‘DATA’ : Data frame. - ‘REMote’ : Remote frame. - ‘ERRor’ : Error frame. - ‘OVERLoad’ : Overload frame.
- set_can_identifier_trigger(mode: str | None = None, value: str | None = None, direction: str | None = None) None
Sets the CAN identifier trigger configuration for the IDentifier or IDANDDATA trigger condition.
- Parameters:
mode (str, optional) – CAN identifier mode, either ‘STANDard’ or ‘EXTended’.
value (str, optional) –
Identifier string used for the CAN trigger: - Use ‘1’ for binary 1. - Use ‘0’ for binary 0. - Use ‘x’ as a “don’t care” placeholder. - Number of characters depends on the mode setting (11 for ‘STANDard’ or 29 for ‘EXTended’). - Example:
For ‘STANDard’ mode : “01100X1X01X”.
For ‘EXTended’ mode : “01100X1X01X0X1X1X000X01X1X01X”.
direction (str, optional) – Data direction, one of ‘READ’, ‘WRITE’, or ‘NOCARE’.
- set_can_trigger_on(condition: str) None
Sets the CAN bus trigger condition.
- Parameters:
condition (str) – The CAN trigger condition to set. One of the following: - ‘SOF’ : Triggers on a start of frame. - ‘FRAMEtype’ : Triggers on the type of frame. - ‘Identifier’ : Triggers on a matching identifier. - ‘DATA’ : Triggers on matching data. - ‘IDANDDATA’ : Triggers on matching identifier and data field. - ‘EOF’ : Triggers on the end of frame. - ‘ACKMISS’ : Triggers on a missing acknowledge. - ‘STUFFERR’ : Triggers on a bit stuffing error.
- set_external_probe_ratio(value: float)
Sets the external probe ratio.
- Parameters:
value (float) – external probe ratio
- set_hlevel(value: float)
- Sets the high trigger level.
Note: Applicable for Rise and Fall/Pulse Runt triggers.
- Parameters:
value (float) – trigger high level
- set_i2c_address_trigger(mode: str | None = None, type_: str | None = None, value: str | None = None, direction: str | None = None) None
Sets the I2C address trigger configuration for the ADDRess or ADDRANDDATA trigger condition.
- Parameters:
mode (str, optional) – I2C addressing mode, either ‘ADDR7’ for 7-bit or ‘ADDR10’ for 10-bit.
type (str, optional) – I2C bus address type. One of the following: - ‘GENeralcall’ for a general call address (0000 000 0). - ‘STARtbyte’ for a start byte address (0000 000 1). - ‘HSmode’ for high-speed mode address (0000 1xx x). - ‘EEPROM’ for EEPROM address (1010 xxx x). - ‘CBUS’ for CBUS address (0000 001 x).
value (str, optional) –
The I2C bus address value: - Use ‘1’ for binary 1. - Use ‘0’ for binary 0. - Use ‘x’ as a don’t care placeholder. - Number of characters depends on the mode setting (7 bits for ‘ADDR7’ or 10 bits for ‘ADDR10’). - Examples:
For 7-bit: “xxx0101”.
For 10-bit: “xxx1010101”.
direction (str, optional) – Data direction, one of ‘READ’, ‘WRITE’, or ‘NOCARE’.
- set_i2c_data_trigger(size: int | None = None, value: str | None = None) None
Sets the I2C data trigger configuration for the DATA or ADDRANDDATA trigger condition.
- Parameters:
size (int, optional) – Number of data bytes (1 to 5) to set.
value (str, optional) –
The triggering data value: - Use ‘1’ for binary 1. - Use ‘0’ for binary 0. - Use ‘x’ as a “don’t care” placeholder. - Number of characters depends on the data size setting (size * 8). - Example:
For size 1 (8 bits): “1x1x0101”.
For size 3 (24 bits): “1x1x0101010010110010xxxx”.
- set_i2c_trigger_on(condition: str) None
Sets the I2C bus trigger condition.
- Parameters:
condition (str) – The I2C bus trigger condition to set. One of the following: - ‘STARt’ - Start condition. - ‘STOP’ - Stop condition. - ‘REPEATstart’ - Repeated Start condition. - ‘ACKMISS’ - Missing Acknowledgement. - ‘ADDRess’ - Address condition. - ‘DATA’ - Data condition. - ‘ADDRANDDATA’ - Address and Data condition.
- set_level(value: float)
- Sets the trigger level.
Note: Not applicable to Pulse Runt and Rise & Fall triggers.
- Parameters:
value (float) – trigger level
- set_lin_data_trigger(qualifier: str | None = None, size: int | None = None, value: str | None = None) None
Sets the LIN data trigger configuration for the DATA or IDANDDATA trigger condition.
- Parameters:
qualifier (str, optional) – Data qualifier for triggering. One of the following: - ‘LESSthan’: Triggers when data is less than the qualifier value. - ‘MOREthan’: Triggers when data is greater than the qualifier value. - ‘EQual’: Triggers when data equals the qualifier value. - ‘UNEQual’: Triggers when data is not equal to the qualifier value. - ‘LESSEQual’: Triggers when data is less than or equal to the qualifier value. - ‘MOREEQual’: Triggers when data is greater than or equal to the qualifier value.
size (int, optional) – Length of the data string in bytes (1 to 8).
value (str, optional) –
Binary data string used for the LIN trigger: - Use ‘1’ for binary 1. - Use ‘0’ for binary 0. - Use ‘x’ as a “don’t care” placeholder. - Number of characters depends on the data size setting (size * 8). - Example:
For size 1 (8 bits): “01010X1X”.
- set_lin_error_trigger(error_type: str) None
Sets the LIN error trigger configuration for the ERRor trigger condition.
- Parameters:
error_type (str) – The LIN error type to set. One of the following: - ‘SYNC’: Sets the LIN error type to SYNC. - ‘PARIty’: Sets the LIN error type to parity. - ‘CHecksum’: Sets the LIN error type to checksum.
- set_lin_identifier_trigger(value: str) None
Sets the LIN identifier trigger configuration for the IDentifier or IDANDDATA trigger condition.
- Parameters:
value (str) – The LIN identifier string: - ‘1’ for binary 1, - ‘0’ for binary 0, - ‘x’ as a “don’t care” placeholder. - The string is 6 characters long. - Example: “110101” or “x1x0x1”.
- set_lin_trigger_on(condition: str) None
Sets the LIN bus trigger condition.
- Parameters:
condition (str) – The LIN trigger condition to set. One of the following: - ‘SYNCField’: Sync field trigger. - ‘IDentifier’: Identifier field trigger. - ‘DATA’: Data field trigger. - ‘IDANDDATA’: Identifier and data field trigger. - ‘WAKEup’: Wake up trigger. - ‘SLEEP’: Sleep trigger. - ‘ERRor’: Error trigger.
- set_llevel(value: float)
- Sets the low trigger level.
Note: Applicable for Rise and Fall/Pulse Runt triggers.
- Parameters:
value (float) – trigger low level
- set_noise_rejection_off()
Sets noise rejection off.
- set_noise_rejection_on()
Sets noise rejection on.
- set_polarity(type: str)
Sets the pulse width/runt/video trigger polarity.
- Parameters:
type (str) – POSitive|NEGative
- set_slope(type: str)
Sets the edge/delay/rise&fall trigger slope.
- Parameters:
type (str) – RISe|FALL|EITher
- set_source(src: str)
Sets the trigger source.
- Parameters:
src (str) – CH1|CH2|CH3|CH4|EXT|LINe|D0|D1|D2|D3|D4|D5|D6|D7|D8|D9|D10|D11|D12|D13|D14|D15
- set_spi_data_trigger(size: int | None = None, val_miso: str | None = None, val_mosi: str | None = None) None
Sets the SPI data trigger configuration for the MISO, MOSI, or MISOMOSI trigger condition.
- Parameters:
size (int) – Number of words (1 to 32) to set.
val_miso (str) –
The triggering data value for MISO or MISOMOSI: - Use ‘1’ for binary 1. - Use ‘0’ for binary 0. - Use ‘x’ as a “don’t care” placeholder. - Number of characters depends on the data size setting (size * 4). - Example:
For size 2 (8 bits): “1x1x0101”.
For size 3 (12 bits): “1x1x01010100”.
val_mosi (str) – The triggering data value for MOSI or MISOMOSI, with the same formatting rules as val_miso.
- set_spi_trigger_on(condition: str) None
Sets the SPI bus trigger condition.
- Parameters:
condition (str) – The SPI bus trigger condition to set. One of the following: - ‘SS’: Trigger on the Slave Select condition. - ‘MISO’: Trigger on the Master-In Slave-Out condition. - ‘MOSI’: Trigger on the Master-Out Slave-In condition. - ‘MISOMOSI’: Trigger on both Master-In Slave-Out and Master-Out Slave-In conditions.
- set_type(type: str)
Sets the trigger type.
- Parameters:
type (str) – EDGe|DELay|PULSEWidth|VIDeo|RUNT|RISEFall|LOGic|BUS|TIMEOut
- set_uart_rx_data_trigger(size: int | None = None, value: str | None = None) None
Sets the UART Rx data trigger configuration for the RXDATA trigger condition.
- Parameters:
size (int, optional) – Number of data bytes (1 to 10) to set.
value (str, optional) –
The triggering data value: - Use ‘1’ for binary 1. - Use ‘0’ for binary 0. - Use ‘x’ as a “don’t care” placeholder. - Number of characters depends on the data size setting (size * 8). - Example:
For size 1 (8 bits): “1x1x0101”.
For size 3 (24 bits): “1x1x0101010010110010xxxx”.
- set_uart_trigger_on(condition: str) None
Sets the UART bus trigger condition.
- Parameters:
condition (str) – The UART bus trigger condition to set. One of the following: - ‘RXSTArt’: Trigger on the RX Start Bit. - ‘RXDATA’: Trigger on RX Data. - ‘RXENDPacket’: Trigger on the RX End of Packet condition. - ‘RXPARItyerr’: Trigger on RX Parity error condition. - ‘TXSTArt’: Trigger on the TX Start Bit. - ‘TXDATA’: Trigger on TX Data. - ‘TXENDPacket’: Trigger on the TX End of Packet condition. - ‘TXPARItyerr’: Trigger on TX Parity error condition.
- set_uart_tx_data_trigger(size: int | None = None, value: str | None = None) None
Sets the UART Tx data trigger configuration for the TXDATA trigger condition.
- Parameters:
size (int, optional) – Number of data bytes (1 to 10) to set.
value (str, optional) –
The triggering data value: - Use ‘1’ for binary 1. - Use ‘0’ for binary 0. - Use ‘x’ as a “don’t care” placeholder. - Number of characters depends on the data size setting (size * 8). - Example:
For size 1 (8 bits): “1x1x0101”.
For size 3 (24 bits): “1x1x0101010010110010xxxx”.
- source() str
Queries the trigger source.
- Returns:
CH1|CH2|CH3|CH4|EXT|LINE|D0|D1|D2|D3|D4|D5|D6|D7|D8|D9|D10|D11|D12|D13|D14|D15
- Return type:
- spi_trigger_on() str
Queries the SPI bus trigger condition.
- Returns:
The SPI bus trigger condition.
- Return type: