Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How to avoid delay during analog output generation by changing its frequency?

Windows XP
LabVIEW 7.1
PCI-6036E + BNC-2120

Hi,

I am going to create a vi to generate an engine speed sensor signal (a simple square wave with specific missed pulses, in my case 58 pulses “teeth” and 2 missed pulses “missed teeth”) as an analog output but in addition give me the opportunity to control parameters for example frequency online to simulate the engine speed changes during running that vi. For this purpose I have started with “Continuous Generation.vi” which is available in NI Example Finder under the following path:

Hardware Input and Output > Traditional DAQ > Analog Output > Continuous Generation.vi

Then I modified it towards above mentioned goal, all related vi s are attached. The main vi is: "Motor Signal Generator_1.12.vi"

At the first try it looks that it works properly but when have a look on that more accurately with Oscilloscope (fortunately I have a good one: Agilent 54621A – 60 MHz, 200 Ms/s) obviously there is a gap (delay or Jitter) whenever I change the engine speed. It is also attached in Signal generation_problem report.doc file.

Note: Small gaps are OK and related to predefined missed teeth but the big one is happened during changing engine speed.

As far as I understand it is related to the time which case structure in AO C-GEN sub-vi needs for AO reconfiguration each time after changing the engine speed (update rate). How can I get rid of this delay or gap during signal generation and generating completely continuous signal?

I have to mention that obviously I changed the frequency by changing the update rate. The other possibility is to change the number of updates in one period (refer to "generate arb frequency.vi" in NI site: http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B45EACE3E48F56A4E034080020E74861) which resulted in no delay however then I can not change the frequency continuously but step by step (for example jump from 5Khz to 2.5KHz immediately) and this can not pass to my application.

Any hint is appreciated.

regards
0 Kudos
Message 1 of 4
(3,083 Views)
Hi,

since you've installed LV 7.1, I'd recommend you to use the DAQmx API instead of the Traditional DAQ. To generate a pulse train, you could also use one of the counters on the 6036. As start point you adapt the Gen Dig Pulse Train - Continuous VI to your needs. Alternatively, if you wanna generate an analog voltage, prefer the Cont Gen Voltage Wfm-Int Clk-Non Regeneration VI. The automatic regeneration of data is disabled in this example, so make sure that new data is provided throughout the duration of the continuous Analog Output operation.

Best regards,
Philippe Goetz,
Applications Engineer, NI
0 Kudos
Message 2 of 4
(3,068 Views)
Dear Mr. Goetz,

Thanks for your reply. Could you please let me know also if is it possible at all to simulate/generate sensor signals such as engine speed sensor which goes up from 0 to 6KHz continuously and without any delay between two differnet desired frequencies with such a card (6036E) or I have to go for something like NI 6723?

Best regards,
Roozbeh Razzaghi
0 Kudos
Message 3 of 4
(3,066 Views)
Hi Roozbeh,

The following example will allow you to vary the pulse train frequency during run time.

Thanks,
Lesley Y.
0 Kudos
Message 4 of 4
(2,966 Views)