The data read into the buffer HAVE lack samples at the beginning

I use a box USB-6251. The program implements two channels of AI (read I and Q) on a single task and one channel on another task. The channel uses the ai\SampleClock as its clock, so that both are synchronized. C creates a digital pulse periodic rising edge (a clock basically) which is used as a trigger on an external function generator. The signal from the unit after going through some material, external signal processing is ultimately what is read by the channel of GOT it.

We know from the relevant signals, they seem to be correctly synchronized scope. IE, the analog signal to read arrived on the channel of the AI of the acquisition of data more or less instananeously when the trigger is activated. If there is a delay, it is of the order of microseconds.

However, when I read in the buffer of HAVE (repeated FiniteSamples), waveform, I always come back has a section of samples at the beginning that seem to be returned of the first actually read data-point (see attached image). This delay is of the order of milliseconds (it varies with each series).

I want to totally eliminate this delay. The signal should be a sinusoid which begins to sample 0 and is continuous through until the last sample read.

I put the code below.

Installation program:

Create analog read the task
analogReadTask = new Task ("analogReadTask");

Create the virtual channel for the component I
analogReadTask.AIChannels.CreateVoltageChannel (initParams.AddrI.ChannelAddress, 'I', AITerminalConfiguration.Differential,-4, 4, AIVoltageUnits.Volts);

Create the virtual channel for the Q component
analogReadTask.AIChannels.CreateVoltageChannel (initParams.AddrQ.ChannelAddress, 'Q', AITerminalConfiguration.Differential,-4, 4, AIVoltageUnits.Volts);

To set the clock for the analog readings
analogReadTask.Timing.ConfigureSampleClock (string. Empty, initParams.SamplingRateHz, SampleClockActiveEdge.Rising, SampleQuantityMode.FiniteSamples, Totalechantillons);

Create the mult-channel drive
analogReader = new AnalogMultiChannelReader (analogReadTask.Stream);
analogReader.SynchronizeCallbacks = false;

pulseWriterTask = new Task ("pulseWriterTask");

Creating a digital output channel that provides the trigger to the U/S system
pulseWriterTask.DOChannels.CreateChannel (initParams.AddrUsTrigger.PortLineAddress, "US trigger", ChannelLineGrouping.OneChannelForEachLine ");
pulseWriterTask.Timing.ConfigureSampleClock ("/ SampleClock/AI/Dev1", initParams.SamplingRateHz, SampleClockActiveEdge.Rising, SampleQuantityMode.ContinuousSamples, samplesPerPulse);
pulseWriterTask.Stream.Buffer.OutputBufferSize = samplesPerPulse;
pulseWriterTask.Stream.WriteRegenerationMode = WriteRegenerationMode.AllowRegeneration;

pulseWriter = new DigitalSingleChannelWriter (pulseWriterTask.Stream);

pulseWaveform = new DigitalWaveform (samplesPerPulse, 1, DigitalState.ForceDown);
pulseWaveform.Signals [0]. The States [0] = DigitalState.ForceUp;

analogReadTask.Control (TaskAction.Verify);
pulseWriterTask.Control (TaskAction.Verify);

From reading:

analogReadTask.Start ();

Start writing the digital pulse, however it will not start
until the AI/SampleClock begins, so implicitly synchronizing the two tasks
pulseWriter.WriteWaveform (pulseWaveform, true);

analogReader.BeginReadWaveform (Totalechantillons, readerCallback, analogReadTask);

Result (should be a sinusoid from end to end)

Always seems to solve these problems, shortly after their validation.

The problem has start the digital task AFTER the analog task. In the small delay between the two lines of code running, read analog had already begun, and so some of the impulses of the AI/SampleClock were missed by the task. The order of departure between the two tasks of switching solves the problem.

Tags: NI Software

Similar Questions

  • Why pictures do not save when you import by the data reader?

    I just started using a data reader to import my photos on my mac, but realize that the pictures I imported have not saved on the hard drive. If I remove it and try to edit a photo in previous import, it says that it cannot find the file. What happens here?

    Cool. Thank you 1 million. One of those things that you would not be able to know without knowing precisely; )

    Richard

  • My USB 3.0 internal card reader SD and bus have both work to quit at the same time. Need help in restoring

    On my Macbook Pro 13 inch Core I5 2 .6GHz, I just noticed that my SD card reader and USB ports have stopped working. Buses from USB 3.0 and player appear in the information of the reporting system. I tried to reset PRAM and SMC but no luck so far and my Time Machine backup is on a SSD in a USB 3.0 hard drive enclosure. Any ideas how to reset the USB 3.0 Bus and drive? I'm including all system information in case it is useful

    System information:

    Model name: MacBook Pro

    Model identifier: MacBookPro11, 1

    Processor name: Intel Core i5

    Processor speed: 2.6 GHz

    Number of processors: 1

    Total number of cores: 2

    (By heart) L2 Cache: 256 KB

    L3 Cache: 3 MB

    Memory: 8 GB

    Boot ROM Version: MBP111.0138.B17

    : 2.16f68 SCM Version (system)

    USB:

    USB 3.0 Bus:

    Host Controller Driver: AppleUSBXHCILPT

    PCI Device ID:0x9c31

    PCI revision ID:0 x 0004

    The seller ID:0 x 8086 PCI

    Host controller USB Bluetooth:

    Product ID:0 x 8289

    ID:0x05ac of the seller (Apple Inc.)

    Version: 1.18

    Speed: up to 12 Mb/s

    Manufacturer: Apple Inc..

    Location ID:0 x 14330000 / 6

    Available current (mA): 1000

    Current (mA): 0

    Additional operating current (mA): 0

    Built-In: Yes

    Software:

    Presentation of the system software:

    System Version: OS X 10.11.5 (15F34)

    Kernel version: Darwin 15.5.0

    Volume: Macintosh HD to startup

    Boot Mode: Normal

    MacBook Pro name: Stuart computer

    User name: Stuart Berwick

    Ensure the virtual memory: enabled

    Integrity of system protection: enabled

    Since the starting time: 6 minutes

    USB 3.0 Bus:


    OS X Yosemite: If a USB device does not work

  • time /date back into the system tray/taskbar

    How can I insert time /date back into system tray/taskbar. I lost it & I don't know how to get it back .can someone help me please & thank you

    Right-click on the taskbar, and then select Properties.

    And select Customize, next to the Notification area

    Then select the turn system icons on or off in the lower left corner of the window

    Set up, next to the clock.

  • My pdf files that I am editing keeps "freezing" and I have to use the Task Manager to end the program. I have the latest version of Adobe Acrobat Reader DC and I have 10 windows? Is there any solution for this?

    My pdf files that I am editing keeps "freezing" and I have to use the Task Manager to end the program. I have the latest version of Adobe Acrobat Reader DC and I have 10 windows? Is there any solution for this?

    Hi gregs5153218,

    You can't the PDF files to be changed with Acrobat Reader DC.

    You must have the Acrobat application to edit PDF files using Acrobat. Edit PDF files.

    Kind regards
    Nicos

  • Viruses such as the behavior of the Acrobat Reader software. I have a laptop running WIN 7 and kaspersky AV. yesterday when I started my laptop that I see all the icons on my QuickStart bar browser have been changing drive adobe icon and observe also that

    Viruses such as the behavior of the Acrobat Reader software. I have a laptop running WIN 7 and kaspersky AV. yesterday when I started my laptop I see all the icons from the browser on my QuickStart bar have been changed to the adobe reader icon and also observe that many other programs on my desktop have changed to the adobe reader icon. If you click the icon it opens adobe reader. I deleted Adobe reader using Add or remove programs and the icons back to normal. Yet once, I downloaded and installed Adobe reader 11. the problem has resurfaced. then again, I've uninstalled adobe reader software and installed Adobe Reader version 10 with the same question back. I have now uninstalled Adobe Reader. Please advise on how to install a working copy Adobe reader which will not infect or impinge upon other programs in my laptop.

    Hi imoorthy,

    Please follow the troubleshooting steps mentioned in this document KB Application, file icons change in Acrobat/Reader icon.

    Kind regards

    Nicos

  • The system on my mac and all recovery data are erased. I have my serial number, but how do I reinstall my adobe creative suite design & web premium?

    The system on my mac and all recovery data are erased. I have my serial number, but how do I reinstall my adobe creative suite design & web premium?

    Hello

    Please visit the link below to download the version of Creative suite design and web premium:

    Other downloads

    Quickly find your serial number

    Let us know if that helps.

    Kind regards

    Bani

  • I had the previous version of the Adobe Reader software, and I put in the comments of the editor. As reove, replace text, etc. And now with the new version of Adobe reader, they seem to have disappeared all of them, except perhaps the reminder.

    I had the previous version of the Adobe Reader software, and I put in the comments of the editor. As reove, replace text, etc. And now with the new version of Adobe reader, they seem to have disappeared all of them, except perhaps the reminder.

    Hi Mariam,

    Please try this:-with your PDF document open, click on the "comment section" on the side right of your document, under "list of comments", click the "Filter comments" icon and choose "View all comments" or "hide all comments.

    I would like to know if it works.

    Kind regards

    Nicos

  • VM have been storage vMotioned to another data store, and now I have 3 VM with white "!" inside a red square and I want to understand the cause of this.

    VM have been storage vMotioned to another data store, and now I have 3 VM with white "!" inside a red square and I want to understand the cause of this.

    Can you try to make a vmotion host and see if it gets resolved? If not, can you close the virtual machine and start again? I have seen this problem before and a stop and start resolved.

  • Windows computer not able to find the software adobe reader XI? I have tried repairing, did not

    Windows computer not able to find the software adobe reader XI? I have tried repairing, did not

    Hi Kenneth,

    Please try & download Adobe Reader using this link Adobe - Adobe Acrobat Reader DC Distribution.

    Let me know if the problem persists.

    Kind regards

    Nicos

  • How to read from the beginning to reference trigger?

    Hello!

    I develop a system a little on a NI DAQmx 6025 and want to know how can I get data from an early relaxation of reference.

    I use "AcqVoltageSamples_IntClkDigStartAndRef.2008" to control the unit in c#

    If I set up the Starttrigger only, I can trigger... (the measure is to start by climbing aboard PFI0)

    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    myTask.AIChannels.CreateVoltageChannel (physicalChannelComboBox.Text,"", (AITerminalConfiguration)(-1), rangeMin, rangeMax, AIVoltageUnits.Volts ");

    myTask.Timing.ConfigureSampleClock ("", sampleRate, SampleClockActiveEdge.Rising, SampleQuantityMode.FiniteSamples, 1000);

    myTask.Triggers.StartTrigger.ConfigureDigitalEdgeTrigger ("/ PFI0/Dev1", DigitalEdgeStartTriggerEdge.Rising);

    Reader = new AnalogMultiChannelReader (myTask.Stream);

    ...

    drive. SynchronizeCallbacks = true;

    drive. BeginReadWaveform (-1, New AsyncCallback (myCallback), null);

    ... MyCallback...

    data = reader. EndReadWaveform (ar);

    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Now, I want to stop my measurement by the trigger of the reference, so I set up the Referencetrigger on the same source (PFI0)

    myTask.Triggers.ReferenceTrigger.ConfigureDigitalEdgeTrigger ("/ PFI0/Dev1", DigitalEdgeReferenceTriggerEdge.Falling, 10);

    (This line is after the configuration StartTrigger)

    If I start the task and give the triggersignal, the measurement starts. But now the measure must stop if I start PFI0 again!

    I don't know what I have to do to become a measure from the beginning to trigger Stop... I mean PFI0 PFI0 rising Edge edge

    Thanks for the support!

    Suchen für alle die noch immer nach einer Antwort, ich habs jetz!

    For all who are looking for this answer, I get it now!

    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    myTask = new Task ("aiTask");        Create a new task
    Initialize local Variables
    Double sampleRate = Convert.ToDouble (rateNumeric.Value);
    Double rangeMin = Convert.ToDouble (minimumValueNumeric.Value);
    rangeMax double = Convert.ToDouble (maximumValueNumeric.Value);
    Create a virtual channel
    myTask.AIChannels.CreateVoltageChannel (physicalChannelComboBox.Text, "", (AITerminalConfiguration)(-1),
    rangeMin, rangeMax, AIVoltageUnits.Volts);
    Set up sync Specs
    myTask.Timing.ConfigureSampleClock ("", sampleRate, SampleClockActiveEdge.Rising, SampleQuantityMode.FiniteSamples, 1000);
                
    Configure start and reference triggers
    myTask.Triggers.StartTrigger.ConfigureDigitalEdgeTrigger ("/ PFI0/Dev1", DigitalEdgeStartTriggerEdge.Rising);
    myTask.Triggers.ReferenceTrigger.ConfigureDigitalEdgeTrigger ("/ PFI0/Dev1", DigitalEdgeReferenceTriggerEdge.Rising, 100);

    Check the task
    myTask.Control (TaskAction.Verify);
    Create the object reader
    Reader = new AnalogMultiChannelReader (myTask.Stream);
    Start the task, and set the playback position
    myTask.Start ();
    myTask.Stream.ReadRelativeTo = ReadRelativeTo.CurrentReadPosition;

    AnalogWaveform[temp];

    {while(!myTask.IsDone)}
    Temp = reader. ReadWaveform (60000);
    }

    myTask.Dispose ();

    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Mit dieser Lösung kann man von mension zu messen mension.

    With this resolve you can measure from edge to edge.

  • Whenever I have shut down my computer, I am disconnected from Windows Live Messanger and must manually connect at the beginning of my next session.

    Question asked by Neil Clark (me)
     
    I selected the option Connect automatically in Windows Live Messenger when I turn my computer. Whenever I have shut down my computer, I am disconnected from Windows Live Messanger and must manually connect at the beginning of my next session.

     
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     
    Sunday, August 22, 2010 01:54
     
    Windows Live K - Ann C response.
     

    Hi Neil,

    This error occurs usually when a record has been changed when an update has been performed on your computer. To resolve this issue, follow these steps:


    Important:
    before you edit the registry, make sure to save, to understand how to restore the registry if a problem occurs.

    Warning: If you use the correct registry editor, you may cause serious problems may require you to reinstall your operating system. Microsoft does not guarantee that you can solve problems that result from the use of the Publisher of the registry incorrectly. Use the registry edit at your own risk.


    BACKUP REGISTRY KEYS:

    1. click on Start, click on run

    2. type regedit and click Ok

    3. in the registry editor window, click desktop on the left side to make sure that you backup all the registry keys.

    4. click on file and click on export

    5. save the file on your desktop or in your desired location. It will have the default extension (* .reg) to back up the registry.

    6. If you want to restore a file to the registry, in the Registry Editor window, click file and click Import

    7. navigate to the location and find the name of the file with the .reg extension and click Open.

    Note: you will be prompted that importation has been properly registered in the register.


    TROUBLESHOOTING STEPS:

    1. open the registry editor by clicking on Start, then run. Type regedit and then click OK.

    2 open the user Shell Folders folder. To do this, click on the + sign of each of the products listed below.

    a. click on the [] sign + next to HKEY_CURRENT_USER

    b. scroll and click on the [] sign + next to Software

    c. scroll down and click on the [+] sign next to Microsoft

    d. scroll down and click on the [+] sign next to Windows

    e. scroll down and click on the [+] sign next to CurrentVersion

    f. scroll and click on the [] sign + next to the Explorer

    3. click on the User Shell Folders. A list of entries appears on the right side. Double-click AppData.

    4. the value data, type the following entry, and then click OK: %USERPROFILE%\Application Data

    5. close the Windows Registry Editor and restart your computer.

    Thank you

    K Ann C.

     
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

     
    Thursday, August 26, 2010 09:27
     
    Response from Neil Clark
     

    Hi K - Ann,

    Thank you for the above information.

    I followed you instruction to back up the registry keys, but when I followed step number 7. Navigate to the location and look for the name of the file with the .reg extension and click Open, the message of answers that I received from the registry editor has been as follows: -.

    Impossible to import C:\Documents and Settings\Compaq_Owner\My Documents\My Backup\Backup260910.reg of register: not all data was successfully written to the registry.  Some keys are open by the system or my other processes.

    So I closed my computer and restarted. I then followed your instructions again (this time save the backup of the registry to a member in the same library, called "Backup260910bkup"

    Yet once, when I followed the number of the step 7. Navigate to the location and look for the name of the file with the .reg extension and click Open, the message of answers that I received from the registry editor has been as follows: -.

    Impossible to import C:\Documents and Settings\Compaq_Owner\My Documents\My Backup\Backup260910bkup.reg of register: not all data was successfully written to the registry.  Some keys are open by the system or my other processes.

    Can you tell me what I need to do to work around this problem of backup of the registry?

    I look forward to receiving your response.

    Thank you

    Neil Clark.

     
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Monday, August 30, 2010 22:19
     
    Response of Windows Live Mechell P.

    Posted by Neil Clark
     

    Impossible to import C:\Documents and Settings\Compaq_Owner\My Documents\My Backup\Backup260910bkup.reg of register: not all data was successfully written to the registry.  Some keys are open by the system or my other processes.

    For this error, you must contact the Support Windows via Microsoft answers Forum link below:
    http://answers.Microsoft.com/en-us/Windows/default.aspx#tab=4

    Thank you
    Mechell P.

    Hi NeilRClark,

    When a registry key is blocked from change, the user can also run a. Registry Registry REG entries to merge the registry keys, values or the value in the system registry data, with the following permission denied error message:

    Cannot import RegistrationEntries.reg. Not all data was successfully written to the registry. Some keys are open by the system or other processes.

    To solve this problem, the ownership and grant full control (read and write) permissions and rights on the protected system registry key.

    Check out this link to do the same thing:

    How to capture a file or a folder in Windows XP

    To take ownership of a file or folder

  • I get an error message at the beginning: "Problem starting C:\Program Data\IntelBackup Online.dll"

    Original title: I get an error message at the beginning upward:

    "Problem starting C:\Program Data\IntelBackup Online.dll" under this line, it is said: 'the Spicific mode is not found' how can I fix?

    Hello

    ·         What operating system do you use?

    ·         Were there recent changes made on the computer before the show?

    Follow these steps and check if that helps.

    Step 1:

    Check if you have the similar problem with safe mode, otherwise you can try to put your computer to a State of clean boot in normal mode and check if that helps:

    Start your computer in safe mode

    http://Windows.Microsoft.com/en-us/Windows7/start-your-computer-in-safe-mode

     

     

    Step 2:

    Follow the article to perform the clean boot on the computer:

    How to troubleshoot a problem by performing a clean boot in Windows Vista and Windows 7

    http://support.Microsoft.com/kb/929135

     

    Warning: After using the boot is a way to solve your problem step 7 follow-up to reset the computer to start as usual.

  • I have to press F1 at the beginning upward

    I have to press F1 at the beginning upward

    It shows my rhubarb info processor type etc.

    It says F1 to resume F2 to set up how can I fix this ive tried to reinstall vista, but it did not work

    When you turn off your computer, and then restart it later, is the date and exact time or he start badly and set only once you connect to the internet at syhchronize with the time clock?  It would be another clear sign that the CMOS battery is the problem.  However, if the time is accurate when you start the computer, and then suggesting that maybe not battery CMOS because that's what keeps the clock running when you turn off the computer and if it is now present, it seems to work.  But perhaps it is not totally bad, but only of the weakness and the clock works while the BIOS is not.  In any case, it is a simple and inexpensive solution and certainly worth the cost and effort it can very well fix the problem if the options that I have proposed is not the thing.

    I hope this helps.

    Good luck!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • Doesn't have installation of Vista updates. He continues to try set up the third update with 0% completion and then it turns off and start again from the beginning. Keep in the loop... Help! There is no error message.

    As above. He is not in windows more simply the third update installation and then turns off computer and restart new since the beginning. Tried running safe mode but without success

    Restore point:

    Try typing F8 at startup and in the list of Boot selections, select Mode safe using ARROW top to go there > and then press ENTER.

    Try a restore of the system once, to choose a Restore Point prior to your problem...

    Click Start > programs > Accessories > system tools > system restore > choose another time > next > etc.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

     

    If restore work not and you do not have a Vista DVD from Microsoft, do a repair disc to do a Startup Repair:

    Download the ISO on the link provided and make a record of repair time it starts.

    Go to your Bios/Setup, or the Boot Menu at startup and change the Boot order to make the DVD/CD drive 1st in the boot order, then reboot with the disk in the drive.

    At the startup/power on you should see at the bottom of the screen either F2 or DELETE, go to Setup/Bios or F12 for the Boot Menu.

    When you have changed that, insert the Bootable disk you did in the drive and reboot.

    http://www.bleepingcomputer.com/tutorials/tutorial148.html

    Link above shows what the process looks like and a manual, it load the repair options.

    NeoSmart containing the content of the Windows Vista DVD 'Recovery Centre', as we refer to him. It cannot be used to install or reinstall Windows Vista, and is just a Windows PE interface to recovering your PC. Technically, we could re-create this installation with downloadable media media freely from Microsoft (namely the Microsoft WAIK, several gigabyte download); but it is pretty darn decent of Microsoft to present Windows users who might not be able to create such a thing on their own.

    Read all the info on the website on how to create and use it.

    http://NeoSmart.net/blog/2008/Windows-Vista-recovery-disc-download/

    ISO Burner: http://www.snapfiles.com/get/active-isoburner.html

    It's a very good Vista startup repair disk.

    You can do a system restart tool, system, etc it restore.

    It is NOT a disc of resettlement.

    And the 32-bit is what normally comes on a computer, unless 64-bit.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    If the above does not resolve the problem:

    Windows Update Forum:

    It comes with Vista, upgrade install and activate Forum.

    You will get the best help for any problem of Update/Service Pack in the Windows Update Forum; the link below:

    http://social.answers.Microsoft.com/forums/en-us/vistawu/threads

    When you repost here, kindly include the Error Codes, and exactly what is happening when you try to update.

    In this way, you will receive the best help.

    See you soon.

    Mick Murphy - Microsoft partner

Maybe you are looking for

  • Change HARD drive on Satellite L300 - Windows Vista need

    Hi all My laptop hard drive is completely dead and the repair option didn't work.I backed up all my data, etc., including the folder HDDRecovery and WinRE partition/folder. This is a laptop Toshiba L300, which I bought in the United Kingdom (from the

  • question of case structure

    I have 3 case structures in another... say I want to create a new structure of matter during all of these existing business structures. so you have real and it shows each of the structures case etc. When you go to false, all existing within the momen

  • How can I set up a new laptop? and it is difficult to do?

    I just bought a new DELL inspiron laptop and now I need to put in place. but I've never done this before and I don't know if I'll be able to do it without getting bogged down. What happens when I turn it on for the first time? complicated game? I als

  • How to check if group policy is set on "don't sign is not on the users with temporary profiles?

    I work through the problem addressed in https://support.microsoft.com/en-us/kb/947215 (click here), namely: after creating a new user account, attempts to to the fail with the error "user profile service logon. User profile cannot loaded ". KB recomm

  • HP Pavilion e9180t

    I'll send in my computer for the new motherboard HP Pavilion e9180t for the prosecution. But when I get it back I would like to upgrade the video card and power supply, my question is what card should I look for? Name: HP Pavilion e9180t Operating sy