LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting real-time and overall plot using timed sequence

Hi guys, I came to a problem that I can't solve even with Google and NI rich website. I'm using Labview to send a voltage of a certain value using NI BNC-2210 connected to PCI-6036E card. The idea is that the VI will maintain voltage at the analog output for certain period of time, then change it to another value and hold it for another period of time, and so on. This is for the external power source, as it is regulated by external voltage (which I'm doing using Labview).  I'm using Timed sequence, and the program itself works (I can see that on the external power source). However, I can't get any chart working. I tried XY graph with no result, I tried playing with waveform chart with no result as well. The problem is, waveform chart is set for certain frequency and amount of samples, which is then used for X (time) axis of the graph. I couldn't find anywhere how to adjust that from the interface. I also tried XY graph with X axis coming from Tick function and Y axis coming from Simulate signal, but with no luck. Do you guys have any idea how to do it. I'm sort of a newbie to labview, I passed some course, but obviously it was not enough. I'm attaching my VI program. 

 

Labview 8.5.1

Windows XP

NI BNC-2210

PCI-6036E

 

I want each frame of my Timed sequence to have different time/voltage values, I guess it'll be easy extendable (just ctrl-c and ctrl-v). The last frame of Timed sequence will set voltage to zero.

0 Kudos
Message 1 of 4
(2,733 Views)

I'm guessing you've not spent time with the LabVIEW Tutorials -- if not, do so, and if you have, go back and do it again, but this time, pay attention, do all of the exercises, and do as many as you can find.

 

  • Don't use Timed Sequences -- they are really for LabVIEW RT.
  • Don't use Frames except in the rarest of cases.  Understand the Principle of Data Flow, which is central to the idea of LabVIEW (analogy -- the idea of a Matrix is a key concept in MatLab ...).
  • Think before you start coding.  [The Real Rule, of course, is "Write the Documentation First".]

So some questions about basic structure and how you want your program to work.  Do you envision having a list of fixed Times and Voltages, such that you'd be at, say, 3v for 5 seconds, then 6v for 15 seconds, then 0v and exit?  Or do you envision "When I push this button, go to the voltage on that dial, repeating until I push the Stop button, at which point sent the output voltage to 0 before exiting"?

 

What sort of plot do you want?  Is it enough to, say, once a second, plot the voltage that is coming out, and continuing as long as the program is running?

 

How strict a control of Time do you need?  Is "waking up once/second" good enough?

 

Once the problem(s) and variable(s) are clearly specified and understood, you can think about an (abstract) algorithm to achieve your goals.  Then, the easy part, you can implement your algorithm in LabVIEW.  But thinking/design comes first!

 

Bob Schor

0 Kudos
Message 2 of 4
(2,679 Views)

Thank you for your reply, I have to admit that you are 100% right. I thought that I might find my solution on NI webpages without looking more into the tutorials, but it seems like I have to go through them first very thoroughly. My vision is that I will use fixed times (which I want to adjust before I start the experiment). The plot is okay once a second (it would be okay even once a minute) and waking up every second is fine too. I really thought I could make it work with Timed Sequence, but I will try to accomplish that using just Data Flow Principles. I'll go through the tutorials now and if I can't think of solution after that, I'll ask here again.

0 Kudos
Message 3 of 4
(2,676 Views)

I went throught the tutorials more thoroughly and it actually helped me. I solved my problem using Case loop, as you can see in attached .VI program. However, there's another thing that's puzzling me. You see in the program, it changes values of voltage correctly, but I'd like to set it for certain time interval - for example going from 1V to 2V in 5 seconds. I tried to adjust it by making the Wait time longer or shorter, but only thing that does is that the loop is actually waiting, but then suddenly changes voltage value. Do you have any idea how to accomplish that?

0 Kudos
Message 4 of 4
(2,648 Views)