Differences
This shows you the differences between two versions of the page.
| test-and-measurement:digital-discovery:controlling-digital-discovery-with-labview:start [2021/05/14 23:05] – ↷ Page moved from reference:test-and-measurement:digital-discovery:controlling-digital-discovery-with-labview:start to test-and-measurement:digital-discovery:controlling-digital-discovery-with-labview:start Arthur Brown | test-and-measurement:digital-discovery:controlling-digital-discovery-with-labview:start [2022/10/04 11:38] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 8: | Line 8: | ||
| <WRAP group> | <WRAP group> | ||
| == Hardware == | == Hardware == | ||
| - | * [[https://store.digilentinc.com/ | + | * [[https://digilent.com/shop/ |
| * [[https:// | * [[https:// | ||
| * Jumper wires | * Jumper wires | ||
| - | * [[https://store.digilentinc.com/ | + | * [[https://digilent.com/shop/ |
| * [[https:// | * [[https:// | ||
| - | * [[https://store.digilentinc.com/ | + | * [[https://digilent.com/shop/ |
| - | * [[https://store.digilentinc.com/ | + | * [[https://digilent.com/shop/ |
| - | * [[https://store.digilentinc.com/ | + | * [[https://digilent.com/shop/ |
| * red LED - required for the //Using Different Logic Voltages// example | * red LED - required for the //Using Different Logic Voltages// example | ||
| * 10KΩ resistor (brown-black-orange-gold) - required for the //Using Different Logic Voltages// example | * 10KΩ resistor (brown-black-orange-gold) - required for the //Using Different Logic Voltages// example | ||
| == Software == | == Software == | ||
| - | * [[reference:software: | + | * [[software: |
| * [[https:// | * [[https:// | ||
| * [[https:// | * [[https:// | ||
| </ | </ | ||
| - | **Note:** //WaveForms can be installed by following the [[reference:software: | + | **Note:** //WaveForms can be installed by following the [[software: |
| ---- | ---- | ||
| ===== Creating VIs for a Shared Library ===== | ===== Creating VIs for a Shared Library ===== | ||
| <WRAP group> | <WRAP group> | ||
| - | Digital Discovery, as well as other Test and Measurement Devices, can be controlled using the functions available in WaveForms SDK. For the list and description of the available functions see C:\Program Files (x86)\Digilent\WaveFormsSDK\WaveForms SDK Reference Manual.pdf, or [[reference:software: | + | Digital Discovery, as well as other Test and Measurement Devices, can be controlled using the functions available in WaveForms SDK. For the list and description of the available functions see C:\Program Files (x86)\Digilent\WaveFormsSDK\WaveForms SDK Reference Manual.pdf, or [[software: |
| To use the functions available in WaveForms SDK within LabVIEW, virtual instruments (VIs) have to be created from these functions. Follow the instructions in this guide to see, how to import the WaveForms SDK shared library in LabVIEW. | To use the functions available in WaveForms SDK within LabVIEW, virtual instruments (VIs) have to be created from these functions. Follow the instructions in this guide to see, how to import the WaveForms SDK shared library in LabVIEW. | ||
| Line 63: | Line 63: | ||
| <WRAP group>< | <WRAP group>< | ||
| - | Certain properties of every function can be edited in the following, but as the dwf library contains several hundred functions, it is more time efficient to leave every function with the default settings and edit just certain functions before using them (this is discussed in the [[reference:test-and-measurement: | + | Certain properties of every function can be edited in the following, but as the dwf library contains several hundred functions, it is more time efficient to leave every function with the default settings and edit just certain functions before using them (this is discussed in the [[test-and-measurement: |
| When the Generation Process is finished, the VI library is ready to use. However, in the case of certain functions, an edit to the generated VI is necessary. | When the Generation Process is finished, the VI library is ready to use. However, in the case of certain functions, an edit to the generated VI is necessary. | ||
| Line 91: | Line 91: | ||
| <WRAP group>< | <WRAP group>< | ||
| - | In the [[reference:software: | + | In the [[software: |
| </ | </ | ||
| {{ reference: | {{ reference: | ||
| Line 148: | Line 148: | ||
| Download and unzip the provided example file {{ reference: | Download and unzip the provided example file {{ reference: | ||
| - | **Note:** //For this VI to work, the dwf VI library is necessary (see: [[reference:test-and-measurement: | + | **Note:** //For this VI to work, the dwf VI library is necessary (see: [[test-and-measurement: |
| </ | </ | ||
| ---- | ---- | ||
| Line 174: | Line 174: | ||
| Continuous reception of data is only started if there was no error at the pull-up check. If the check fails, an error message is displayed and data reception is not started. | Continuous reception of data is only started if there was no error at the pull-up check. If the check fails, an error message is displayed and data reception is not started. | ||
| - | At every iteration of a while loop, 2 bytes of data are received from the address defined on the front panel. The function F Dwf Digital I2c Read is edited, so the read data buffer is outputted to an Unsigned 8-bit Integer Array and not to a String (see: [[reference:test-and-measurement: | + | At every iteration of a while loop, 2 bytes of data are received from the address defined on the front panel. The function F Dwf Digital I2c Read is edited, so the read data buffer is outputted to an Unsigned 8-bit Integer Array and not to a String (see: [[test-and-measurement: |
| The two received bytes are concatenated and shifted to the right with four bits, then raw data is converted to degrees Celsius and Fahrenheit and displayed on the Front Panel with the help of the thermometers. The received bytes are converted to hexadecimal strings, then concatenated with " | The two received bytes are concatenated and shifted to the right with four bits, then raw data is converted to degrees Celsius and Fahrenheit and displayed on the Front Panel with the help of the thermometers. The received bytes are converted to hexadecimal strings, then concatenated with " | ||
| Line 240: | Line 240: | ||
| Download and unzip the provided example file ({{ reference: | Download and unzip the provided example file ({{ reference: | ||
| - | **Note:** //For this VI to work, the dwf VI library is necessary (see: [[reference:test-and-measurement: | + | **Note:** //For this VI to work, the dwf VI library is necessary (see: [[test-and-measurement: |
| </ | </ | ||
| ---- | ---- | ||
| Line 258: | Line 258: | ||
| The main VI (program_AVR.vi) contains several parts separated by decorative and functional structures, as well as multiple subVIs. In the following, these will be presented. | The main VI (program_AVR.vi) contains several parts separated by decorative and functional structures, as well as multiple subVIs. In the following, these will be presented. | ||
| - | The first block contains functions for first closing every opened Test and Measurement device, then opening the first available device. Following that, the digital voltage is configured to be 3.3V, then power on the VIO pins is turned on. For more information on these functions, see: [[reference:software: | + | The first block contains functions for first closing every opened Test and Measurement device, then opening the first available device. Following that, the digital voltage is configured to be 3.3V, then power on the VIO pins is turned on. For more information on these functions, see: [[software: |
| </ | </ | ||
| {{ reference: | {{ reference: | ||
| Line 278: | Line 278: | ||
| After 100ms, the content of the HEX file is read, and the data to be written in the flash memory of the MCU is put into an array. The program offset is also extracted from the file. The next block (AVR_write.vi) gets the flash memory size, the flash page size, the program offset, and the data from the previous block as parameters, and saves this data in the flash memory of the MCU. | After 100ms, the content of the HEX file is read, and the data to be written in the flash memory of the MCU is put into an array. The program offset is also extracted from the file. The next block (AVR_write.vi) gets the flash memory size, the flash page size, the program offset, and the data from the previous block as parameters, and saves this data in the flash memory of the MCU. | ||
| - | The function **F Dwf Digital Spi Write**, from the dwf VI libary, used in the AVR_write subVI, has to be edited: The type of parameter **rgTX** needs to be changed from String to an **Array of Unsigned 8-bit Integers**. A terminal should be also connected to the control field of this parameter. For more information see [[reference:test-and-measurement: | + | The function **F Dwf Digital Spi Write**, from the dwf VI libary, used in the AVR_write subVI, has to be edited: The type of parameter **rgTX** needs to be changed from String to an **Array of Unsigned 8-bit Integers**. A terminal should be also connected to the control field of this parameter. For more information see [[test-and-measurement: |
| After the **Uploaded** indicator is turned on, the digital in- and out instruments of the Digital Discovery are reset, to ensure the proper functioning of the MCU. | After the **Uploaded** indicator is turned on, the digital in- and out instruments of the Digital Discovery are reset, to ensure the proper functioning of the MCU. | ||
| Line 395: | Line 395: | ||
| Double click on the main VI (variable_logic_voltage.vi) of the downloaded example to open it with LabVIEW Community. All the functions and subVIs used in the example can be used in your own VI, play around and see what else you can create. | Double click on the main VI (variable_logic_voltage.vi) of the downloaded example to open it with LabVIEW Community. All the functions and subVIs used in the example can be used in your own VI, play around and see what else you can create. | ||
| - | **Note:** //For this VI to work, the dwf VI library is necessary (see: [[reference:test-and-measurement: | + | **Note:** //For this VI to work, the dwf VI library is necessary (see: [[test-and-measurement: |
| </ | </ | ||
| ---- | ---- | ||
| Line 503: | Line 503: | ||
| ===== References ===== | ===== References ===== | ||
| <WRAP group> | <WRAP group> | ||
| - | * [[reference:software: | + | * [[software: |
| * [[https:// | * [[https:// | ||
| - | * [[reference:pmod: | + | * [[pmod: |
| * [[https:// | * [[https:// | ||
| * [[http:// | * [[http:// | ||
| * [[http:// | * [[http:// | ||
| * [[https:// | * [[https:// | ||
| - | * [[reference:pmod: | + | * [[pmod: |
| - | * [[reference:pmod: | + | * [[pmod: |
| - | * [[reference:pmod: | + | * [[pmod: |
| * [[https:// | * [[https:// | ||
| </ | </ | ||
| Line 518: | Line 518: | ||
| ===== Final Notes ===== | ===== Final Notes ===== | ||
| - | For more guides and example projects for your Digital Discovery, please visit its [[reference:test-and-measurement: | + | For more guides and example projects for your Digital Discovery, please visit its [[test-and-measurement: |
| - | For more information about how to use the software featured in this demo, please visit its respective guide: [[reference:test-and-measurement: | + | For more information about how to use the software featured in this demo, please visit its respective guide: [[test-and-measurement: |
| For technical support, please visit the [[https:// | For technical support, please visit the [[https:// | ||
| {{tag> | {{tag> | ||

