Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

timing and digital I/0

Hi, I am having problem with understanding of labview and how it works. I have a program working in finite sampling mode, that do all the work described in the previous post. Why do I get the output singnal jittering when I increase my input frequency. It looked like that program work only for input signal of 1 HZ. Can somebody tell me what was the problem at all. For 1 Hz frequency, I see my output at 3 ms after the triggering analog event. But why at 100 HZ, the output started skipping like 2 or 3 triggering signal. I am so confused... please explain me
0 Kudos
Message 11 of 27
(2,135 Views)
 

Hello mynameislam,

First of all, I need to better understand the problem.  It sounds like you setting up analog triggering for one of your tasks, specifically analog output.  Normally this is done by adding a DAQmx Triggering VI to your block diagram.  Is this the case, or do you mean something else when you refer to the "triggering analog event."

It is difficult to say what the problem might be without knowing exactly how you are programming your application.  Can you tell me which of the examples in the DAQmx Hardware-Timed Single Point Lateness Checking tutorial you have based your application on, and what changes you have made to it?  With this information, we might be able to isolate what is causing the behavior you described.

Thanks,

 
0 Kudos
Message 12 of 27
(2,118 Views)
Thank you, I would like to show you two my example that do the same job. The first one I used finite mode, and the second hardware single point mode. My idea is just using the second example with an additional cable to delay the triggering signal. But my professor said that was just an "medieval way of doing it. How would I tell him the first example can not work fast enough and I have to work with the second example with an additional cable to delay the signal ?
0 Kudos
Message 13 of 27
(2,105 Views)
0 Kudos
Message 14 of 27
(2,105 Views)
OOppps  this is the second example using Hareware single point mode
0 Kudos
Message 15 of 27
(2,107 Views)
Hello mynameislam,

First of all, I would also discourage you from using a extra cable to introduce some delay in the signal.  This is not a very robust approach. 

In both examples that I looked at, your analog output is not set up to be either hardware timed or triggered.  As it is, your analog output task is software timed, meaning there is no correlation to any hardware signal.  With this in mind, any delay you were seeing in the response of your analog output is completely expected.  You would have to add a DAQmx Timing VI to make the task hardware timed or a DAQmx Trigger VI to set up a Start Trigger

Again, I would encourage you to refer to the DAQmx LabVIEW examples, which demonstrate a number of key concepts such as hardware timing (single or multi-point), triggering, and synchronization.  Please let me know if you have any specific questions about how a certain example works.

Best regards,
0 Kudos
Message 16 of 27
(2,103 Views)
 Thank you for replying me. I found not using cable is something that is very difficult to do. First I had to have the program taking input measurement at very fast rate. I did this by hard ware single point. But the problem is that it has to be a certain time after the triggering event was received.  Hardware single point mode only offered measurement taking right at the point of triggering event. If I were to used any other method than program is not running fast enough. For example, in program 1 that I posted before, I used single point mode with 4 finite sample per channel and have the offset reading to current position is 3. Then I would have the 4th data, which is the second data after triggering, or a certain amout of time of triggering analog edge was received ( the minimum of pretrigger is 2). After receiving the data I just have to output 1 finite voltage.  However, when putting an input frequency of 1 kHz, I received only 300 data per second.... That was how I change to hardwaretriggering ... but then as describe above I have to have a cable to delay the triggering signal otherwise it would take a measurement right at the moment of triggering event....Please tell me if I was wrong...
 thank you
0 Kudos
Message 17 of 27
(2,099 Views)
thank you, just want to let you know that I wasnt having problem with the output. The problem is input signal, when at 1kHz input signal, I had only 300 samples per second. Thank you
0 Kudos
Message 18 of 27
(2,097 Views)
 
 

Hello mynameislam,

It looks like you are using an external clock.  You might want to measure this signal with an oscilloscope to make sure it is the frequency you expect.  Other than this, there should be no reason why you are missing samples if your task is hardware timed.

I would recommend that you go back to the DAQmx Hardware-Timed Single Point Lateness Checking tutorial and build a test program exactly like the one you see in "Application Case 1 - Hardware-Timed Simultaneously Updated I/O."  As you will see there are a couple of differences from your code, including the addition of the DAQmx Wait for Next Sample Clock.vi and the absence of the DAQmx Read Property Node.  You shouldn't be setting this property to "Most Recent Sample".  The default value is "Current Read Position" and this should work for your application. 

This example should work and then you can build on it.  As you make incremental changes and find that something is not working, you should be able to easily isolate the problem.

I hope this helps!

Best regards,

 

Message Edited by Jarrod B. on 09-19-2006 09:49 AM

0 Kudos
Message 19 of 27
(2,082 Views)

 As I mentioned before, I have the program work at hardware time mode. The thing I dont understand is why it is not working in software time mode. I though my processor clock: 750 MHz is big enough to control everything. In addition my card' clock base is 20 Mhz, why I am still having problem receiving frequency input of 1 Kh,

 Thank you for helping me

0 Kudos
Message 20 of 27
(2,076 Views)