Jump to content

C. Drutman

Members
  • Posts

    5
  • Joined

  • Last visited

Posts posted by C. Drutman

  1. 18 hours ago, JRys said:

    I clipped my scope probe onto pin 33 on the J4 header connector and the TmrPulseOut.c example worked as expected, I got an 8000 Hz square wave. 

    double check your connection and maybe try the other timer on pin 32.

    And, there is no need to set a sampling rate.

    Not sure what changed, but this morning everything is working as advertised. Thanks everyone for all your inputs.

  2. On 12/30/2022 at 2:24 PM, Fausto said:

    Hello @C. Drutman.

    I tested a USB-1608GX-2AO module with MCC's UL for Linux and the 'TmrPulseOut.c' example worked as expected.  The TMR and GND terminals were connected to an oscilloscope and displayed a 1 kHz pulse output.

    Which OS and Universal Library API version are you using?

    Regards,

    Fausto

    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. On 12/8/2022 at 11:51 AM, JRys said:

    A 500k Hz sine wave is not doable. This is because the analog outputs on your board have a maximum update rate of 1M S/s and a decent sine wave should have at least 100 updates per cycle. If you use this rule of thumb, the maximum sine wave possible is 1 M S/s divided by 100 or 10k Hz. If you are still interested in generating a waveform, please review the AOutScan.c example. 

    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...