pylab_ml.scope.lecroy.base_lecroy.LecroyGenericScope

class LecroyGenericScope(**kwargs)[source]

Bases: Lecroy

Interface to LeCroy Oscilloscopes.

The Lecroy ‘wavesurfer’ & ‘HBO with SENT option’ Oscilloscopes can be driven over the network TCP/IP with this interface.

Initialisation arguments:

host : hostname, should by LeCroy serial number addr : IP_address, should hostname not be available port : scope TCP/IP port (1861 by default)

Example: Initialization

>>> scope = hwlib.lecroy.Scope("lcry4066n50407")
>>> scope.trig_channel = 1
>>> scope.trig_level = 1.5
>>> scope.trig_slope = "POS"
>>> scope.trig_mode = "norm"
>>> scope.tdiv = 1e-3
>>> scope.tdelay = -3e-3
>>> scope.channel = 1
>>> scope.trace = True
>>> scope.vdiv = 1.0
>>> scope.offs = 0

Example: Coherent waveform grabbing

>>> try:
>>>    scope.trig_oneshot (0.5);
>>> except scope.TriggerTimeout as err:
>>>    print (err)
>>> w1 = scope.get_waveform(2)
>>> w2 = scope.get_waveform(2)
>>> scope.trig_mode = scope.mode_before_oneshot
reset()           reset
identify()        instrument message, reflect address & interfade
message("")       instrument message ("string") or ()
close()           terminate interface
get_waveform(n)   get waveform data from channel n
trig_oneshot(t)   single measurement trigger to waveform or timeout after t s
Properties:

memsize id

tdiv tdelay

trig_slope trig_level trig_mode trig_channel

channel trace vdiv offs waveform

__init__(**kwargs)[source]

Methods

__init__(**kwargs)

close([force])

Close connection to instrument.

find_names()

find_names() returns list of identifiers strings, lhs of = assignments

fix_lecroy_trig()

Issue on LeCroy-wavesurfer, once active channel changed & used, trigger.

get_waveform([channel])

help()

identify([showInstName])

Identify message.

init([identify])

Optional init for interlock startup after identification.

message([message])

Message display.

mqtt_add(client, instrument[, liste, qos])

Add the instrument to mqtt.

mqtt_disconnect()

Remove the instrument from mqtt.

publish(topic, value)

Publish topic as type='cmd' with paylad=value.

publish_get(function_name, value)

Publish function_name as type='get' with paylad=value.

publish_set(function_name, value)

Publish function_name as type='set' with paylad=value.

reset()

Reset and switch beep off.

setup_inst()

Setup the instrument settings.

trig_oneshot([timeout])

wait_until_idle([delay_ms])

Attributes

channel

command

id

Query IDN.

interchoices

Abstract for static class variable interchoices, to list interfaces statically.

memsize

mqtt_enable

mqtt_list

mqtt_status

Getter for the mqtt_status.

offs

tdelay

tdiv

trace

trig_channel

trig_level

trig_mode

Trigger mode is one of {'AUTO', 'NORM', 'SINGLE', 'STOP'}

trig_slope

vdiv

waveform

waveform_dt

exception TriggerTimeout[source]

Bases: Exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

close(force=False)

Close connection to instrument.

find_names()

find_names() returns list of identifiers strings, lhs of = assignments

fix_lecroy_trig()[source]

Issue on LeCroy-wavesurfer, once active channel changed & used, trigger.

channel attribute (level & slope) changes are ignored !

property id

Query IDN.

identify(showInstName=False)

Identify message.

init(identify=False)

Optional init for interlock startup after identification.

abstract property interchoices

Abstract for static class variable interchoices, to list interfaces statically.

json = <module 'json' from '/home/runner/miniconda3/envs/test/lib/python3.9/json/__init__.py'>
message(message=None)

Message display.

mqtt_add(client, instrument, liste='#', qos=0)

Add the instrument to mqtt.

calling from base_instrument, after the instrument (device) has been create. Normally you have not to use this function, only base_instrument use it.

Returns:

None.

mqtt_disconnect()

Remove the instrument from mqtt.

calling from base_instrument, if the instrument are closing. Normally you have not to use this function, only base_instrument use it.

Returns:

None.

property mqtt_status

Getter for the mqtt_status.

publish(topic, value)

Publish topic as type=’cmd’ with paylad=value.

publish_get(function_name, value)

Publish function_name as type=’get’ with paylad=value.

publish_set(function_name, value)

Publish function_name as type=’set’ with paylad=value.

reset()

Reset and switch beep off.

setup_inst()[source]

Setup the instrument settings.

property trig_mode

Trigger mode is one of {‘AUTO’, ‘NORM’, ‘SINGLE’, ‘STOP’}