From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to generate step increasing and decreasing Analog DC output using myDAQ

Hello, I am trying to create the analog DC output from myDAQ. I got how to create voltage with the express output function but couldn't find what I need. I need to generate a step increasing and decreasing sequentially DC voltage that looks like shown in the figure. For example, 0V and hold 1sec -> 2V and hold 1sec -> 4V and hold 1sec ->2V and hold 1sec -> 0V and hold 1sec. 

KakaoTalk_20200513_201804940.png

I have tried using for loop and array but couldn't figure out how to. Does anyone know how to do this? or is there any sample vi looks like figure that I can use for? 

 

Thanks in advance. 

0 Kudos
Message 1 of 3
(1,755 Views)

Hi hchun, and welcome to the forums!

 

Is your problem with generating the signal or with getting it output to the myDAQ?  Perhaps you could show us the code that you've tried so far.  If you post a VI, please save for LabVIEW 2015 as I haven't upgraded yet!

 

PsyenceFact

0 Kudos
Message 2 of 3
(1,714 Views)

The reason we ask users to attach their code is it really helps us to help you if we can see what you've done, so far.  It helps us to judge your level of experience in LabVIEW, tells us which version of LabVIEW you are using, lets us thoroughly examine your code (including "hidden" cases in a Case Structure), edit your code (to fix "broken wires"), and test your code (to understand any error messages you might be seeing).

 

Assuming you are new to LabVIEW, you might not know about LabVIEW Versions.  LabVIEW VIs can be opened in the Version that created it (for example, if you are running LabVIEW 2018, it can be opened with LabVIEW 2018) and with later Versions (such as 2019 or 2020), but not with earlier Versions (such as 2015).  If someone needs to see your code, but doesn't have an up-to-date version, there are two ways to provide the code:

  1. In the Save menu, there is a "Save for Previous Version".  For a beginner, this can produce a complicated result, especially if you are using libraries (such as DAQmx), as it will bundle everything it needs into a set of nested folders.
  2. An easier method is to create a LabVIEW "Snippet", a PNG image of the Block Diagram that, when pasted into an appropriate version of LabVIEW, automagically "becomes" the full Block Diagram.  It still can't be opened with an earlier version of LabVIEW, but if the VI is simple enough, the Reader can at least "see what's there".  To make one of these, do the following:
    1. Open the VI in question.  Get as much of the Block Diagram on the screen as you can.  Try to make sure that you can "see" the most relevant "pieces", especially for Case Structures.
    2. Type Ctrl-A to select everything on the Block Diagram.
    3. Go to the Edit menu, and choose "Create VI Snippet from Selected".  Decide where you want to save it and give it a name (but leave the .png extension alone).
    4. Attach the Snippet to your Reply or Post.

Bob Schor

0 Kudos
Message 3 of 3
(1,696 Views)