LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronous AO/AI/CO Waveform Issue

See my old thread here:

http://forums.ni.com/t5/LabVIEW/Synchronous-AI-AO-amp-CO-Issue/m-p/1655400

 

Attached is an updated version where I've replaced my custom wavegen subvi with a simple triangle wave generator (there was a problem with the wavegen vi that is irrelevant to my current issue). As you can see I'm trying to take a measurement and generate a triangle wave while sending a digital pulse, all at the same frequency. I've used a frequency of 10hz for the pulse and set the ao and ai sample clocks to the same rate. The problem I'm having is that my laser sheet (created by rotating a scanning mirror via my ao line) should be sweeping forward and then back, a distance specified by my a0 voltage, all in 0.1 seconds (10hz), but it is instead crawling slowly across the wall; so slow in fact that it's very difficult to tell that it's even moving at all. I have to stop it every time because it would definitely take maybe 15 minutes or so for it to even do one complete sweep (specified by the ao voltage). Any insight into why this would be happening would be much appreciated.

Download All
0 Kudos
Message 1 of 4
(2,228 Views)

Hello tenub,

 

Thanks for the question.

 

Have you probed your AO to check that your VI is outputting what you're expecting? I wonder if it is different than just looking at the waveform you've created.

 

Also make sure your analog output is exactly what your laser sheet is expecting in order to sweep the specific distance at that specific rate.  Another source of error could be that your laser sheet is expecting a higher current input than what your AO is supplying.

 

Cheers,

 

Lisa

Applications Engineer
National Instruments
0 Kudos
Message 2 of 4
(2,179 Views)

I figured it out with an oscilloscope and just made a multipler to use with the frequency but only for the frequency input to the triangle waveform generator. A new question I have is that I need to change the phase of the waveform because it is out of sync with my counter out pulse by about 20 ms but each time I change the phase it resets after about a second to what I assume is the default value of 0. Any help would be much appreciated!

0 Kudos
Message 3 of 4
(2,166 Views)

Hi tenub,

 

I'm glad you were able to control the laser!

 

I'm assuming you're synchronizing your AI and AO to the counter, as you wanted from the other forum thread you mentioned in your first post.  Can you provide a secondary screenshot as to how you're programming this new VI?

 

Thanks,

 

Lisa

Applications Engineer
National Instruments
0 Kudos
Message 4 of 4
(2,136 Views)