08-13-2009 11:17 AM
Hi
I am using LabVIEW v8.6.1 PXI-6251 (M-Series DAQ), I am reading a digital line (Say DIO1), the input to DIO1 is a pulse of 1.6ms width and it aperies every 50ms, for each digital pulse I am acknowledging with an analog output through analog output channel (DAC0OUT).
But problem is my LabVIEW program is not reading some input pulses, I fell it is not able to read all the digital pulse which is coming at fast rate, because Windows (I am using Windows XP) may be doing context switching.
Note: What I have observed is when I open more application rate of not reading pulse is more, if I close all application and just run this vi, rate of not reading pulse is less.
I have attached the vi which I am using.
Any suggestion or help???
Thanks
Sunil
08-14-2009 04:35 AM
I would suggest to have a look at some synchronization examples for AI with DIO under the LabVIEW Example Finder.
Christian
08-14-2009 12:12 PM
I went through the examples, but I didn’t find the example which suites my requirements.
Below is the input and output waveforms what I am expecting.
I am reading 2 digital lines DIO0 (Blue in below figure) and DIO1 (yellow in below figure), width of both the pulse is 1.6ms and BLUE pulse appears every 50ms and YELLOW pulse appears every 80ms.
When ever these pulses (BLUE and YELLOW) are received I am sending analog data trough DAC0OUT (RED in below figure), amplitude of output data vary for each digital line.
The above program works fine most of the times, but it randomly misses to read some input (digital pulse). Is there any option or vi where I can control the analog out depending on input digital pulse through hardware instead of software.
ThanksSunil08-14-2009 12:18 PM
Sorry I missed to attach the figures in my previous post.
I have attached the document version of previous mail
Thanks
Sunil
08-14-2009 12:29 PM
Hello Sunil,
Depending on the waveform that you are outputting, I would guess that your best option for your application would be to build an external or gate to route into your card (assuming that you want to trigger the same analog output based off of both lines). You can then do a retriggerable analog output that you have clocked based off of one of your counters on your card (since you cannot setup a retriggerable AO directly). This approach will take out all software from your system and will allow you to have much faster response times to these triggers to ensure that you don't miss them.
If this sounds like the behavior you are looking for, let me know and I can help you out with how we can craft the code to your needs.
08-14-2009 01:05 PM
Hi Cole,
Thanks for replay.
I think yes, this is the behavior what I am looking for…..
Before starting, is following condition doable “The AO amplitude should vary depending on digital lines and also depending on different test conditions (say case 1: 0.5V for yellow and 0.25 V for blue, case 2: 0.75V for yellow and 0.5 V for blue etc).”
And can you please clarify on below
When you say “build an external or gate to route into your card” what exactly this mean, do you man to say we need to build an external circuit to control the digital inputs??
And also I am really new to DAQ, so I need lot of support…
Thanks
Sunil