Jump to content

C. Drutman

Members
  • Posts

    5
  • Joined

  • Last visited

C. Drutman's Achievements

Newbie

Newbie (1/4)

0

Reputation

  1. Not sure what changed, but this morning everything is working as advertised. Thanks everyone for all your inputs.
  2. I am using the USB-2627 with the ULDAQ-1.2.1 API. The TMR0 and AGND are attached via alligator clips to a BNC which connects to my scope. Someone suggested that I need to set the sampling rate of the board, but I did not see a call like that in the API or any of the examples.
  3. I am trying to run the TimerPulseOut.c program, and no matter what I enter for the frequency, I measure ~114 Hz on my scope. The default value for the frequency is 1,000, and building and running the program gives ~14 Hz. If I change the frequency to 10 and rebuild and run, I still get ~14 Hz. Any suggestions? Thanks.
  4. Not quite what I am looking for. I am receiving data from a device, and based on that data I need to generate an analog output. The input data is updating every 10 us, and I need to generate an analog output at the same rate, with a slight lag for computing the analog output from the input signal. Filling a buffer, as in AScanOut.c, is not an option as a I only have a single input at a time. Based on the test I did, I cannot send single analog outputs quick enough.
  5. 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.
×
×
  • Create New...