08-28-2006 11:29 AM
08-28-2006 11:43 AM
08-28-2006 11:47 AM
08-28-2006 01:53 PM
08-29-2006 09:35 AM
Hello,
I have some problem with the vi you gave me.
To check if it worked, I connected the output of my counter timer into the analog channel. I also change in the "DAQmx read" vi, the form of the data from a 1D DBL to a waveform. What happen is that, when I run the vi, the data on the graph is 0 all the time, even if I have a sample rate of 100 Hz while the frequency of the pulse from my counter is 1 Hz. Is it possible that the only data that the graph sees is the 0 from the initialized array?
Thanks
Marc
08-29-2006 09:51 AM
Perhaps I was not clear: that VI will not work if you change the output of the DAQmx read to a wavform.
A waveform is really just a 1D array of data with a timestamp and a dT value (that is, the amount of time elapsed between data points). If I am not mistaken, neither the timestamp nor the dT value is necessary in this particular case. I suppose if you really wanted to, you could store an array of waveforms in the shift register and use Build Array to append a waveform to the array each time the loop executes, but that would be even messier than what's in there now.
Does the VI not behave properly if you leave the output as a 1D array of doubles?
08-29-2006 10:19 AM
Hello,
Thanks a lot. It finally works. I just found what were the problems: 1) i didn't click on autoscale x and 2) waveform use seconds on the x-axis while 1D DBL used milliseconds.
What I did, is that when I used the waveform, I put the x axis from 0 to 10, without any autoscale. So when I changed to 1D DBL with still the x-axis from 0-10 and without autoscale, I wasn't seeing my pulse. I was seing only a part of my first pulse. Right now, I changed my axis and putted the autoscale x. Everything works fine now. I'm probably not the first one having being bug by so little (not to say stupid) things!!!
Thanks again. It's really appreciated.
Marc
04-22-2010 06:56 AM
Hello everyone,
I have a question concerning real-time graph too. The VI (3 different versions) i attached sends instructions through GPIB to a keithley 230 voltage source that operates a circuit and then measures the generated voltage with a NI6221. I have a couple of problems. One is that i can't get it to show the graph in realtimeand the other is that i want to use the card's on board counters to know when each measurement started and finished (since it takes some time to go through the loop and check and those few ms are crucial to my measurements. Unfortunately i can't find a way to do either of the.
Thanks a lot,
Kypros
04-26-2010 05:37 PM
Hi kypros,
I'm slightly confused as to what exactly you are trying to display regarding the x-axis. Are you trying to display the time that each sample is taken? If so, it would probably be easier if you chose to do Analog Wfm 1Chan NSamp instead of Analog 1D DBL 1Chan NSamp. This will output a waveform data type, which will still include the 1D DBL array as well as timestamping information (t0 and dt).
I also see a few things in your code that could be improved. For example, why are you converting a 2D DBL array to Dynamic Data and then from Dynamic Data to a 1D DBL array? Also, why are you doing a For Loop with a constant value of 1 wired to the N terminal? Also, you may want to give some thought to using a State Machine architecture as opposed to a stacked sequence structure. It tends to be easier to read and follow.
Aaron P
National Instruments
Applications Engineer