Trigger start and stop after desired number of pulses - random errors in my implementation

Dear all,

I used an example comes from here: http://zone.ni.com/devzone/cda/epd/p/id/5028

My code works, but sometimes it gives me this error:

Error -200279 occurred at Barkhausen_DAQ_raw.vi

Possible reason(s):

Attempted to read samples that are no longer available. The requested sample was previously available, but has since been overwritten.

Increasing the buffer size, reading the data more frequently, or specifying a fixed number of samples to read instead of reading all available samples might correct the problem.

Property: RelativeTo
Corresponding Value: Current Read Position
Property: Offset
Corresponding Value: 0

Task Name: _unnamedTask<37>

Does someone could give me a clue why we get this undesirable behaviour? I make my code I've seen in the official example, only I have a little higher sampling frequency...

Please find my screws attached.

Thank you!

Best regards

The example looks like it's based on this one--both have the same flaws as someone of NOR should probably correct (or simply move the example of developer to the Community area and then we users can fix it for you instead ).  The issue that you are experiencing just how DAQmx uses the default settings to configure the buffer and the number of samples to read:

(1) for a finite task, DAQmx chooses a default buffer size of the ownership of samples per channel (the entrance to DAQmx Timing.vi - in your case, 20000 samples).

(2) for a task finished, by specifying - 1 for entry of number of samples per channel DAQmx Read.vi results in rereading the number of samples specified for the finished task (20000 same samples mentioned in #1).

So, you can see the problem.  You constantly fill the buffer, but only to remove samples of the buffer into pieces which are the size of the buffer itself.  If something happens in the software a little delaying playback of samples from the buffer, you will end up overwriting data.  The buffer must be larger to compensate for (Alternatively, you can specify a number of samples to the call of DAQmx Read less than your number of configured samples for the finished task, but this seems like it would dimly to go about this).

Another major problem with the example (it would lead to a different error) is the use of the task request made to decide or not to read all of the samples.  What happens if the task ends after the control has already been done and the reading is still waiting for all of the samples to be filled?  You will block during the full of reading call time-out and will get a time-out error, then don't read the remaining samples in the end due to the error of chaining (or in fact I think that samples would be available on the terminal data instead - but this inconsistency seems undesirable - I don't really like blocking for 10 seconds for pending data in all cases).

There are also some minor problems with the example:

  • Why should I use so many samples after triggering when this will just make your acquisition performance more than necessary?
  • The "other samples" indicator only is not updated if there is any remaining samples, should we not update us so that it is empty rather than persist in any value has been on the indicator of the last execution of the VI?

Well, now I've got off on a tangent.  The point is, in the example, there are a few flaws.  I think it of a great use case for DAQmx events and would have probably done something more like this (warning, the extract is not tested - it doesn't have the makings of additional counter your example is to divide the trig source ref):

The solution to your specific problem is to configure the buffer (DAQmx Configure entry Buffer.vi).  Here, I'm gone with 2 x the number of samples read by iteration of loop (should probably be enough, maybe brought to come up with an algorithm based on the sampling rate however).

Other patches are post trigger samples are now the 2 minimum (for a stop faster), DAQmx event is now used to determine the time to read all the data (to avoid the reading timeout after stopping), and the remaining data marker is always updated (to avoid stale data is displayed on the indicator in the case that there is no remaining data).

If all goes well, Miss me not else...

Best regards

Tags: NI Software

Similar Questions

  • Audio playback starts and stops after a few seconds

    original title: Audio playback

    By my speakers (Windows 7) starts and stops after a few seconds.  I have troubleshooted but found no problem.  I configured and tested with good results, but the problem persists.  Anyone else know this or knows how to solve the problem? PLEASE HELP :)

    Hi NuttyNetty444,

    If you have not already the case, follow the steps in this document. This should solve most common sound problems in Windows.

  • The slide show feature does not work when I used my Apple TV new 4th gen. I have all the minimum requirements for Macbook and Macbook OSX the Airport express. The slide show starts and stops after that 7 photos are displayed on the TV. If I change the

    The slide show feature does not work when I used my Macbook with new Apple TV 4th gen. The slide show stops after that display 7 photos and display to select the options for the slide show is displayed on the screen. The selected interval was 5 seconds. If the interval is spent in 3 seconds the slide show would work for a time and then to display random images. Has worked with Apple on this issue Support Mike and he managed to reproduce the problem. Since I'm in the return period of 14 days for this product, I returned it to the Apple store

    Welcome to the Apple community.

    After returning, I'm not really clear on what your question.

  • SRM 5.8 service starts and stops

    Hi all

    I have a problem with MRS. At the beginning, I have 2 vCenters, in bound mode, with the default installation of MRS. (1:1). Now, after a long time, one of the two sites of this will not start the service. MRS. service starts and stops after a minute.

    In the paper, I see a lot of these:

    015 01-20 T 13: 30:53.532 + 01:00 [10772 connID wordy of 'QsServerSingletonCache' e09c =] Dr::QsServerSingletonCache:SetContext: context and broadcasting

    2015 01-20 T 13: 30:53.534 + 01:00 [03592 WARNING connID 'QsClient' = e09c] had wrong answer. Code: 400, Message: Bad Request

    2015 01-20 T 13: 30:53.534 + 01:00 [03592 WARNING "Default" connID = e09c] closing of transformation in unexpected state response: 3

    2015 01-20 T 13: 30:53.535 + 01:00 [error 03592 'LocalQS' connID = e09c] Exception so that Ping Server QS

    -> Std::exception QsClient::ValidationException 'class' 'Bad Request'

    2015 01-20 T 13: 30:53.535 + 01:00 [03592 WARNING connID 'LocalQS' = e09c] Ping failed: std::exception 'class QsClient::ValidationException' "Bad Request".

    2015 01-20 T 13: 30:53.535 + 01:00 [03592 info 'QsServerSingletonCache' connID = e09c] Dr::QsServerSingletonCache:SetContext: lost connection, reset the connection context

    2015 01-20 T 13: 30:53.535 + 01:00 [connID 03592 verbose 'LocalQS' = e09c] tries to connect

    2015 01-20 T 13: 30:53.541 + 01:00 [10372 info "Default" opID = 6b661b6d] CoreDump: written minidump

    2015 01-20 T 13: 30:53.587 + 01:00 [10800 "Default" info] CoreDump: written minidump

    «"2015 01-20 T 13: 30:54.568 + 01:00 [connID 10772 verbose 'LocalQS' = e09c] connection was successful, the new session id ="»

    2015 01-20 T 13: 30:54.569 + 01:00 [connID 10772 verbose 'LocalQS' = e09c] event to VC validation: {(dr.eventEx.LocalQsConnectionUpEvent)

    -> dynamicType = < unset >

    ->}

    Any idea? I tried the dejoin and join the 2 vCenters, but nothing does not change.

    Thank you very much

    Matrix

    There's your problem:

    2015 01-20 T 13: 29:51.893 + 01:00 [10800 "Default" error] Application error:

    --> There is no valid records in QS Server for this SRM server.

    --> There is no such registered provider: "45c9c008-16be-4ab3-a346-069b57837c7e." Closing...

    This means that registration SRM in the inventory of VMware somehow Service has been lost. Did you accidentally uninstall SRM or restored vCenter sauvegardΘ or something like that?

    Can you repair the installation of SRM by going to control panel-> programs and features-> VMware vCenter Site Recovery Manager-> changes installation. You go through the wizard and vCenter administrator credentials are available.

    After this operation, you may have to reconfigure the connection between the servers through the UI SRM SRM.

    Thank you

    Stefan

  • Digital start and stop trigger with restart HW

    Hello

    I am trying to write a program that reads continually samples based on the rise and fall of a digital triggering.  I want the measure to start on the front of the trigger and stop on the falling edge of the trigger.  I want the data that are read to be preserved and then added with the next set of data that the trigger rises again.  I have read the tutorial "Digital start and stop trigger" and can use the reference to stop the measurement process and I looked at the example "Acq & chart voltage - Int Clk - HW Trig restarts ' that comes with LabVIEW and I can get the two of them working separately with my request.  I'm quite confused however try to put the two together (see attachment).

    If I put a "Start.vi" icon inside the while loop then I get an error "you can do this while the measure is still ongoing".  If I put it out of the loop and then the process only runs once.  I tried to put a loop structure case for restart only if necessary, but this has produced another error which the source escapes me.  Is there a standard way to do this and if so someone can point me in the direction of an example?

    See you soon,.

    Glen

    I think that in this situation, it would be preferable to use a Pause trigger.  You can use the break to stop the acquisition when the trigger was low and start when the trigger is high.  In this way, served only for the duration of your trigger pulse.  I've attached a screenshot of a VI that illustrates this principle in action.

  • iOS 10 times to start and stop the music messed up

    I'm running a SE 64 GB iPhone with iOS 10. Many songs from my iTunes library has some moments of power, but after update, they are all mixed. Songs don't start or stop when they're supposed to, or they're going to start and stop at a random time, which is annoying. The same problem was in the beta, causing me to backup on iOS 9. I assumed that this bug would be fixed in the final version. All the solutions in addition to remove and re - download my library?

    Hello Carnage1215,

    Thank you for reaching out to the Community Support from Apple. I understand your music has had some problems and I want to help him. By the sounds of things that your songs start may be delayed or in the middle of the piece, is that correct?

    Before you make too much trouble shooting, it's a good idea to make a backup of your iPhone If you don't have it already. If you do not know how to save your phone from this article will guide you in the process: the backup of your iPhone, iPad and iPod touch

    Once you have made a backup, I would recommend to reset all the settings on your iPhone. This will ensure that all old data of a version of iOS parameter are removed and reset default. This removes all data and applications, photos or contacts, but it removes all of your preferences for the Wi - Fi, Bluetooth, do not disturb, Notifications, general, sounds, contact ID, brightness & paper painted and privacy, then you may need to define these things upwards after this reset.

    Do this please go to settings > general > reset > reset all settings.

    If you always use the same behavior after you restart your phone, please inform the community. We are all here to help.
    Best regards.

  • Start and stop a loop automatically subtracted at each iteration

    Hello

    I know that there are some topics about this, but I couldn't find any solution, especially because I'm using version 7.1 and cannot open files from new version.

    My problem is the following:

    I need to load a tank of 6 to 10 in the morning, every day for 3 days. The process should start and stop automatically, which means, no funds to start or stop. Start and stop conditions come from time.

    I start with a big loop of 72 iterations, which is 72 hours.

    The tank must start at level 6, whenever he starts.

    After the departure, 1 unit must be subtracted to each iteration. That means, that the tank is level 10, at 06:00 07:00 level 9 and so on. At the end of the day, at 10:00 the fill level is equal to 2.

    The next day, the process must start again and the tank must start at level 6.

    Any suggestions? Thanks in advance.

    Hi Florian.

    Thank you for your message. That solved this problem, but in fact my VI did not work as I wanted.

    I created a new one, with and an external file from 1 to 24, repeat 3 times. Now I got it. Maybe there is a better way to do it, but it works now. Thanks for all the help. I appreciate a lot.

  • Start and stop too slow

    My computer starts and stops very very slow (more than 3 minutes)

    Hi AngelAcevedo,

    ·         Did you do changes on the computer before the show?

    ·         The startup problem occurs after the connection or if you are referring to restart is slow?

    Follow these methods.

    Method 1: Run the disk cleanup tool.

    Description of the tool in Windows XP disk cleanup

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

    Method 2: Perform a clean boot to see if there is a conflict of software like the clean boot helps eliminate software conflicts.

    How to configure Windows XP to start in a "clean boot" State

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

    Note: After completing the steps in the clean boot troubleshooting, follow the section How to configure Windows to use a Normal startup state of the link to return the computer to a Normal startupmode.

    After the clean boot used to resolve the problem, you can follow these steps to configure Windows XP to start normally.

    (a) click Start, run.

    (b) type msconfigand click OK.

    (c) the System Configuration Utility dialog box appears.

    (d) click the general tab, click Normal startup - load all services and device drivers and then click OK.

    (e) when you are prompted, click on restart to restart the computer.

    Method 3: Follow the steps in the article.

    How to set performance options in Windows XP

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

    For reference:

    How to make a computer faster: 6 ways to speed up your PC

    http://www.Microsoft.com/atwork/maintenance/speed.aspx

  • I installed G10-ebook but when open it and write down the username and password it starts and stops immediately and closes what should I do?

    I installed G10-ebook but when open it and write down the username and password it starts and stops immediately and closes what should I do?

    Hello

    Step 1: Check if the problem persists in the clean boot state.

    From your computer by using a minimal set of drivers and startup programs so that you can determine if a background program is interfering with your game or program. This type of boot is known as a "clean boot".

    Reference:
    How to configure Windows XP to start in a "clean boot" State
    http://support.Microsoft.com/kb/310353

    When you are finished troubleshooting, follow these steps to reset the computer to start as usual:
    1. click on start and then click Run.
    2. type msconfig and click OK.
    The System Configuration Utility dialog box appears.
    3. click on the tab general, click Normal Startup - load all services and device drivers and then click OK.
    4. When prompted, click on restart to restart the computer.

    Step 2: Also, look for error messages in the event viewer. If you find error messages after return the exact error message so that we can help you better.

    Reference:
    Using the event viewer
    http://www.Microsoft.com/resources/documentation/Windows/XP/all/proddocs/en-us/snap_event_viewer.mspx?mfr=true

    Understanding of event viewer
    http://www.Microsoft.com/resources/documentation/Windows/XP/all/proddocs/en-us/event_overview_01.mspx?mfr=true

    Procedure to view and manage event logs in Event Viewer in Windows XP
    http://support.Microsoft.com/kb/308427

  • Records of Vista Media Center starts and stops at the wrong time

    I use Windows Vista Home Premium, SP1 and that you may have noticed that when I schedule recordings for some a particular channel, Media Center starts 2 minutes beforehand and ends 2 minutes in advance.  This affects only shows record from my local affiliate Fox - all other shows for other strings start and stop at the appropriate time.

    I checked the system clock with the start times of the shows and both are correct.  In fact, I saw one day Media Center started to record for a show that did not begin until 08:00 at 19:58 (according to the system time).  I had my TV on at the same time and was able to verify that the program in question had not yet begun, so the flow of the internet was sychned with the dissemination of local transmission.

    It's very frustrating because I miss the end of some shows and cannot always extend registration ends because I'm ordering another channel, the next hour.

    I have the same problem with the FOX network...

    -1 make sure your clock automaticly sets in the internet and update once by pressing the link (which makes that he can see the time server)...

    There are two ways you can go with this:

    -If your departure time is correct, then just go to the Planner and choose the program (or series) you are trying to install, select the recording settings (or adjustment of series) or advanced setting... There is an option to "stop recording" 1 min, 2 min, 3 min, 5 min, until 2 hours after the recording is finished... I have mine set to 5 minutes after, and she fixed it...

    -If the starting time is disabled (as mine is), to enter ERM and manuver to tasks > settings > TV > recorder > recorder defaults

    This is where you define all the flaws of the recorder, find "Start when possible" and "Stop when possible", 4 min value (max allows MCE)... Save and exit, restart the machine too...

    You should be good to go...

    PS, I just read the last sentence in your post, you must only have a tv tuner card in your machine (I have two, and that's the reason why I bought two), so you can always have a problem when recording two different channels (back to back on the same channel should work okay).

  • How to stop the EN icon appear in Windows 7 Pro to start and stop

    I have a language loaded on my computer.  Whenever the computer starts and stops at the icon IN displayed on the screen.  I looked in the obvious places like Start > Control Panel > clock, language and region, for a possible solution for this turn.  The language toolbar is turned off and is not reduced to a minimum or displayed anywhere.

    How can I prevent the EN icon appears?

    Thanks Omnicore you snapped.

    I don't know if that has an effect, but under keyboards, I got two installed?  The keyboard for the United States and the other for the United Kingdom.  I deleted the one for US as I am in England, applies the settings and rebooted the system.  The stop screen does not display the icon of EN, but on the home screen icon EN reappeared.

    So I applied the settings of copy on the administration tab, and after the system restarts, it erased the EN icon on hospitality and the stop of the screens.

    I appreciate you taking the time and allows you to reconfigure your computer to solve this problem for me.

  • Why continue those class Scheduler start and stop every half hour approximately

    Why continue those class Scheduler start and stop every half hour approximately. I am fortunate to have a sound event for the event program open and this event is triggered by Multimedia Class Scheduler, it seems, every half hour.
    Is this normal?
    Can I disable it?

    James

    Hello

    Service Multimedia Class Scheduler (MMCSS) allows multimedia applications to ensure that time-sensitive processing receives priority access to the CPU resources. This service allows multimedia applications to use CPU as possible without denying CPU for low-priority applications as well.

    This service is required only for the fact that the Windows Audio service lists this as a dependency. Without the Windows Audio service, no audio signal will play on the system. This service is started when the system starts, but shortly after (~ 8 minutes), it stops.

    This is a Notification which will start with all programs that use Windows Audio. For an example if you open Windows Media Player, then multimedia class scheduler also starts because it uses the windows audio.

  • Start and stop is slow in Windows 7

    Original title: I desperately need some help here.

    I have a Toshiba LT, running the Windows 7 operating system. Start and stop is slow, so I downloaded

    MicrosoftFixit to analyze and fix my computer. It is scanned and was told that more than one anti-virus program is running, I'm only using Microsoft

    Security Essentials, also more than one user is logged on when I'm the only person using this computer!

    Several programs are currently running in the background at the start and during the shut down, but I can safely remove. Help, please!

    Hello

    Have you made changes on the computer before this problem?

    Method 1: Resolution of Performance problems.

     

    Optimize Windows 7 for better performance

    http://Windows.Microsoft.com/en-us/Windows7/optimize-Windows-7-for-better-performance

     

    Method 2:

     

    Step 1: Check in safe mode.

     

     

    You can also check if the problem persists in safe mode.

    Reference:

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

    http://Windows.Microsoft.com/en-us/Windows7/advanced-startup-options-including-safe-mode

     

    Step 2: Perform a clean boot and check.

     

    To help resolve the error message, you can start Windows Vista or Windows 7 by using a minimal set of drivers and startup programs. This type of boot is known as a "clean boot". A clean boot helps eliminate software conflicts.

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

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


    Please note:  After troubleshooting, be sure to start your computer in normal mode by following step 7.

    Hope the above information is helpful.

  • Black horizontal lines on the LCD screen at a specific time during the start and stop

    Hi, I am currently using a Presario CQ61 Notebook PC.  My problem, as indicated in the title, are black lines on the LCD screen, apparently when the screen is reset or enclose itself turned off during the start and stop only. From the judgment, he produced a split second her stops the hard drive, after that the screen is black. The lines and then quickly disappear. At startup, lines appear after the Windows logo has passed and the screen went from black to start loading the login screen.

    The LCD is in perfect condition, all using the PC. No line, no discoloration, etc.. Nothing extraordinary either. The problem does occur only during these two periods, specifically. I am also unable to note the lines when I'm looking directly at the screen. I have to be standing next to the PC, at an angle.

    Now, I had this PC for a considerable amount of time, however, I never paid much attention to the screen when starting upwards or stop, so this could definitely be something that the laptop has done since I bought it. I also read on similar problems, and it could be an outdated video driver or BIOS.

    I want to just make sure that it is not a major problem. Thank you all!

    Hello

    You have a few options in my opinion please try these steps can help you solve your problem.

    1) click Start, type msconfig.exe in the start search box and press ENTER to start the System Configuration utility. Under the Services tab, click to select the hide all Microsoft services check box, and then go to tap Start , click on disable all. Click apply OK restart the device.

    (2) please visit the HP website and update the Bios and graphics drivers on the unit.

    Let us know how it goes!

    * Although I am an employee of HP, I speak for myself and not for HP.

    Click the White Star Kudos to say thank you *.

    Please check accept as Solution if it solves your problem *.

    Concerning

    Maton

  • Start and stop Virtual Machines with the system

    Hello

    In a server cluster @vcenter HA/DRS 5.1, I enabled start and stop virtual machines with the system option but after I checked two days later, he is off again somehow. What makes this option off? I had a power failure in the datacenter. vCenter server has not been upward. I started all of the ESXi servers manually then went all VMs account is declining. I want that they start automatically when server ESXi upward.

    Thanks in advance,

    Thank you. This option is more valid than if the hosts are part of an HA Cluster license. I suspect that you configured through the traditional vSphere Client and that it is a bug with this client. If you try with the new vSphere Web Client, you will find a notice that it is disabled and there is no button "Edit".

    Concerning

Maybe you are looking for

  • How to use iCloud

    HI, please help a total techaphobe. I need to store my photos in iCloud (that is already installed on my iPad, I have Apple ID n all). I tried to select the photos, but there is no option, then save in the cloud. Perhaps they are there already as the

  • Installation of Xperia S themes

    Hi guys,. I have the Xperia Arc S & I'm trying to install this theme of http://forum.xda-developers.com/showthread.php?t=1448552 I got the udpate 5 downloaded, and I extracted the files. Found the system folder where the apk files where present. Fire

  • Dongle not found in Device Manager

    I bought msi cr620, n installed windows 7. Problem is I can't find webcam in device manager, n when I try to find drivers online, I met that she uses the necessary drivers to the operating system. If anyone can help, thanks

  • Obtaining a disk image of Vista (legal issues)?

    My girlfriend bought a laptop with Vista Home Premium pre-installed, but it seems that the laptop didn't come with the CD of vista, or she has since lost their. Because I'm not really a Windows person, I would like to know the following: (1) where ca

  • How to call out are routed to a branch

    I'm looking for help in the understanding of outgoing calls how to a branch of work. I want to know what command/config on the router or call handler causes an outgoing call to be routed through a branch router fxo or trunk T1/SIP at Headquarters and