Hi
I am trying to generate a square waveform from one of the anolog output channels of PXI 6713.
I am developing my application in VC++
My requirement is a continous 100 KHz square waveform with 90% duty cycle and 1.5 V amplitude.
The following is the code i have used (i have removed error handling code):
***** code *******
i16 deviceNumber = 6; // PXI 6713 Device Id as per NI-MAX
i16 deviceNumberCode; // to be returned by Init_DA_Brds function
i16 chan = 2; // DAC channel 2
i16 numChans = 1; // only one channel is used for
i16 chanVect[1] = {2}; // DAC Channel 2
f64 gain = 1.0;
i16 binArray[10] = {0};
i16 group = 1; // default for most of the devices
u32 count = 10; // 10 data points
// 9 data points ON and 1 data point OFF constituting 90% duty cycle
f64 voltArray[10] = {1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,0};
u32 iterations = 0; // Repeat waveform indefinitely
i16 mode = 0; // Disable FIFO mode / delay mode
f64 rate = 100000; // 100,000 points / sec
i16 units = 0; // points / sec
i16 timebase;
u32 updateInterval;
i16 whichclock = 0; // update clock
i16 operation = 1; // Start waveform initiation
Init_DA_Brds (deviceNumber, &deviceNumberCode);
WFM_Scale (deviceNumber, chan, count, gain, voltArray, binArray);
WFM_Group_Setup (deviceNumber, numChans, chanVect, group);
WFM_Load (deviceNumber, numChans, chanVect, binArray, count, iterations, mode);
WFM_Rate (rate, units, &timebase, &updateInterval);
WFM_ClockRate (deviceNumber, group, whichclock, timebase, updateInterval, mode);
WFM_Group_Control (deviceNumber, group, operation);
**************
If I try to generate 10 KHz waveform with the same 90% duty cycle and 1.5 V amplitude, the waveform gets generated continously....
But for 100 KHz, itz generating continously....but only few waveforms....
Is there any hardware limitations ? I've tried changing the value of the timebase ( points / sec) and update interval etc...
plz help me
thanx in advance
sriram.