Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

Commit

Permalink
Merge pull request #401 from flojoy-ai/update-examples
Browse files Browse the repository at this point in the history
update examples
  • Loading branch information
dstrande authored Sep 21, 2023
2 parents c2c10df + e1206b7 commit 60be979
Show file tree
Hide file tree
Showing 13 changed files with 82 additions and 41 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
<!--Add SEO here-->
---
title: Waveform Generator Burst Mode
description: The BURST_MODE_33510B node is used to turn the Burst mode on or off.
keywords: [Python, Instrument Control, Keysight, Wavefunction Generator, Function Generator, Keysight 33500B]
---

In this example, we demonstrate how to extract signal traces from a Tektronix MDO3000 oscilloscope.
In this example, we set the burst mode settings on a Keysight 33500B.

**Note:** The MDO3XXX node should also work with the compatible Tektronix oscilloscopes MDO4XXX, MSO4XXX, and DPO4XXX. However, those have not been tested yet.
:::note
The 33510B nodes should also work with other 33XXX wavefunction generators. However, these are untested as of yet.
:::

First, we list the VISA devices with the [`LIST_VISA`](https://github.com/flojoy-ai/nodes/blob/develop/IO/INSTRUMENTS/QCODES/LIST_VISA/LIST_VISA.py) node. Knowing that the serial number is C012101, we enter the VISA address that contains this into the `VISA address` parameter for both of the `EXTRACT_TRACE` nodes.
We add the [`BURST_MODE_33510B`](https://github.com/flojoy-ai/nodes/tree/develop/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX) node as well as the [`TEXT_VIEW`](https://github.com/flojoy-ai/nodes/blob/develop/VISUALIZERS/DATA_STRUCTURE/TEXT_VIEW/TEXT_VIEW.py) node to view the summary of the burst mode.

The [`EXTRACT_TRACE_MDO3XXX`](https://github.com/flojoy-ai/nodes/blob/develop/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/EXTRACT_TRACE_MDO3XXX/EXTRACT_TRACE_MDO3XXX.py) node extracts the data from the oscilloscope for a single channel. You must first set the channel that you want to extract from and the x-axis (time) length. In this example, we set the top and bottom rows in the app to extract CH1 and CH2, repectively (note that in Flojoy we start counting from 0). We then set the x length to 2000ns.
We then must set the `burst mode` settings. First the VISA address must be set. This can be found using the [`LIST_VISA`](https://github.com/flojoy-ai/nodes/blob/develop/IO/INSTRUMENTS/QCODES/LIST_VISA/LIST_VISA.py) node (alternatively you can use the VISA index but this is slower). Then you can set the trigger method to `TIM` (i.e. timed) and `ncycles` to 5.

The [`LINE`](https://github.com/flojoy-io/nodes/blob/main/VISUALIZERS/PLOTLY/LINE/LINE.py) node will display the data for each channel, where the two sine waves define the two channels.
The `33510B` cannot view the waveform directly. An oscilloscope can be used optionally. to view the waveform.
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
<!--Add SEO here-->
---
title: Waveform Generator Return Errors
description: The RETURN_ERRORS_33510B node returns error messages from the WFG.
keywords: [Python, Instrument Control, Keysight, Wavefunction Generator, Function Generator, Keysight 33500B]
---

In this example, we demonstrate how to extract signal traces from a Tektronix MDO3000 oscilloscope.
In this example, we return errors that the Keysight 33510B has generated.

**Note:** The MDO3XXX node should also work with the compatible Tektronix oscilloscopes MDO4XXX, MSO4XXX, and DPO4XXX. However, those have not been tested yet.
:::note
The 33510B nodes should also work with other 33XXX wavefunction generators. However, these are untested as of yet.
:::

First, we list the VISA devices with the [`LIST_VISA`](https://github.com/flojoy-ai/nodes/blob/develop/IO/INSTRUMENTS/QCODES/LIST_VISA/LIST_VISA.py) node. Knowing that the serial number is C012101, we enter the VISA address that contains this into the `VISA address` parameter for both of the `EXTRACT_TRACE` nodes.
We add the [`RETURN_ERRORS_33510B`](https://github.com/flojoy-ai/nodes/tree/develop/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX) node as well as the [`TEXT_VIEW`](https://github.com/flojoy-ai/nodes/blob/develop/VISUALIZERS/DATA_STRUCTURE/TEXT_VIEW/TEXT_VIEW.py) node to view the summary of the error.

The [`EXTRACT_TRACE_MDO3XXX`](https://github.com/flojoy-ai/nodes/blob/develop/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/EXTRACT_TRACE_MDO3XXX/EXTRACT_TRACE_MDO3XXX.py) node extracts the data from the oscilloscope for a single channel. You must first set the channel that you want to extract from and the x-axis (time) length. In this example, we set the top and bottom rows in the app to extract CH1 and CH2, repectively (note that in Flojoy we start counting from 0). We then set the x length to 2000ns.
irst the VISA address must be set. This can be found using the [`LIST_VISA`](https://github.com/flojoy-ai/nodes/blob/develop/IO/INSTRUMENTS/QCODES/LIST_VISA/LIST_VISA.py) node (alternatively you can use the VISA index but this is slower).

The [`LINE`](https://github.com/flojoy-io/nodes/blob/main/VISUALIZERS/PLOTLY/LINE/LINE.py) node will display the data for each channel, where the two sine waves define the two channels.
In this case `No error` is returned, but in the case of an actual error, the specific error will appear.
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
<!--Add SEO here-->
---
title: Waveform Generator On Off
description: The ON_OFF_33510B node is used to turn the output on or off.
keywords: [Python, Instrument Control, Keysight, Wavefunction Generator, Function Generator, Keysight 33500B]
---

In this example, we demonstrate how to extract signal traces from a Tektronix MDO3000 oscilloscope.
In this example, we turn the wavefunction generation of a Keysight 33510B on.

**Note:** The MDO3XXX node should also work with the compatible Tektronix oscilloscopes MDO4XXX, MSO4XXX, and DPO4XXX. However, those have not been tested yet.
:::note
The 33510B nodes should also work with other 33XXX wavefunction generators. However, these are untested as of yet.
:::

First, we list the VISA devices with the [`LIST_VISA`](https://github.com/flojoy-ai/nodes/blob/develop/IO/INSTRUMENTS/QCODES/LIST_VISA/LIST_VISA.py) node. Knowing that the serial number is C012101, we enter the VISA address that contains this into the `VISA address` parameter for both of the `EXTRACT_TRACE` nodes.
We add the [`ON_OFF_33510B`](https://github.com/flojoy-ai/nodes/tree/develop/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX) node as well as the [`TEXT_VIEW`](https://github.com/flojoy-ai/nodes/blob/develop/VISUALIZERS/DATA_STRUCTURE/TEXT_VIEW/TEXT_VIEW.py) node to view the summary of the changes.

The [`EXTRACT_TRACE_MDO3XXX`](https://github.com/flojoy-ai/nodes/blob/develop/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/EXTRACT_TRACE_MDO3XXX/EXTRACT_TRACE_MDO3XXX.py) node extracts the data from the oscilloscope for a single channel. You must first set the channel that you want to extract from and the x-axis (time) length. In this example, we set the top and bottom rows in the app to extract CH1 and CH2, repectively (note that in Flojoy we start counting from 0). We then set the x length to 2000ns.
We then must set the node parameters. First the VISA address must be set. This can be found using the [`LIST_VISA`](https://github.com/flojoy-ai/nodes/blob/develop/IO/INSTRUMENTS/QCODES/LIST_VISA/LIST_VISA.py) node (alternatively you can use the VISA index but this is slower). Then the channel to change must be set as well as changing `on_off` to `on`.

The [`LINE`](https://github.com/flojoy-io/nodes/blob/main/VISUALIZERS/PLOTLY/LINE/LINE.py) node will display the data for each channel, where the two sine waves define the two channels.
The node simply turns the wavefunction generation on or off for the chosen channel. In this example we turn Channel 1 (`ch1`) on and Channel 2 (`ch2`) off.
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
<!--Add SEO here-->
---
title: Waveform Generator Output Sync
description: The OUTPUT_SYNC_33510B node is used sync multiple outputs phases.
keywords: [Python, Instrument Control, Keysight, Wavefunction Generator, Function Generator, Keysight 33500B]
---

In this example, we demonstrate how to extract signal traces from a Tektronix MDO3000 oscilloscope.
In this example, we sync the waveform output phases generation for a Keysight 33510B. Each channel in the 33510B has a `phase` which results in shifting the wavefunction in the x axis (i.e. time). One channel should be chosen as the baseline for this phase to ensure the phases match for the two channels (the phase of the second channel is then with respect to the baseline channel).

**Note:** The MDO3XXX node should also work with the compatible Tektronix oscilloscopes MDO4XXX, MSO4XXX, and DPO4XXX. However, those have not been tested yet.
:::note
The 33510B nodes should also work with other 33XXX wavefunction generators. However, these are untested as of yet.
:::

First, we list the VISA devices with the [`LIST_VISA`](https://github.com/flojoy-ai/nodes/blob/develop/IO/INSTRUMENTS/QCODES/LIST_VISA/LIST_VISA.py) node. Knowing that the serial number is C012101, we enter the VISA address that contains this into the `VISA address` parameter for both of the `EXTRACT_TRACE` nodes.
We add the [`OUTPUT_SYNC_33510B`](https://github.com/flojoy-ai/nodes/tree/develop/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX) node as well as the [`TEXT_VIEW`](https://github.com/flojoy-ai/nodes/blob/develop/VISUALIZERS/DATA_STRUCTURE/TEXT_VIEW/TEXT_VIEW.py) node to view the summary of the changes. We also add the `CLOSE_ALL` node at the beginning. This node can be useful when the instrument remains connected to a previous usage/app.

The [`EXTRACT_TRACE_MDO3XXX`](https://github.com/flojoy-ai/nodes/blob/develop/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/EXTRACT_TRACE_MDO3XXX/EXTRACT_TRACE_MDO3XXX.py) node extracts the data from the oscilloscope for a single channel. You must first set the channel that you want to extract from and the x-axis (time) length. In this example, we set the top and bottom rows in the app to extract CH1 and CH2, repectively (note that in Flojoy we start counting from 0). We then set the x length to 2000ns.

The [`LINE`](https://github.com/flojoy-io/nodes/blob/main/VISUALIZERS/PLOTLY/LINE/LINE.py) node will display the data for each channel, where the two sine waves define the two channels.
We then must set the node parameters. First the VISA address must be set. This can be found using the [`LIST_VISA`](https://github.com/flojoy-ai/nodes/blob/develop/IO/INSTRUMENTS/QCODES/LIST_VISA/LIST_VISA.py) node (alternatively you can use the VISA index but this is slower). Then the baseline channel must be set as well as whether to turn the output sync on or off.
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
<!--Add SEO here-->
---
title: Waveform Generator Set Waveform
description: The SET_WAVEFORM_33510B node is used to set waveform settings for a 33510B.
keywords: [Python, Instrument Control, Keysight, Wavefunction Generator, Function Generator, Keysight 33500B]
---

In this example, we demonstrate how to extract signal traces from a Tektronix MDO3000 oscilloscope.
In this example, we change the waveform settings for the Keysight 33510B. The 33510B has many waveform settings to change including: `waveform`, `amplitude`, `frequency`, etc. We can also choose to turn the wavefunction generation on or off.

**Note:** The MDO3XXX node should also work with the compatible Tektronix oscilloscopes MDO4XXX, MSO4XXX, and DPO4XXX. However, those have not been tested yet.
:::note
The 33510B nodes should also work with other 33XXX wavefunction generators. However, these are untested as of yet.
:::

First, we list the VISA devices with the [`LIST_VISA`](https://github.com/flojoy-ai/nodes/blob/develop/IO/INSTRUMENTS/QCODES/LIST_VISA/LIST_VISA.py) node. Knowing that the serial number is C012101, we enter the VISA address that contains this into the `VISA address` parameter for both of the `EXTRACT_TRACE` nodes.
We add two of the [`SET_WAVEFORM_33510B`](https://github.com/flojoy-ai/nodes/tree/develop/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX) nodes as well as the [`TEXT_VIEW`](https://github.com/flojoy-ai/nodes/blob/develop/VISUALIZERS/DATA_STRUCTURE/TEXT_VIEW/TEXT_VIEW.py) node to view the summary of the changes. We also add the `CLOSE_ALL` node at the beginning. This node can be useful when the instrument remains connected to a previous usage/app. The first `SET_WAVEFORM_33510B` is used to set the parameters while the second is used to query the instrument to ensure the wavefunction parameters are correct.

The [`EXTRACT_TRACE_MDO3XXX`](https://github.com/flojoy-ai/nodes/blob/develop/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/EXTRACT_TRACE_MDO3XXX/EXTRACT_TRACE_MDO3XXX.py) node extracts the data from the oscilloscope for a single channel. You must first set the channel that you want to extract from and the x-axis (time) length. In this example, we set the top and bottom rows in the app to extract CH1 and CH2, repectively (note that in Flojoy we start counting from 0). We then set the x length to 2000ns.

The [`LINE`](https://github.com/flojoy-io/nodes/blob/main/VISUALIZERS/PLOTLY/LINE/LINE.py) node will display the data for each channel, where the two sine waves define the two channels.
We then must set the node parameters. First, the VISA address must be set. This can be found using the [`LIST_VISA`](https://github.com/flojoy-ai/nodes/blob/develop/IO/INSTRUMENTS/QCODES/LIST_VISA/LIST_VISA.py) node (alternatively you can use the VISA index but this is slower). The waveform settings were changed as follows: waveform: SIN, amplitude: 0.2, amplitude units: Vpp, frequency: 1e7 Hz, on_off: on, query_set: set. The second node only needs to ensure the query_set parameter is set to `query`.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

In this example, we demonstrate how to extract advanced measurements from a Tektronix MDO3000 oscilloscope.

**Note:** The MDO3XXX node should also work with the compatible Tektronix oscilloscopes MDO4XXX, MSO4XXX, and DPO4XXX. However, those have not been tested yet.
:::note
The MDO3XXX node should also work with the compatible Tektronix oscilloscopes MDO4XXX, MSO4XXX, and DPO4XXX. However, those have not been tested yet.
:::

First, we list the VISA devices with the [`LIST_VISA`](https://github.com/flojoy-ai/nodes/blob/develop/IO/INSTRUMENTS/QCODES/LIST_VISA/LIST_VISA.py) node. Knowing that the serial number is C012101, we enter the VISA address that contains this into the `VISA address` parameter for both of the `EXTRACT_TRACE` nodes.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

In this example, we demonstrate how to set the triggering channel for a Tektronix MDO3000 oscilloscope and how to set the trigger threshold voltage.

**Note:** The MDO3XXX node should also work with the compatible Tektronix oscilloscopes MDO4XXX, MSO4XXX, and DPO4XXX. However, those have not been tested yet.
:::note
The MDO3XXX node should also work with the compatible Tektronix oscilloscopes MDO4XXX, MSO4XXX, and DPO4XXX. However, those have not been tested yet.
:::

We must first enter the `VISA address` parameter for the three `MDO3XXX` nodes (use the [`LIST_VISA`](https://github.com/flojoy-ai/nodes/blob/develop/IO/INSTRUMENTS/QCODES/LIST_VISA/LIST_VISA.py) node to find the VISA address).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

In this example, we demonstrate how to extract signal traces from a Tektronix MDO3000 oscilloscope.

**Note:** The MDO3XXX node should also work with the compatible Tektronix oscilloscopes MDO4XXX, MSO4XXX, and DPO4XXX. However, those have not been tested yet.
:::note
The MDO3XXX node should also work with the compatible Tektronix oscilloscopes MDO4XXX, MSO4XXX, and DPO4XXX. However, those have not been tested yet.
:::

First, we list the VISA devices with the [`LIST_VISA`](https://github.com/flojoy-ai/nodes/blob/develop/IO/INSTRUMENTS/QCODES/LIST_VISA/LIST_VISA.py) node. Knowing that the serial number is C012101, we enter the VISA address that contains this into the `VISA address` parameter for both of the `EXTRACT_TRACE` nodes.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

In this example, we demonstrate how to extract measurements from a Tektronix MDO3000 oscilloscope.

**Note:** The MDO3XXX node should also work with the compatible Tektronix oscilloscopes MDO4XXX, MSO4XXX, and DPO4XXX. However, those have not been tested yet.
:::note
The MDO3XXX node should also work with the compatible Tektronix oscilloscopes MDO4XXX, MSO4XXX, and DPO4XXX. However, those have not been tested yet.
:::

First, we list the VISA devices with the [`LIST_VISA`](https://github.com/flojoy-ai/nodes/blob/develop/IO/INSTRUMENTS/QCODES/LIST_VISA/LIST_VISA.py) node. Knowing that the serial number is C012101, we enter the VISA address that contains this into the `VISA address` parameter for the three measurement nodes.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

In this example, we demonstrate how to measure the phase difference between two channels for a Tektronix MDO3000 oscilloscope.

**Note:** The MDO3XXX node should also work with the compatible Tektronix oscilloscopes MDO4XXX, MSO4XXX, and DPO4XXX. However, those have not been tested yet.
:::note
The MDO3XXX node should also work with the compatible Tektronix oscilloscopes MDO4XXX, MSO4XXX, and DPO4XXX. However, those have not been tested yet.
:::

Sometimes an error can occur when playing an app. This may dictate that the [`CLOSE_ALL`](https://github.com/flojoy-ai/nodes/blob/develop/IO/INSTRUMENTS/QCODES/CLOSE_ALL/CLOSE_ALL.py) node is used to ensure that all instrument connections are closed.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

In this example, we demonstrate how to query or set the termination value for a Tektronix MDO3000 oscilloscope.

**Note:** The MDO3XXX node should also work with the compatible Tektronix oscilloscopes MDO4XXX, MSO4XXX, and DPO4XXX. However, those have not been tested yet.
:::note
The MDO3XXX node should also work with the compatible Tektronix oscilloscopes MDO4XXX, MSO4XXX, and DPO4XXX. However, those have not been tested yet.
:::

First, we list the VISA devices with the [`LIST_VISA`](https://github.com/flojoy-ai/nodes/blob/develop/IO/INSTRUMENTS/QCODES/LIST_VISA/LIST_VISA.py) node. Knowing that the serial number is C012101, we enter the VISA address that contains this into the `VISA address` parameter for all the `MDO3XXX` nodes.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

In this example, we demonstrate how to set the triggering channel for a Tektronix MDO3000 oscilloscope and how to set the trigger threshold voltage.

**Note:** The MDO3XXX node should also work with the compatible Tektronix oscilloscopes MDO4XXX, MSO4XXX, and DPO4XXX. However, those have not been tested yet.
:::note
The MDO3XXX node should also work with the compatible Tektronix oscilloscopes MDO4XXX, MSO4XXX, and DPO4XXX. However, those have not been tested yet.
:::

We must first enter the `VISA address` parameter for the three `MDO3XXX` nodes (use the [`LIST_VISA`](https://github.com/flojoy-ai/nodes/blob/develop/IO/INSTRUMENTS/QCODES/LIST_VISA/LIST_VISA.py) node to find the VISA address).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

In this example, we demonstrate how to set the triggering channel for a Tektronix MDO3000 oscilloscope and how to set the trigger threshold voltage.

**Note:** The MDO3XXX node should also work with the compatible Tektronix oscilloscopes MDO4XXX, MSO4XXX, and DPO4XXX. However, those have not been tested yet.

:::note
The MDO3XXX node should also work with the compatible Tektronix oscilloscopes MDO4XXX, MSO4XXX, and DPO4XXX. However, those have not been tested yet.
:::
We must first enter the `VISA address` parameter for the three `MDO3XXX` nodes (use the [`LIST_VISA`](https://github.com/flojoy-ai/nodes/blob/develop/IO/INSTRUMENTS/QCODES/LIST_VISA/LIST_VISA.py) node to find the VISA address).

The [`TRIGGER_CHANNEL_MDO3XXX`](https://github.com/flojoy-ai/nodes/tree/develop/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/TRIGGER_CHANNEL_MDO3XXX) node can be used to either set or query the triggering channel.
Expand Down

0 comments on commit 60be979

Please sign in to comment.