Trace Settings

class Nets.TraceSettings

Control how a net's trace on an oscilloscope is viewed. These methods are exclusive to nets of type Analog.

set_volt_offset(offset)

Method for setting the scope trace voltage offset.

from lager import Net, NetType

v33_net = Net.get('+3.3V',
            type=NetType.Analog,
            setup_function=setup_net,
            teardown_function=teardown_net)
v33_net.enable()
v33_net.trace_settings.set_volt_offset(0.5) #sets voltage offset to 0.5V
Parameters:

offset (float) -- Voltage offset of trace signal in Volts

get_volt_offset()

Get the scope trace voltage offset

from lager import Net, NetType

v33_net = Net.get('+3.3V',
            type=NetType.Analog,
            setup_function=setup_net,
            teardown_function=teardown_net)
v33_net.enable()
v33_net.trace_settings.set_volt_offset(0.5)
offset = v33_net.trace_settings.get_volt_offset()
print(offset)
Returns:

voltage offset

Return type:

float

set_volts_per_div(volts)

Set the trace signal's volts per division

from lager.pcb.net import Net, NetType

v33_net = Net.get('+3.3V',
            type=NetType.Analog,
            setup_function=setup_net,
            teardown_function=teardown_net)
v33_net.enable()
v33_net.trace_settings.set_volts_per_div(1) #sets 1V/div
Parameters:

volts (float) -- Volts per division to set in Volts

get_volts_per_div()

Get the trace signal's volts per division

from lager import Net, NetType

v33_net = Net.get('+3.3V',
            type=NetType.Analog,
            setup_function=setup_net,
            teardown_function=teardown_net)
v33_net.enable()
v33_net.trace_settings.set_volts_per_div(1) #sets 1V/div
volts_div = v33_net.trace_settings.get_volts_per_div()
print(volts_div)
Returns:

volts per division

Return type:

float

set_time_per_div(time)

Set the trace signal's volts per division

from lager import Net, NetType

v33_net = Net.get('+3.3V',
            type=NetType.Analog,
            setup_function=setup_net,
            teardown_function=teardown_net)
v33_net.enable()
v33_net.trace_settings.set_time_per_div(.001) #sets 1ms/div
Parameters:

time (float) -- Time per division to set in Seconds

get_time_per_div()

Get the trace signal's time per division

from lager import Net, NetType

v33_net = Net.get('+3.3V',
            type=NetType.Analog,
            setup_function=setup_net,
            teardown_function=teardown_net)
v33_net.enable()
v33_net.trace_settings.set_time_per_div(.001) #sets 1ms/div
time = v33_net.trace_settings.get_time_per_div()
print(time)
Returns:

time per division

Return type:

float