from flojoy import flojoy, DataContainer, TextBlob, VisaConnection from typing import Optional @flojoy(inject_connection=True) def SINGLE_TRIGGER_DS1047Z( connection: VisaConnection, single: bool = True, default: Optional[DataContainer] = None, ) -> TextBlob: """Activates the single trigger mode. The oscilloscope will wait for a trigger and then stop aquiring. Set the `single` parameter to False to turn back on normal triggering. Requires a CONNECTION_DS1074Z node at the start of the app to connect with the instrument. The VISA address will then be listed under 'connection'. This node should also work with compatible DS1000Z oscilloscopes Parameters ---------- None Returns ------- DataContainer TextBlob: summary of channel settings. """ rigol = connection.get_handle() if single: rigol.write_raw(":SINGle") s = "Single trigger" else: rigol.write_raw(":TRIG:SWE NORM") s = "Normal trigger" return TextBlob(text_blob=s)
Control DS1000Z oscilloscope with Flojoy
In this example the digital function blocks are used to control the
LA channels of the Rigol DS1047Z oscilloscope.
CONNECTION_DS1047Z block must first be used to make the connection between Flojoy and the instrument.
DIGITAL_ON_OFF_DS1047Z block turns the
LA digital channel off as well as indiviual sub-channels.
DIGITAL_TRIGGER_DS1047Z block chooses the triggering digital channel (e.g.
D0 here) and the triggering level.
SINGLE_TRIGGER_DS1047Z block sets the triggering mode to
single which stops the oscilloscope as soon as a triggering signal is detected, leaving a static trace on the screen.
DIGITAL_TRACE_DS1047Z block extracts traces from digital channels such as