09-30-2005 10:31 AM - edited 09-30-2005 10:31 AM
I am telling FGen 5412 to run On/Off segments – feeding that information from NI FGen Create Waveform – using WDT.
I am running in Arbitrary Sequence mode.
First I create the Square wave at 24,000 Hz in waveform format, building 2 segments, 1 high and one low. Breaking each segment into array of 100. There are marker segment on each high and low. Marker on Index 76 of each segment routed to RTSI 2, which triggers the sample clock of S-DAQ PCI-6143. The marker segments occur at a rate of 48,000 Hz since they are 2x a cycle (on, off).
Loop counts for each segment is set to 1 – only want 1 on and 1 off in order.
The problem can be seen in the above picture - the FGen is cycling itself off and restarting. This is creating real problems in my data. I want the signal to just stay continuous Square wave with the markers to drive my DAQ. Is there a way to have the Function Generator run continuous without these “shut-offs”?
The picture was taken using MAX to monitor the signal after I started the FGen with the VI that I created. I am not restarting the FGen myslf.
Help would be GREATLY appreciated as this is a major hurdle in the project.
Thank you,
Ryan
Message Edited by RVallieu on 09-30-2005 10:33 AM
09-30-2005 10:52 AM
09-30-2005 11:10 AM
09-30-2005 12:45 PM
Well, the Marker signal coming from the PCI-5412 is a pulse, so routing that out will create a "clock" with an unknown duty cycle. The marker might not be wide enough to properly clock the PCI-6143, which would explain why it appears to be missing samples here and there.
Instead of trying to create a clock with a marker, you could try exporting the PCI-5412's divided down Sample Clock. This means that if the PCI-5412 is programmed with a sample rate of 1MS/s, you can divide it by an integer number like 10 (giving you a 100kHz clock) and export that clock to one of the RTSI lines, where you can use it to clock the PCI-6143. If you have NI-FGEN 2.3, there is an example called niFgen_DAQmx_Synchronization_Example.vi that explains how to do this. (You can download NI-FGEN 2.3 from ni.com).
09-30-2005 01:00 PM
09-30-2005 01:58 PM
I do not know the duty cycle requirements for external sample clocks for the PCI-6143. Maybe it is listed somewhere in the documentation that came with the device?
You can divide up the signal such that the rising edge of the PCI-5412's divided-down exported sample clock occurs on the sample you want to acquire. For example, when creating your sequence, make the first segment 24 samples high and 76 low, and make the second segment 24 samples low and 76 high. Then the rising edge of the exported sample clock would occur on the 76th high/low sample in the square wave.
You could also try setting up a single-point acquisition and trigger the PCI-6143 off of the marker signal from the PCI-5412 to acquire one sample at a time. I don't know if this will be fast or accurate enough though.
09-30-2005 03:10 PM