How can i deliver a single pulse of varying amplitude using Analog output and USB-6251?

I am trying to generate an analog output for the following waveform:
Pulse width: 300 usec, Frequency 40 Hz, Amplitude is following a sine wave with a 2 second period.
My approach is: Use an async timer with 1/[40 Hz] sec  interval. I set the DAQ output rate at 1 MHz and the approach has been to generate and write 300 samples of the amplitude I need to send out, then wait for the next async interval callback , update amplitude etc etc.  The assumption is that once the 300 samples are written and the task started , a 300 usec pulse would be sent out , task then stopped and then the analog output would be set to 0 waiting for he next pulse.  The reality is that I get a stream of pulses of 300 usec which last the whole timer interval. 
So , trying to establish whether what I am trying to do is feasible without actually sending a large array to the USB-6251 which would write zeros for the period after 300 usec.
Here is my timercallback code for review:
    switch (event)
        case EVENT_TIMER_TICK:
            DAQmxErrChk(DAQmxStopTask(TaskAnalog));
Determine Voltage value algorithm here
            //Generate Waveform and start Task
            //Prepare AO arr
            for (k=0;k<300;k++)
                AOArr[k] = 0;
                if (k<G_PulseWidth)
                AOArr[k] =  VOLTAGE_OUTPUT;
            if (AOArr!=NULL)
                DAQmxErrChk(DAQmxWriteAnalogF64 (TaskAnalog, (int32) 300 , 0, DAQmx_Val_WaitInfinitely, DAQmx_Val_GroupByChannel , AOArr, &sampsPerChanWritten, NULL));
            DAQmxErrChk(DAQmxStartTask(TaskAnalog));
            break;
Thanks

I did resovle the issue I encountered. It was due to bad configuration of the Task.
My initial configuration was:
DAQmxErrChk(DAQmxCfgSampClkTiming(TaskAnalog, "",1.0E+06, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps , 300 * 1.0E+06));
which should be:
DAQmxErrChk(DAQmxCfgSampClkTiming(TaskAnalog, "",1.0E+06, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps , 300));      
THis did it. works very well.
THanks

Similar Messages

  • How can I import a non-BC site into BC, using Dreamweaver CC, and then use it as one of my free sites?

    I am trying to import one of my non-BC sites into BC, using Dreamweaver CC, and then use it as one of my free WebBasics sites.
    When I try to create a new BC site in Dreamweaver CC, it creates a BC template site, and I have unsuccessfully tried to update the files on BC - it won't let me connect.
    If I import the site from my portal, I don't get the option of a free site - when I try to upgrade, I get the credit card form asking for payment.
    I feel like I'm running around in circles with one foot nailed to the floor.
    Any tips?

    Thank you for your quick reply and for clearing up my confusion.  I'm exporting the first section now.  I choose the smallest size, 3x4 but I'd prefer to go higher as this DVD was originally a VHS home movie.  I'm wondering if after three conversions (VHS,->DVD->MPEG) the resolution will be so poor as to not support a larger size frame?  If it can, what size should I select when I export? 

  • How can I install applications on my palm treo 600 using memory card and a reader???

    I tried so many times installing applications such as games and other software on my treo 600, but nothing shows in the launcher. I don't have a hotsynch tahts why this is my only option. I can see theapplications I download from my laptop to my treo 600.
    When I download using a pc, it is in zip file, then I extract it. Latly, copy paste to my memory card. Is there something wrong about it? Please help... I don't have any application on my treo 600. Its been a week exploring, but still don't get the answer.
    HELP!!!
    Thank You So Much
    -Rose
    Post relates to: Treo 600 (GSM)

    -vic0021- wrote:
    Thank you for the info...
    If I install the "myinstall", will it show automatically on the launcher??? If I buy a hotsynch in ebay, would that be better or mmc and a reader is fine? Will I als need the Cd? 
    Thanks again!!!
    Post relates to: Treo 600 (GSM)
    HotSync is a program, not something to be purchased on eBay!
    It is part of a free program from Palm called "Palm Desktop".  Go to the pages Hook directed you to, download and install the program.
    You can then install programs to your Palm correctly!  You will not need the CD.
    You will need a program called Documents To Go to easily use Microsoft Word and Excel files.  This will have to be purchased from Dataviz.com.  Be sure to look for a version that is compatible with your device.
    WyreNut
    Post relates to: Centro (AT&T)
    I am a Volunteer here, not employed by HP.
    You too can become an HP Expert! Details HERE!
    If my post has helped you, click the Kudos Thumbs up!
    If it solved your issue, Click the "Accept as Solution" button so others can benefit from the question you asked!

  • TS4001 How can I share Safari bookmarks between two iCloud accounts using IOS 7 and Mavericks?

    Before iOS 7 and Mavericks, we were able to share Safari bookmarks between all of our devices.  My wife had the primary iCloud account which was setup to share bookmarks, contacts, calendars and reminders.  A secondary iCloud account was setup on my phone for only my email.  Each phone had our private email accounts segregated and we shared all the bookmarks, contacts, calendars and reminders.  When I saved a bookmark on my phone, I could see it later on our iMac or iPad.  Now only my wife can sync bookmarks between her phone and the iMac or iPad.  This *****!!  This worked beautifully before we upgraded to the latest versions of OS & iOS.  Is there a work around or a new way to set things up?  I don't want to be stuck reading Safari on my phone when I have a 24" iMac sitting in the living room.  I don't want to see all of my wife's email on my phone either.  Do we need three iCloud accounts now?  One main for sharing and two separate accounts for only email?  Need help!  Any suggestions would be appreciated, thanks.

    David,
    Thanks for the reply.  That's how I set it up originally.  Although the new iOS 7 update lost some functionality.  I found the following on the TUAW website.  The Safari Bookmarks and Find My Phone options have been removed from the secondary iCloud accounts options.  This is the problem.  Everything worked great before we updated.  I guess "new way" consolidates the iCloud accounts better with Maverick?  Now I will have extra documents on my phone that I don't need.  We will both have to share the same iCloud storage and backup space too.  Have to try it out and see how it works. Thanks.
    http://www.tuaw.com/2013/09/19/how-to-use-multiple-apple-ids-in-ios-7/

  • How can i interact with the ALV if i am using the lvc_ and call method?

    i want to hide the last entry of a line when i click on the checbox of my ALV

    u want to hide or delete?
    instead of using check box, u can use a button to display there.
    it can be achived like below.
    data: ls_lvclayout type lvc_s_layo.
    LS_LVCLAYOUT-SEL_MODE = 'D'.
    now in set_table for_first_diaplay
    CALL METHOD GO_GRID->SET_TABLE_FOR_FIRST_DISPLAY
          EXPORTING
          <b>  IS_LAYOUT            = LS_LVCLAYOUT</b>
    do like above.
    then u click on the row, and the row will be selected.
    now using the method GET_SELECTED_ROWS, u can get the data of the selected row and u can now manipulate what ever u needed.
    data:
    SEL_ROW TYPE LVC_S_ROID,
    SEL_T_ROW TYPE LVC_T_ROID.
    CALL METHOD GO_GRID->GET_SELECTED_ROWS
        IMPORTING
          ET_ROW_NO = SEL_T_ROW.
    LOOP AT SEL_T_ROW INTO SEL_ROW.
              read table <itab> index SEL_ROW-ROW_ID.
              check sy-subrc = 0.
    < now write the logic  like making the field blank and modify the itab>.       
            ENDLOOP.

  • How can I restore events/tasks from a system backup using prefs.fs and local.sqlite?

    I accidentally deleted a calendar holding all my thunderbird tasks. I was now able to restore the calendar from my backup. I restored the following files:
    * profile-folder/calendar-data/local.sqlite
    * profile-folder/prefs.js (here: I did a diff and added only the section of the deleted calendar)
    Still no events and tasks are available from the deleted calendar.
    The calendar is now available in the Calendar tab.

    To view TM backups from a different Mac, see item #17 of the of the Frequently Asked Questions *User Tip* at the top of the +Time Machine+ forum.
    To restore files from there to your current Mac, see item #16 of that same Tip.

  • How can I view as "single page continuous" in full screen mode?

    how can I view as "single page continuous" in full screen mode?
    preferences->page display:
    preference->accessbility:

    Not possible.

  • How can I restore a single image from an aperture time machine backup, do I have to restore the entire library? that does not make sense

    I hope there has been found a more efficiant solution for this,  how can I restore a single image from an aperture time machine backup, I really hope I don't have to restore the entire library? that does not make sense
    any suggestions?

    Did you try browsing your backups in the Finder ?  That is, do not go and "Enter Time Machine".  Instead, navigate to your Time Machine backup via Finder and then manually go to the time period (by folder name) you are looking for ... when you find your Aperture library you can then "Show Package Contents" and find the Master you are looking for.

  • How can I delete a single song from my iPad?

    How can I delete a single song from my iPad?

    Hi lizdance40,
    The first part of your answer worked great, thanks for that!  However, since doing that, there are still songs on the iPad that I want to delete. I place my finger on the song, swipe to the left....and nothing. No red "delete" appears at the right. That used to work on my full size iPad, but not on this mini. I just purchased it last Friday...maybe it's defective?
    Thanks again,
    Sirsheila

  • How can I create a single order from multiple quotations?

    How can I create a single order from multiple quotations that I have created by the transaction VA21 ?
    Thanks in advance for the answers.

    hi
    Go to transaction: /nva01
    Enter order type : ZOR
    Sale org :xxxx
    Dist.channel:xx
    Division :xx
    Press enter
    Click on “Sale document” and select Create with reference
    Then enter 1st quotation number & click on “COPY” or “Selection list”. Then click on “Copy “.Then all line items which belong to quoation1 copy to order.
    Then,
    Click on “Sale document” and select Create with reference
    Then enter 2nd quotation number & click on “COPY” or “Selection list”. Then click on “Copy “.Then all line items which belong to quoation2 copy to order.
    Then,
    Click on “Sale document” and select Create with reference
    Then enter 3rd quotation number & click on “COPY” or “Selection list”. Then click on “Copy “.Then all line items which belong to quoation3 copy to order.
    Now save the sale document.
    Kindly give reward points
    Edited by: WISH on Mar 19, 2008 2:25 PM

  • How can I get a single jar file with NetBeans?

    How can I get a single jar file with NetBeans?
    When I create the project I get these files:
    dist/lib/libreria1.jar
    dist/lib/libreria2.jar
    dist/software.jar
    The libraries that have been imported to create the project are in separate folders:
    libreria1/libreria1.jar
    libreria2/libreria2.jar
    libreria1, libreria2, dist folders are all located inside the project folder.
    I added the following code to the build.xml:
    <target name="-post-jar">
    <jar jarfile="dist/software.jar">
    <zipfileset src="${dist.jar}" excludes="META-INF/*" />
    <zipfileset src="dist/lib/libreria1.jar" excludes="META-INF/*" />
    <zipfileset src="dist/lib/libreria2.jar" excludes="META-INF/*" />
    <manifest>
    <attribute name="Main-Class" value="pacco.classeprincipale"/>
    </manifest>
    </jar>
    </target>
    Of course there is also the project folder:
    src/pacco/classeprincipale.form
    src/pacco/classeprincipale.java
    Can you tell me what is wrong? The error message I get is as follows:
    C:...\build.xml:75: Problem creating jar: archive is not a ZIP archive BUILD FAILED (total time: 2 seconds)

    This is not a NetBeans forum, it is a JDeveloper forum. You might want to try http://forums.netbeans.org/. I also saw your other question - try looking in the New to Java forum: New To Java

  • How can i declare a single radio button field in selection-screen ?

    How can i declare a single radio button field in selection-screen ?

    >
    Rob Burbank wrote:
    > And how will you turn it off once it is turned on??
    >
    > Rob
    Thats correct ;)...See ravi if users will ask so many things its our Job to convay the correct solution ....
    Just post your org requirement..SOo some body guide you better//
    Sas

  • How can I delete a single password stored in Sync?

    I entered a password that i don't want to be stored online. How can one remove that single password? thx for replying...

    My page was blank.  I took your suggestion and added some text.  When I deleted all of the text the page deleted too.  Thanks!!!!
    Spencer

  • How can I put a single song in ipod without having to reset it ?

    How can I put a single song in ipod without having to reset it ?

    Managing content manually on iPod
    http://docs.info.apple.com/article.html?artnum=61148
    Patrick

  • How can I deauthorize a single computer?  Says 5 are authorized. If I reauthorize all, how can I reauthorize the ones I want?

    How can I deauthorize a single computer?  Says 5 are authorized. If I reauthorize all, how can I reauthorize the ones I want?

    http://support.apple.com/kb/ht1420

Maybe you are looking for