Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
daq-and-datalogging:documents:ulx-for-ni-labview-1 [2023/07/05 09:18] – Scandiwebdaq-and-datalogging:documents:ulx-for-ni-labview-1 [2023/07/28 20:29] (current) – Arthur Brown
Line 1: Line 1:
-====== Getting started with ULx for NI LabVIEW Part 1 ======+====== Getting Started with ULx for NI LabVIEW Part 1 ======
 Measurement Computing offers programming support for NI LabVIEW by way of using ULx.  Included with the ULx installation is a collection of sample programs you can use and learn from to perform all manner of functions. Measurement Computing offers programming support for NI LabVIEW by way of using ULx.  Included with the ULx installation is a collection of sample programs you can use and learn from to perform all manner of functions.
  
Line 16: Line 16:
 Now wire the Create Channel.VI's task out pin to the Read.VI’s task in pin, and the Create Channel.VI’s error out pin to the Read.VI’s error in pin.  It should look like this: Now wire the Create Channel.VI's task out pin to the Read.VI’s task in pin, and the Create Channel.VI’s error out pin to the Read.VI’s error in pin.  It should look like this:
  
 +<WRAP centeralign>
 {{https://files.digilent.com/reference-images/picture 1.png?434x324}} {{https://files.digilent.com/reference-images/picture 1.png?434x324}}
 +</WRAP>
  
 Next, we will add a simple way to display the value read from the USB-1608G.  Hover your mouse over the Read.VI, move the mouse so it is over the data pin.  Use the Context Help to help you locate it if needed.  When the cursor is over the data pin, it will change from an arrow to the wiring tool.  When this happens, right click and select Create >> Indicator.  Your Block diagram will look like this: Next, we will add a simple way to display the value read from the USB-1608G.  Hover your mouse over the Read.VI, move the mouse so it is over the data pin.  Use the Context Help to help you locate it if needed.  When the cursor is over the data pin, it will change from an arrow to the wiring tool.  When this happens, right click and select Create >> Indicator.  Your Block diagram will look like this:
  
 +<WRAP centeralign>
 {{https://files.digilent.com/reference-images/picture 2.png?396x148}} {{https://files.digilent.com/reference-images/picture 2.png?396x148}}
 +</WRAP>
  
 Also notice there is a numeric display on the front panel.  You’ll want to drag this a bit wider so you can see all the digits. Also notice there is a numeric display on the front panel.  You’ll want to drag this a bit wider so you can see all the digits.
Line 26: Line 30:
 The next step is to tell the Create Channel.VI what physical channel of the USB-1608G to measure. Hover your mouse’s cursor over the Create Channel.VI, then move it over the Physical Channel pin, when the cursor changes to the wiring tool, right click on the pin, and select Create >> Control.  Your Block Diagram should look like this: The next step is to tell the Create Channel.VI what physical channel of the USB-1608G to measure. Hover your mouse’s cursor over the Create Channel.VI, then move it over the Physical Channel pin, when the cursor changes to the wiring tool, right click on the pin, and select Create >> Control.  Your Block Diagram should look like this:
  
 +<WRAP centeralign>
 {{https://files.digilent.com/reference-images/picture 3.png?453x116}} {{https://files.digilent.com/reference-images/picture 3.png?453x116}}
 +</WRAP>
  
 And your Front Panel will look like this: And your Front Panel will look like this:
  
 +<WRAP centeralign>
 {{https://files.digilent.com/reference-images/picture 4.png?456x100}} {{https://files.digilent.com/reference-images/picture 4.png?456x100}}
 +</WRAP>
  
 All you need do now is click on the physical channels combo box and select Dev1/Ai0 to select channel 0 of the USB-1608G, and click on the run button to acquire a sample and display it. All you need do now is click on the physical channels combo box and select Dev1/Ai0 to select channel 0 of the USB-1608G, and click on the run button to acquire a sample and display it.
Line 37: Line 44:
 If all ran correctly, your Front Panel should look something like this: If all ran correctly, your Front Panel should look something like this:
  
 +<WRAP centeralign>
 {{https://files.digilent.com/reference-images/picture 5.png?452x127}} {{https://files.digilent.com/reference-images/picture 5.png?452x127}}
 +</WRAP>
  
 You can enhance this VI by adding error handling, a while loop, iteration timing, writing the data to file, etc. but here is where we will leave this VI, to be continued in Part 2.  Save this VI to your computer as we will add to it in part 2. You can enhance this VI by adding error handling, a while loop, iteration timing, writing the data to file, etc. but here is where we will leave this VI, to be continued in Part 2.  Save this VI to your computer as we will add to it in part 2.