I am just starting with the MCC Library with a USB-2627, and my goal is to generate a 500 kHz sin wave as a simple sanity test. My first step was to verify I could output a signal with AOut, and that worked as advertised. I then changed the signal-generating part of the code to:
double f=.5E6 ;
double w=6.283*f ;
double dt=1.E-6 ;
double t=0 ;
double data=0 ;
while (err == ERR_NO_ERROR) {
data=sin(w*t) ;
err=ulAOut(hdnl, channel, range, flags, data) ;
t += dt ;
}
When I looked at the signal on a scope, I got a ~10 Hz sin wave, so clearly I am missing something. Looking at the documentation for the USB-2627, there is a reference to setting the sampling rate; is that what I am missing? If so, what is the MCC Library call to set this?
FYI, I am using GCC on Linux.
Many thanks.