Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Simulaneous Digital and Analog Outputs

Hello all,

I am very new to National Instruments and was wondering if anyone can help me out. I have purchased the NI PCI 6711 card to be able to simultaneously generate 4 analog outputs (sine waves) and 1 digital output (discrete pulse). The discrete digital pulse has to be TRUE when the first analog signal (sine wave) peaks. In effect, the digital pulse is triggered when the first sine wave is maximum. This digital pulse will be used to trigger some other device. The other three analog sine waves are phase shifted by 90 degrees from one another.

Currently, I have managed (through some examples on the web and tutorials) to generate the 4 sine waves through 4 different channels.

I have tried to generate the digital pulse but I do not think it is doing anythingSmiley Sad. The digital pulse in the programme is triggerd when the first analog wave is positive (used a comparison node). I have attached my programme here so you could have a quick look.

I was hoping someone could point me into the right direction or even assist me in any way?

I hope somebody can help me.

Thanks in advance...

Gavita
0 Kudos
Message 1 of 11
(4,705 Views)
Hi Gavita,

I think the problem you are having is because you are comparing the entire waveform to see if it is greater than zero. You stated that you wanted it to output at the moment the fist wave reaches its maximum, how tight has this syncroisation got to be? At the moment you are trying to use sofware timming which will not be as accurate as done in hardware. You have two counters on that card and it would probably be better to use those to generate your pulse. I'll see if I can come up with a simple example for you.

Regards

Jon Bowers
NIUK Applications Engineer
0 Kudos
Message 2 of 11
(4,672 Views)
Hi Gavita,

To configure a channel to start from a trigger you need to configure the trigger part of the application. Have a look in the example finder for the Write Dig Chan-Int Clk-Dig Start VI. It will be under Hardware Input and Output >> DAQmx >> Digital Generation.

The way the program is currently writen, you're starting the Digital channel straight away, it's not waiting for the analog wave to go positive.

If you want it to start when the wave you're generating goes above a certain level you could use a case structure to make a software decision on when to start the acquisition. Have a look through the help for more information on case structures.

I hope this gives you a guideline. If you've further questions on any of this just post and I'll look into it for you.

Good luck!

Sarah B

NI | UK


Sarah

Applications Engineer | National Instruments | UK & Ireland
0 Kudos
Message 3 of 11
(4,670 Views)
The digital signal can start at the start of the analog signal. All that matters is that the point of which the digital signal is triggered is consistent. For example, if the analog signal has been defined to run for 5 periods, and if the digital signal has been programmed to be triggered at the start of the analog signal, then the digital signal should be triggered at the start of every analog signal new period.

So, the reason I am comparing the entire waveform to see if it is greater than zero, is to achive the consistent triggering of the digital signal.

I hope this makes sense...

I look forward to hear from you on any suggestions that may help resolve my problem...

Thank!
0 Kudos
Message 4 of 11
(4,670 Views)
Hi Gavita,

I have made a quick example that outputs a digital pulse on one of the counters. This pules is set at the same rate as the waveform frequency. You can set it to trigger the waveform so the pulse goes high and the waveform starts at exactly the same time. Alternatively it can be non triggered and the two tasks are started at the same time in software. This results in roughly a 3 millisecond delay before the digital pulse starts and you cannot determine what the delay will be but from then on the pulses will always occur at the same point in the waveform. Check the pinout of your card to see what pin is the Couter 0 output as this is where the pulse is generated from.

Regards

Jon B
Applications Engineer
NIUK
0 Kudos
Message 5 of 11
(4,662 Views)
Thank you very much for your efforts. I shall have a look at it and try it.

Thanks AGAIN!
0 Kudos
Message 6 of 11
(4,657 Views)
Hi Jon,

I just tried to look at the example that you have presented and I am unable to view the file as I am running LabView7. I think you the emaple you have sent me runs on LabView 8. Do you think, you could present a similar exmaple with LabView7?

Thanks!
Gavita
0 Kudos
Message 7 of 11
(4,615 Views)
Hi Gavita,

Could you confirm if you have 7.1 or 7.0?

Thanks
Sarah

Sarah

Applications Engineer | National Instruments | UK & Ireland
0 Kudos
Message 8 of 11
(4,614 Views)
Hi Sarah,

I am using LabView 7.1.

Thanks,
Gavita
0 Kudos
Message 9 of 11
(4,612 Views)
Hi Gavita,

I saved Jon's VI back to 7.1 for you as Jon's out of the office today. Post back if you've any further questions.

Kind regards,
Sarah

NI | UK
Sarah

Applications Engineer | National Instruments | UK & Ireland
0 Kudos
Message 10 of 11
(4,610 Views)