11-04-2009 06:05 AM
Hi John,
Thanks for your valuable support. I did use arbitrary waveform as 4th element in the array, now it is working.
They are few more parameters i want to change like amplitude and phase as well. When i change amplitude for each element independently they are working well, but i could not change phase between any two or more waveforms independently.
Say i generate 2 sine waveforms with same frequency and different ampitude, these parameters are varying well as.
To change phase now i added another element in each of the waveforms for phase control, but i could not introduce phase indepently for each element. When i introduce 90 phase in first element in waveform array then all of the elements are showing phase shifted by the same amount. How to over come this issue??
I am working on digital waveform generation as well in sync with analog outputs. I will let you know how it goes. For digital waveform generation should i use AI sample clock or AO sample clock as the clock for synchronous analog and digital waveform generation?
It was great help from you. Thanks a mil!!!!!!
viswa
11-04-2009 10:38 PM
Hi viswa,
Could you post the latest version of the code so I can see what you've tried so far? The phase differences should be programmable, but I might have to make some changes to the example code to get this to work.
If you are trying to synchronize digital outputs with analog outputs, I would use the AO sample clock. AI sample clock is used for analog input tasks.
-John
11-05-2009
07:38 PM
- last edited on
05-23-2025
05:02 PM
by
Content Cleaner
I see what the problem is now--I went ahead and added a second version of the code to the Community site that should allow you to adjust the phases of your waveforms:
11-05-2009 07:41 PM
Hi John,
I have attached the code edited according to my requirement. As you know that i can generate 4 different signals with the code from analog output. Along with these i want to generate 2 more negative pulses for controlling CCD camera externally in sync with 4 anlog outputs.
I was confused about the horizontal and vertical sync pulses, are they digital or analog waveforms?
If i guess correctly any digital waveform should be 0V for 0 low logic and 5V for high. But the sync pulses seems to be analog negative pulses. I have obtained vertical and horizontal sync pulses using an oscilloscope and are attached to this post.
More details of the CCD pulse are available in detail.......please look at them if you dont mind......sorry for keep troubling you.
As i am not advanced user of Labview asking your generous help in a time constrained situation.
http://forums.ni.com/ni/board/message?board.id=200&thread.id=25452
viswa
11-05-2009 07:52 PM
John,
The updated code with phase modification seems like not linked properly, it just says QUEUED and there is no link highlighted.
11-05-2009 07:54 PM - edited 11-05-2009 08:00 PM
I need to learn to put a disclaimer on my posts--I just posted the code immediately before my message so the uploader will take a few more minutes to finish loading the example.
EDIT: Upload has been completed
11-05-2009 08:05 PM - edited 11-05-2009 08:09 PM
Regarding the digital lines, you're absolutely correct that the Multifunction board should output around 0V signal for logic low, and around 5 V for logic high.
I couldn't immediately tell from the camera specs what the trigger levels were for the digital lines, but you might consider using a simple op-amp circuit to invert and scale the voltages to your appropriate levels.
11-05-2009 08:23 PM
Hi John,
your help is invaluable!!!!! thanks a lot. i will try testing the updated code tomorrow. I have one more doubt about NIUSB 6229 card physical channels corresponding to digital outputs in spec sheet they say POo....31 are port 0 aned PFI/P0 ......15 etc are port1. I have never generated a digital output before so if you dont mind can you tell me how to connect source and output physically????
11-05-2009
10:58 PM
- last edited on
05-23-2025
05:03 PM
by
Content Cleaner
Hi viswa,
Since it sounds like the clock will be coming from the AO Sample Clock, you can actually route this internally on the 6229. The external connections will just be whatever digital lines you select to use for outputs--you may use port 0 (lines 0-31) for hardware-timed digital outputs. Ports 1 and 2 are used only for PFI lines and software-timed Digital I/O.
You might want to check out this example to see how you might synchronize digital outputs with the AO sample clock (although I didn't personally write this one ). The tricky part can sometimes be building the waveform--if you get stuck don't hesitate to let us know.
-John
11-06-2009 08:57 PM
Hi John,
Thanks again for your support!!! I tried to generate today 2 digital output pulses along with 4 analog output waveforms using USB6229. I did see all the waveforms were generated at simultaneously.
Now i have 2 problems
1. I want to control the digital output pulse width and its frequency, how can i do that any idea???? (If you look at the images of VSYNC and HSYNC of camera(in message 14) and digitaloutput pulses in image1, you will notice that i am just trying to produce the same waveforms using DAQ digital lines.
2. I have attached here 2 digital output waveforms as an image of oscilloscope they are taken at AO samle clock rate at 50000 S/sec and number of samples 10000. When i generate high frequency analog output waveform (say 10000Hz) DAQ card needs higher sample clock rates so i changed clock rate to 100000S/sec to generate all the waveforms then got an error saying that to decrease clock rate to avoid over flow of info. So if want to generate higher analog frequency waveforms i can sync USB 6221 with USB6229 if possible to generate all the signals correctly.
Any suggestion are welcome.......
cheers
viswa