Create a waveform using PCI-6723 AO with various time intervals on the trailing edge of the sample of 200 Hz clock and 0.1% duty cycle

I use the PCI-6723 card and I am trying to produce a model of waveform using the analog output channel. The wave consists of 5 different voltage levels. The main problem is that the first 4 voltage levels are supposed to have 926 microseconds time intervals and the time interval the last voltage level is supposed to be 1,296 milliseconds. In addition, the waveform must be triggered on the trailing edge of a sample clock of 200 Hz with a 0.1% Duty Cycle. Is it still possible? If so, any help would be greatly appreciated. Thanks in advance!

Here is what I currently have, but it does not fulfill my purpose.

 int32   written;
    float64 data[5] = {-0.23, 0.38, 1.12, 1.78, 0.10};  //volts
    //long  time[5] = {  926,  926,  926,  926, 1296};  //microseconds

    // DAQmx Configure Clock
    DAQmxErrChk (DAQmxCreateTask("",&taskHandleFRQ));
    DAQmxErrChk (DAQmxCreateCOPulseChanFreq(taskHandleFRQ,"Dev3/ctr0","",DAQmx_Val_Hz,DAQmx_Val_Low,0,200,0.001));
    DAQmxErrChk (DAQmxCfgImplicitTiming(taskHandleFRQ,DAQmx_Val_ContSamps,1));

    // DAQmx Start Code
    DAQmxErrChk (DAQmxStartTask(taskHandleFRQ));

    // DAQmx Configure Code
    DAQmxErrChk (DAQmxCreateTask("",&taskHandle));
    DAQmxErrChk (DAQmxCreateAOVoltageChan(taskHandle,"Dev3/ao0","",-10.0,10.0,DAQmx_Val_Volts,NULL));
    DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandle,"/Dev3/Ctr0Out",1000.0,DAQmx_Val_Falling,DAQmx_Val_ContSamps,5));

    // DAQmx Write Code
    DAQmxErrChk (DAQmxWriteAnalogF64(taskHandle,5,0,10.0,DAQmx_Val_GroupByChannel,data,&written,NULL));

    // DAQmx Start Code
    DAQmxErrChk (DAQmxStartTask(taskHandle));

Bingo. This code seems to work much better. Looks like I had to reduce my number of samples per 1 to fit the waveform desired in 5 milliseconds of the sample clock delay.

However, if someone knows a better way to achieve these results, I am open to all ideas.

void CDevDlg::OnRdr1e1()
{
    float64     data[4000];
    float64     volt[5] = {-0.23, 0.38, 1.12, 1.78, 0.10};  //volts
    int x=0,d;

    for(int v=0; v<4; v++)
    {
        for(d=0; d<741; d++)
        {
            data[x++] = volt[v];
        }
    }
    for(d=0; d<1036; d++)
    {
        data[x++] = volt[4];
    }

    // DAQmx Configure Clock
    DAQmxErrChk (DAQmxCreateTask("",&taskHandleFRQ));
    DAQmxErrChk (DAQmxCreateCOPulseChanFreq(taskHandleFRQ,"Dev3/ctr0","",DAQmx_Val_Hz,DAQmx_Val_Low,0,200,0.001));
    DAQmxErrChk (DAQmxCfgImplicitTiming(taskHandleFRQ,DAQmx_Val_ContSamps,800000));

    // DAQmx Start Code
    DAQmxErrChk (DAQmxStartTask(taskHandleFRQ));

    // DAQmx Configure Code
    DAQmxErrChk (DAQmxCreateTask("",&taskHandle));
    DAQmxErrChk (DAQmxCreateAOVoltageChan(taskHandle,"Dev3/ao0","",-0.5,2.0,DAQmx_Val_Volts,NULL));
    DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandle,"",800000,DAQmx_Val_Rising,DAQmx_Val_ContSamps,4000));
    DAQmxErrChk (DAQmxCfgDigEdgeStartTrig(taskHandle,"/Dev3/Ctr0Out",DAQmx_Val_Falling));

    // DAQmx Write Code
    DAQmxErrChk (DAQmxWriteAnalogF64(taskHandle,4000,1,10.0,DAQmx_Val_GroupByChannel,data,NULL,NULL));
}

Tags: NI Software

Similar Questions

  • I have an adobe Lightroom instaled on my computer... I bought a CD.  What I have to buy Lightroom for my iphone or does it with her. I have the Lr app on my phone and it works but when I want to sync my photos, it says trial has expired...

    I have an adobe Lightroom instaled on my computer... I bought a CD.  What I have to buy Lightroom for my iphone or does it with her. I have the Lr app on my phone and it works but when I want to sync my photos, it says trial has expired...

    LR mobile only works and comes with the basic version of subscription of LR for computers. Of course, you can download LR mobile on your iPhone and use for a 30 day trial, but once the 30 days it will stop working.

    Right the trial period is 30 days unless you subscribe to the package of photographer.

  • 672PCI 6723 error when you try to generate a signal with the sample of 20 kHz clock

    I have a piece of code that worked successfully on the PCI-6224 map, but when I tried to implement the same code on the card PCI-6723 I ran into problems.

    Here is the code I use:

    ManchConversion6723();//produces SendIt array of series of 1s/0s
    
    // DAQmx Configure Clock
    DAQmxErrChk (DAQmxCreateTask("",&taskHandleFRQ));
    DAQmxErrChk (DAQmxCreateCOPulseChanFreq(taskHandleFRQ,"Dev3/ctr0","",DAQmx_Val_Hz,DAQmx_Val_Low,0,20000,0.5));
    DAQmxErrChk (DAQmxCfgImplicitTiming(taskHandleFRQ,DAQmx_Val_ContSamps,72));
    
    // DAQmx Configure Digital Output
    DAQmxErrChk (DAQmxCreateTask("",&taskHandle));MessageBox("D");//vj
    DAQmxErrChk (DAQmxCreateDOChan(taskHandle,"Dev3/port0/line0","",DAQmx_Val_ChanPerLine));MessageBox("E");//vj
    DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandle,"/Dev3/Ctr0InternalOutput",20000,DAQmx_Val_Rising,DAQmx_Val_ContSamps,72));
    
    // DAQmx Write Code
    DAQmxErrChk (DAQmxWriteDigitalLines(taskHandle,72,0,10.0,DAQmx_Val_GroupByChannel,SendIt6723,NULL,NULL));
    
    // DAQmx Start Code
    DAQmxErrChk (DAQmxStartTask(taskHandleFRQ));
    DAQmxErrChk (DAQmxStartTask(taskHandle));
    

    When I get on the DAQmxCfgSampClkTiming line, I get an error stating:

    DAQmx error: measurements: request the value is not supported for this property value.

    PropertyAQmx_SampTimingType

    You asked: DAQmx_Val_SampClk

    You can select: DAQmx_Val_OnDemand

    Task name: _unnamedTask<0>

    State code:-200077

    I think that the problem comes from the variable of the source of the function. I'm just tring to send the data to the frequency of 20 kHz.

    Any help would be greatly appreciated. Thanks in advance!

    Too bad. The impression that the PCI-6723 does not contain correlated DIO channels. In other words, examples of clock cannot be linked to the DIO channels allowing the generation of digital waveforms. According to the AO Series user manual, this applies to the NI 6731/6733 only. The mistake was trying to tell me that only a single issue or receive channel has been authorized.

    For this reason, I'll stick right with my card PCI-6224.

    Sorry for the confusion.

  • create a spectrum of the order from scratch (i.e. get a fft-based on the position of the same time deductions in the sample data)

    Hello people,

    THAT THE QUESTION PERTAINS TO:

    I play on 2 parameters of a system based on the sampling time: Rotary position and vibration (accelerometer g increments).  I want to take a fft based on the post to create a spectrum of the amplitude-phase speed order in / s.  To do this, perform the following:

    1 integrate (and scale) g vibration signal in the / s (SVT Integration.vi)

    2 signal sampled vibration resample the same time at an angle similarly charged signal (ma-resample unevenly sampled input (linear interpolation) .vi)

    THE QUESTION:

    Order in which operations should be carried out, integrate then resample or vice versa?  I didn't order would be important, but using the same set of data, the results are radically different.

    OR ORDER ANALYSIS 2.0 TOOLSET:

    I have the NO order Analysis Toolset 2.0, but I could not find a way to get the speed profile generation live to work with signals of position encoder DAQmx (via pxi-6602) quadrature.  In addition, it seems that I have to specify all the commands I'm interested to watch, which I don't really know at this point (I want to see all available commands) so I decided to do my own fft based on the post to get a spectrum of the order.

    Any help is greatly appreciated.

    Chris

    The order is to integrate the time domain of first - creating a speed channel.  You now have a new channel of data.  In general I would put this in the same table of waveform with waves of acceleration time.

    Then re - sample your acceleration and/or your speed signals, and then you can calculate the spectrum of the order.

  • Saving data with automatic time intervals

    Hello world

    I am a new user with LabVIEW (I just started using it 3 weeks ago) and I'm having a problem with the registration data and recording.

    Basically, we want to do is monitor data for four different variables countinuosly but to record in intervals of time specified and automatic. Specifically, we would like to save countinuosly of data only for five minutes every hour. After 5 minutes, only the backup function must be stopped for 1 hour, then return to save 5 minutes without closing the major loop. In addition, we would like to collect all the data in this way in one exel file per day for three weeks or more, so rather than create a data file for each record, we stand at their gathering in one file per day.

    Finally, if possible, we would like to extract the average data for a day in a single file.  We are not interested in changing the rate of data acquisition, we only focus on the savings rate. We tried several timed function (as the elapsed time, delay time, wait) and loops timed, but it was impossible to synchronize different loops or implement synchronization for the issuance of savings without blocking the work of the main loop.

    The data are collected via the function "write to file action.

    any kind of help will be really appreciated!

    Here, we submit our front panel block diagram of our VI.

    Best regards

    Use a shift register to keep track of your departure time.  If the difference between the start time and the current time less than 5 minutes, save the data.  If the time difference is one hour, save the new time as the start time.

  • Open with: 'Application name' - 'Name of the Virtual Machine' (2.0.4) AND (2.0.5)

    Hello

    Looking for help here...

    I notice that if I try to open a file on my Mac with an application of my virtual machine (Win XP Professional) I get 2 options for each windows application:

    1. Windows Media Player - Windows XP Professional (2.0.4)

    2. Windows Media Player - Windows XP Professional (2.0.5)

    The 2.0.4 option never works but the 2.0.5 option. I know this has something to do with the upgrade to the latest 2.0.5 version, but how do you / is it possible to remove the non-fonctionnel 2.0.4 options?

    Help, please! It's pretty boring.

    I have only haveone of virtual machine set up.

    Rich

    Make sure that the virtual machine is turned off and not suspended.  First locate the virtual machine in the finder.  You can do it by Ctrlclicking on it from the library of the virtual machine and choose Show in Finder.  In Finder Ctrlthe .vmwarevm of the virtual machine and choose "show package content".  If some shows as a folder go there.  Of in the virtual machine folder, you will see a folder named Applications.  Applications are the links to the Applications that you open in the virtual machine.  Remove vouchers there should do.  You may be able to determine the good by the update and the last number should be also the most recent.  These changes to take effect, you will need to reboot or restart the finder.  To restart the finder press and hold Esc, command,Option, and choose finder in there and restart.

    You can also just delete the Applications folder and then start the virtual machine.  Once that the virtual machine is started just enter the unit.  Entering the unit will recreate this Applications folder with the correct files in there.  You should always restart or restart the finder once this is done before it takes effect in the mac operating system.

  • I have 2 Gmail accounts that I use Thunderbird to work with. Suddenly, one of the accounts has stopped working (password requests).

    For a year I used without problem Thunderbird to work with two of my Gmail accounts without problems.
    I had been on a long trip for the last 2 weeks had not begun to Thunderbird. When I did it for the first time this morning, I couldn't work or another account with it.

    Reset, return all settings solved the problem for ONE of my accounts (the main!), but the other continues to refuse to work.
    Yes, I have IMAP and less secure device permissions enabled in the Gmail settings. I changed my passwords and their update on all ends and again, my main account works, but the other refuses to accept passwords, even though I know they are correct.

    I still get the "cannot connect to server imap.gmail.com ." Message and I am prompted for my password.

    No luck.

    Could someone help me novel?

    Thank you very much,

    Zea

    After digging around a few others, I finally managed to find the google site:

    https://support.Google.com/accounts/answer/6009563

    There is a link on the bottom, saying: "allow access". Click on this one, 'continue' and directly there after prompt to synchronize Thunderbird. That solved the problem.

    Synchronize Thunderbird now until my two accounts again.

    Thanks for all the help and all the world looking in there, I hope this helps the other 3 who clicked on they have the same problem.

    PS: In your web browser, you must be connected to the Google account with disorders!

  • How to create an application to display the 3 windows of each with different time zones as the window?

    Hi, I need to create a windows application using c# that will create three windows that display areas and the current time, the title of the window?

    PS: I use an event handler to update the current time.

    Hello

    To improve assistance to this subject, you can ask your question in the MSDN Forums.

    http://social.msdn.Microsoft.com/forums/en/category/visualcsharp

  • What are the requirements for the use of Sql Developer with MS SQL Server via the JDBC MS driver?

    I tried to add

    sqljdbc_4.0\enu\sqljdbc4.jar

    or

    sqljdbc_4.0\enu\sqljdbc.jar

    or both

    in part 3d driver JDBC list in properties, but there is no tab in the connection dialog box create.

    Just for a test, I added IBM's JTOpen driver and a new tab of the DB2 appeared immediately.

    What should I do to be able to create connections to MS SQL?

    Use the correct driver, jTDS 1.3

    http://www.Oracle.com/technetwork/database/migration/JDBC-migration-1923524.html

  • Since the migration of Hotmail to Outlook, I can't access my list of contacts using Firefox, but can with Internet Explorer - what's the problem?

    Since the migration of Hotmail in Outlook, I can access is no longer in my Contacts (now people) using Firefox. There is no problem if you are using Internet Explorer.

    I v21.0 Firefox and have cleared the cache and cookies.

    What can I do then (Besides not using Firefox)?

    Hello madscanner, you can try to reset firefox and see if that will solve the problem...

  • Using the trial version of creative cloud. You try to start with Lightroom. I imported the photos that come in Lightroom and are visible for a second and then go black and I am unable to do something more. Is this due to the mode of assessment? Not much o

    It seems that even this part has poor instruction for beginners. I imported the images that are visible for a moment and then go black.

    Hi Tim,

    This problem occurs when the auto tone has been applied to your images.

    For existing photos, select all your images in the grid view, and then click the Reset All button in the quick develop Panel. Then, click the auto tone button to correctly apply this feature.

    To avoid this problem in the future, choose Lightroom > preferences > Presets (Mac OS) or edit > Preferences > Presets (Windows). Select again to apply auto tone adjustments.

    Related link: the pictures are black in Lightroom CC 2015.2/6.2

    Let us know if that helps.

    Kind regards

    ~ Mohit

  • Two different running loops one after another with different time intervals

    Hello

    I am currently using LabVIEW 2013. I'm new to LabVIEW.

    I take 10 values to data acquisition during the 9-10 sec time interval within a period of 10 seconds.

    I thought runs two loops. 1st loop will run for 9seconds out giving zero and the second loop will launch with 1 second left taking all the required 10 values. can someone help me in this way to do it. If you can suggest me any other idea.

    Thank you.

    Your task of data acquisition is to take 10 samples in 1 second (I assume that you also spaced).  10 samples/s = sampling frequency of 10 Hz (Hz = events/second).  To configure DAQmx tasks, MAX is your friend.  Open MAX, find your device (plugged in), open a panel of Test and find a way to let him taste at 10 Hz and collect 10 samples.  Test to see if it works.  Get it now to save as task.

    Now, when you configure your block diagram, drop a DAQmx Start Task (or even read DAQ) and wire an empty constant to the task in.  See the little arrow for menu drop-down?  If you click on it, one of the choices should be the task DAQ, you just saved.  Select that and it will work.

    Now, all you have to do is wait 9 seconds before acquiriing your 10 points.  There are functions of synchronization that can allow you to do this.

    Bob Schor

  • I use Firefox on a Mac 4.01, I entered the username when registering in Yahoo and sometimes, because the networks are slow, I put the password too - how can I get rid of usernames offered at the stage of connection?

    When I go to connect to Yahoo, now it offers me a list of possible connection IDS. Because of mistakes by typing some of them too have passwords on them. How can I remove this list?

    Click on the user name field to display a list of suggestions. Then select the suggestion you want to delete (use the arrow keys, not the mouse), and then press SHIFT + DELETE.

  • I am currently using Internet Explorer 8. I can't open the hyperlinks in my Outlook emails and receive the following error message: "this operation has been cancelled due to restrictions on this computer. Please contact your system administrator. » ____

    I use Vista and Internet Explorer 8.  My Outlook emails not let me open the hyperlinks.  I get the same error message other inquisitive got solutions for IE6 and IE7: "operation has been cancelled due to restrictions on this computer.  Please contact your system administrator. »

    The solutions proposed in this forum for the error message are excellent and detailed.  However, they apply to IE6 and IE7, so I'm not able to follow the action steps.

    Can someone tell me how to solve this problem, because I use Internet Explorer 8?

    Thank you.

    Steve

    It is generally a problem of default browser:

    "This operation has been cancelled due to restrictions in effect on this computer."
    You receive an error message when you click a hyperlink in Outlook
    Operation cancelled error when opening a link
    Outlook tips: Tip 540: operation cancelled due to Restrictions

    HAL
    --
    HAL Hostetler, TCE
    Engineer senior/UPDATED--MS MVP-Print/Imaging - WA7BGX
    www.kvoa.com - KVOA television, Tucson, AZ.
    Live Hot Licks - www.badnewsbluesband.com

  • import of MP3s with 32 000 rate of the samples?

    I am trying to import my mp3 convert files in Flash Pro CC and get the message that it cannot be done. The files have a rate of 32 samples, 000 kHz. 32 Kbps (mono) 64 Kbit/s, stereo. The voice if she ' doesn't only not to be of this quality.

    If the settings are wrong, I would like to know how to convert all my files without loss of quality and without becoming larger. Any know?

    The file size depends on the data rate, no sampling frequency. If you have the original high quality sounds, you must code them to 44.1 kHz, 16 bit, mono 64 Kbps. If you have not, then convert your current files in this format. The size of the file remains the same.

    I use a Converter audio simple app to make lots of sounds, but you can also use Adobe Media Encoder.

Maybe you are looking for