Error -200429 DAQmx read (counter u32 1ch 1samp).vi -append- Edge count in for loop

I am receiving error -200429 DAQmx read (counter u32 1ch 1 samp).vi <append>. This is occuring on the second loop of a for loop.
I have a sequence inside the for loop that is using four DAQmx assistant vi's for edge count at various times in the sequence. All four of these count fine the first time through but at the beginning of the second loop the first edge count receives this error and does not count.
Any ideas?

The code you have supplied is similar to the converted subvi but this code will give an empty task error on the DAQmx Create Channel vi.
Notice on the Daqmx create task vi that there is nothing wired to the "Task to copy" or the "Global virtual channels" connectors - I believe this is why the task is empty when sent to the Daqmx create channel vi.
The code we are currently using is a modification of a previous code used before a recent upgrade. It may be better in your/NI eyes to re-write this into a State machine but time constraints and resources do not allow that at this time - All other parts of the current program work except for the counter on the second iteration. Would rather not reinvent the wheel at this point. 
If the task is being cleared was the issue then the other three should also not execute. The issue appears to be the "First Call"
I have attached a zip file of the complete program as it is now written to give you a better idea of the whole picture.
Attachments:
Test Machine current code.zip ‏657 KB

Similar Messages

  • Why do I receive Error -200077 Daqmx Read when scaling should be within range

    I have an application using a NI-9215 and custom scales.  The task and scales are all setup programmatically.  I am receiving an error that the AI.Min value is out of range but when I check my scaling it seems like it should be fine.  I have attached an image with the error message and also the scaling that I am using (slope and offset) for each channel.  I have calculated the allowable min and max values for each of 3 channels based on the scaling and min/max range of the 9215 (+/-10V).  For all of the channels I am trying to set the AI.Min = 0 and AI.Max = 13 but I receive the error message even though these values are within the calculated ranges.  Is there something else I am missing?
    Thanks
    Dan
    Solved!
    Go to Solution.
    Attachments:
    Error -200077.png ‏188 KB

    You should say how this was solved.  That way other people can learn from your experience.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • -50405 Error at DAQmx Read AI Sample

    Anyone seen this error before?  The Possible Reasons are:
    No transfer is in progress because the transfer was aborted by the client. The operation could not be completed as specified.
    I am using the DAQmx Analog 2d DBL NChan Nsamp function and getting this error thrown.  Please let me know if you have any thoughts.
    Cheers!
    CLA, CLED, CTD,CPI, LabVIEW Champion
    Platinum Alliance Partner
    Senior Engineer
    Using LV 2013, 2012
    Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.

    As a follow up for anyone who has a similar problem.  As best as I can tell this error had to do with my laptop running out of Virtual Memory, Windows would pop up and tell me my VM was low and the next time I ran the program I would get the previously listed error.  I managed to fix it by rebooting, which is what points me towards the VM being the issue.  I am still open to suggestions if anyone has them.
    Cheers!
    CLA, CLED, CTD,CPI, LabVIEW Champion
    Platinum Alliance Partner
    Senior Engineer
    Using LV 2013, 2012
    Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.

  • Read data from text file one by one using for loop

    Dear Forum
    I want to read data of single colum of text file inside the for loop one by one(for each iteration value must be replaced by another value of text file).This value is used by a formula inside for loop. also after completion of iterations the values must be plotted on xy graph. How to do it.? please help me.
    profravi

    It's not very efficient to read a file line by line. Much simpler to read it all at once and then auto-index the results inside a for loop. The image below shows a generic solution to your problem. This assumes that the data in the file is in a single column.
    I would also recomend checking ou the learning LabVIEW resources here.
    I would aslos suggest that since this type of question is not specific to either NI-Elvis or the LabVIEW SE, you should post similar questions to the LabVIEW board. If you have problems, attaching a sample of the text file would help.
    Message Edited by Dennis Knutson on 10-18-2007 09:11 AM
    Attachments:
    XY Graph From File.PNG ‏4 KB

  • DAQmx multichann​el read error. DAQmx believes there are multiple channels in my task.

    Hello,
    I recieve the appended error message when attempting to use DAQmx Read in my VI.  LabVIEW is telling me that I am attempting to read a single channel when my task is configured for multiple channels.  However, as you can see in the task configuration pane, that is not the case!  If I attempt to use DAQmx Read to generate a waveform with multiple channels, the VI executes without error but I do not want a 1D waveform array..  Any tips?
    Regards,
    Steve
    Solved!
    Go to Solution.
    Attachments:
    multi_chan_errr.JPG ‏42 KB
    channel_Vin.JPG ‏108 KB

    This is exactly why I ALLWAYS hide my DAQ Tasks inside a "Resource Module" 
    As I use the term a "Resource Module" is a special case Action Engine tha exposes only that subset of functionality that a specific project needs to take on a given resource external to LabVIEW.  And, it provides a single point of entry to access that resource by keeping private data private.  Had you used the technique here you would have had one vi to look at.  and, there likely would have been no "Reconfigure to add channel" method available to cause trouble.
    Jeff

  • Error code -200088, accessing DAQmx read function in fncB from fnc A

    Hi,
    I am using NIDAQ 6229, and C code.
    My c code is as follows:
    #define DAQmxErrChk(functionCall) { if( DAQmxFailed(error=(functionCall)) ) { goto Error; } }
    int main()
      TaskHandle aiTaskHandle;
    // and the variables whatever used in the API's declaration below done here and initialised
      DAQmxStartTask (aiTaskHandle);
      DAQmxErrChk (DAQmxCreateTask("AI Task",&aiTaskHandle));
      DAQmxErrChk (DAQmxCreateAIVoltageChan(aiTaskHandle,AIChannelList,AINameList,DAQmx_Val_RSE,0.0,10.0,DAQmx_Val_Volts,NULL)); 
      DAQmxCfgSampClkTiming(aiTaskHandle,"OnboardClock",AIRate,DAQmx_Val_Rising,DAQmx_Val_ContSamps,AISamplesPerChannelAcq);
      while(1)
                fncB( );
    fncB(  )
                DAQmxErrChk (DAQmxReadAnalogF64  
                  (AITaskHandle,DAQmx_Val_Auto,timeOut,DAQmx_Val_GroupByScanNumber,AIReadArray,AIarraySizeInSamps,&AISampsPerChanRead,NULL));
    This Code builds without errors and runs. But the problem is with calling the fncB( ) where the DAQmx read for aiTaskHandle is executing.
    The DAQ read works fine for one time, but in the second call of fncB it gives error " task specified is invalid or does not exist" with error return code: -200088.
    why for the second call , the task specified becoming unknown is not yet all clear.
    the ni error codes document doesnot list this error code yet all.
    i have tried in declaring aiTaskHandle variable global, then in the first time of calling fncB it gives the error as mentioned above.In my application i cant use DAQRead in the same function where i declared the taskHandle , so i have to call it from the function.
    Does some body help in calling the DAQread from another function, and why this task is becoming invalid for the second call,.
    Thanks ,
    vishnu
    Message Edited by gkvishnu on 10-12-2005 08:10 AM

    I found where does my error come from.
    I configure my task from a other function and call this callback to start acquisition (get partly from NI examples)
    I get the error on the Start_AI_Clk(taskAIClk); call.
    int CVICALLBACK AI_TrigStartCallback(int panel, int control, int event, void *callbackData, int eventData1, int eventData2)
        int32       error=0;
         char        Chaine[500],Chaine1[500],ChaineFormateur[500];
        int32       numRead;
        float64     *data=NULL,*dataMoy=NULL;
        int         i,j,Checked;
        double        LocValeurLue,TempsDebut,TempsTotal,TempsEnCours;
        long int     NbMesTotale = 0;
        FILE         *TempFile;
        if( event==EVENT_COMMIT ) {
            if( (data=malloc(NbMes*NbChanAIClk*sizeof(float64)))==NULL ) {
                MessagePopup("Error","Not enough memory");
                goto Error;
            TempsDebut = Timer();
            TempsTotal = TempsDebut;
            TempFile = fopen("TempoResult.txt","w");    
            Start_AI_Clk(taskAIClk);
            ProcessDrawEvents();
            gRunningTrig = 1;
            while( gRunningTrig )
                DAQmxErrChk
    (Read_AI_Clk(taskAIClk,NbMes,data,NbMes*NbChanAIClk,&numRead));
                ProcessSystemEvents();
                 /*data treatment*/
            TempsTotal = Timer() - TempsTotal;
            fprintf(TempFile,"Temps total:%.3f - Nb Mes totales : %d",TempsTotal,NbMesTotale);
            fclose(TempFile);
    Error:
        if( DAQmxFailed(error) )
            TraitErreurCarteDAQmx("Lecture AI horloge externe",error);
        if( taskAIClk!=0 ) {
            Stop_AI_Clk(taskAIClk);
        if( data )
            free(data);
        return 0;
    What happen is when I click on my start button, my function is executed
    once before a EVENT_COMMIT came, so it jumps directly to the Error part,
    then as the taskHandle is not null, it stop the task
     if( taskAIClk!=0 ) {
            Stop_AI_Clk(taskAIClk);
    Then it executes the if(event==EVENT_COMMIT) part and as the task has been stopped, it give the -200088 error code.
    To correct this, I change the Error treatment like this:
    if( DAQmxFailed(error) )
        TraitErreurCarteDAQmx("Lecture AI horloge externe",error);
        Stop_AI_Clk(taskAIClk);
    Yop!
    DanY

  • How to run two DAQmx Read (Counter in + Digital in) simultaneously?

    Hello to all, i have following issue:
    I want to acquire a digital (UART like) bus signal. For this purpose i use a DAQmx Card (PXI 6070e). I need precise time information about time lenght of 0 and 1, so i use a counter. The counter is adjust to CI Semi Period(continuous samples) -> on the edge change i'll get a new measured time value. It works perfectly, but i newer know what kind of state (0 or 1) actually belongs to current value. Of course they changing with each edge, but i need to know that exactly. So i should take a digital input which watching the current state. Unfortunately i can not synchronise two DAQmx-reads.
    Finaly i should get two values:
    time value(counter) and his state(digital in
    ) to work with them. How can i do this?
    I use LabView 7.0

    [SRQ 211371]
    This is not a trivial taks but here is one way to do what you explained with a PXI-6070E and some external circuitry:
    1. Use buffered semi period measurement to measure the width of your pulses.(Meas Buffered Semi-Period-Continuous.vi)
    2. Use a buffered continuous analog data acquisition with external scanclock (e. g. Cont Acq&Graph Voltage-Ext Clk.vi). Maybe you should use a triggered example to start the acquisition at a defined time.
    Now you could connect your signal to the ScanClock input (PFI7) of the 6070E but then you only would acquire only a sample at either the rising or the falling edge. As you need a sample at both edges you need some external circuitry that generates a short positive TTL pulse at each edge (rising and fa
    lling).
    Sorry that I can't provide a solution for this circuitry but I'm pretty sure something like this should be available as a low cost IC.
    You may want to allow your signal some settling time after the scanclock pulse has occurred. In this case simply acquire data on two AI channels. The first channel is only a dummy channel. Connect your signal to the second channel. The delay can be adjusted with the interchannel delay.
    If anybody knows a good solution for the external circuitry or if anybody has a better approach please post it here.
    Best regards,
    Jochen Klier
    NI-Germany

  • Error -200279 at DAQmx read

    Hi i am fairly new to daq in labview,
    i have code which accepts data from 2 devices a PCI 4351 connected to a TBX 68T and PC1 6111S card connected to a SCB68 block. i have uploaded the code.
    when the code is running and then when i press the stop button on the front panel, i get an error of -200279 which is something to do with the daqmx read. I have looked into some other problems that some have faced on this error in this forum, and hence i have tried to increase the rate whilst keeping the number of samples the same but this has done nothing and the same error appears.
    any suggestions will be greatful!
    thanks
    Notay
    Attachments:
    Copy of NI 435x Thermocouple (LEE).vi ‏124 KB

    Well the main problem is you have two different mechanisms to control the speed of your while-loop. First in the upper right hand side of the loop there's a wait until next (100) ms. The second timing method is the read 5 samples in a 1000 Hz stream, this only allows for 20 ms wait time.
    AFter a while your buffer will be full (by the way you don't need to specify the number of samples per channel) and the AI read will generate an error.
    Make sure you end the while loop as soon as the error is generated you don't check inside the while loop which is  a bad thing.
    To avoid this you have to decide how to time your while loop.
    I would set the number of channels to read to -1 (be aware you get 100 samples from the AI read)
    Also replace the 'wait until next ms' with a 'wait ms'
    And check for errors inside the whil e loop
    Ton
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

  • Error -200685 DAQmx Write Counter Frequency

    I have to generate 4 finite pulse trains with Counter Output and a X-series board (NI PCIe-6321). I know that with X-series boards only one counter is used to generate finite pulse train. I use LabVIEW 2010 sp1 and DAQmx 9.3.5.
    One task for each counter is created.
    When only one task runs, everything is ok, but, when more than one task runs, i receive "error -200685: Pulse frequency specified is not supported for this device given the Counter Timebase Rate." from DAQmx Write Counter Frequency. Error reports invalid data&colon; 0,000000
    I have checked data supplied and no zero frequency is passed to the VI. In fact, counter frequencies lower than 100 are forced to be 100 through a previous VI.
    Thanks for the help
    Attachments:
    Error.PNG ‏42 KB
    Zero frequencies avoided.PNG ‏7 KB

    OriginalP ha scritto:
     I payed attention to write non null frequencies and this is why this error sounds so strange to me.
    My last words... i found that two null frequencies (1018 and 1019 array indexes) were passed to Counter Output (see attached images "Counter Output Front Panel Data.PNG" and "Counter Output Block Diagram Data.PNG").
    It's quite strange, because VIs generating pulse train frequency data don't output these two null frequencies (see attached image "Array Output Data.png").
    This pair of null frequencies is random, but definetively the error is not in Counter Output DAQmx Write VI.
    Attachments:
    Counter Output Front Panel Data.png ‏33 KB
    Counter Output Block Diagram Data.PNG ‏21 KB
    Array Output Data.png ‏21 KB

  • Compact DAQ 9215 BNC module -- Error code -200278 occured at DAQmx read

    Hi,
    I am trying to read data from a sensor giving an output between +/- 300mv. It is connected to the 9215 BNC module on the Compact DAQ chassis. When i try to acquire any number of samples at any frequency it comes up with an error message at the end (-200278). I have attached the screenshot of the error message.
    The program displays information in realtime in a waveform chart on the front panel as the  samples are acquired and also writes them onto a lvm file. I have also attached the vi of the program.
    Please help me as i cannot solve this problem. All help will be appreciated.
    Thanks
    Harshil
    Attachments:
    Error Message.jpg ‏29 KB
    Compact DAQ 9215 BNC.vi ‏74 KB

    Hi,
    Thanks for the help. I have tried to use arrays to
    store the data before i write to the file. The problem is when it writes at the
    end, the format changes and i do not get the channel name and the dt
    value (time interval between samples).
    Also if i select more than two channels than i do not get two colums in
    the output file but one column with both the values of the channels one after the other and thus becomes very hard to make where one channel ends the other begins.
    Please help on how to get round this.
    Harshil
    Attachments:
    Compact DAQ 9215 BNC.vi ‏93 KB

  • Unable to measure pulse time, using Counter pulse time 1samp.vi

    Hi
    I am using pci6624 board to measure pulse time . I have selected counter 0 to measure  pulse time & connect the signal to gate0+ & gate0-.
    When i used Counter pulse time 1samp.vi to read the pulse time , i am not able to read the value and i am getting following error msg . If i used Counter DBL 1samp.vi  i am getting out put.
    Please help me
    Attachments:
    pulse_time_measurment.vi ‏11 KB
    Counter_errors.JPG ‏44 KB

    Hi,
    You can try changing the mode to counter -> single sample -> DBL in Daqmx read function
    You can also try this example 'Meas Pulse Width-Buffered-Cont.vi' or related examples from NI Example Finder.
    Cheers,
    Sahil Gupta
    NI India

  • DAQmx non-cumulative buffered edge counting (like the PMT TTL problem) with PCI6221 in C program environment

    I have a PCI-6221. I am programming in C/C++ and DAQmx. My application is much like the previous thread counting the number of asynchronous TTL pulses from a PMT in some user specified time interval. The time interval is typically around 1 msec and the signal rates are around 1-10 kHz. So I expect to count 0 to 10 pulses per timebin. In traditional DAQ this was called Non-cumulative buffered edge counting.
    To get a clock at about 1kHz, I first create an "analogue in" task that samples at 1kHz. The only thing I use this task for is to route its sample clock to the gate of the counter. This defines my time interval as 1 msec.
    I then create the counter task. I am using count edges. So I think counter0 gate = PFI9 and source = PFI8.
    DAQmxCreateCICountEdgesChan(*taskHandle,chan,"",edge,initialCount,countDirection);
    DAQmxCfgSampClkTiming(*taskHandle,clockSource,rate,DAQmx_Val_Rising,DAQmx_Val_ContSamps,samplesPerChan);
    where clockSource="/Dev1/ai/SampleClock"
    I apply my signal to PFI8.
    After starting the task, I read an array of values with
    DAQmxReadCounterU32(taskHandle,samplesToRead,10.0,data,samplesToRead,read,NULL);
    I expect the array data to have values ranging from 0-10 for PMT input with an average rate of about 10 kHz. The trouble is that the array data does not seem to make sense. I get constantly increasing values. For very low input frequency, it just increments by one per array member.
    More troublesome, when I hold PFI8 at ground, so that I expect zero pulses to be counted at the source for each edge at the gate that occur 1 per msec, I get a timeout error. I really must be able to count zero events per bin.
    Am I doing something obviously wrong?

    Hello,
    The behavior of non-cumulative event counting is equivalent to period measurement. Additionally, the timeouts when no edges occur on your event counting terminal are the result of duplicate count prevention. In DAQ 7.4, the default behavior of duplicate count behavior should take care of this for you, but if you cannot upgrade to DAQ 7.4, I'd do a search of the discussion forums for "duplicate count prevention". There are a number of previous posts about this attribute, including this one.
    If you aren't using the second counter on your device, you should be able to use the Period Measurement 2 Counter High Frequency measurement method to get your desired values. The "Measurement Time" attribute in this case would be the "sample clock" (1 kHz in your example). Then just raed the data raw to get counts rather than scaled.
    If you'd like to do it using the AI timing engine. Configure a 1 counter period measurement task, use "clockSource" as your input terminal and use your PMT TTL pulses as the "Counter Timebase Source". Then read the data raw, since the scaling will not be appropriate for your needs.
    I hope this helps!
    gus....

  • How do I read a pulsed input on an SCB-68 counter channel?

    Hello all, I have been searching through the DAQ help and this board
    for a few hours now and I cannot find an answer that addresses what
    should be a simple problem. Let's start with hardware and software: I
    have a 6062E PCMCIA DAQmx card connected to a SCB-68 (E Series)
    connector block. I am running Version 7.1.0.306 of Measurement Studio
    for Visual Studio .NET and am coding in C#. So please, no LabView
    answers.
    I am trying to read the pulsed output of the Omega HHT-1501 Digital
    Tachometer - it outputs a TTL LOW pulse every time the sensor is
    triggered, I would like to read in these pulses and  get the
    frequency to determine RPMs.  As far as I can tell I need to
    connect the pulsed signal line to CTR0, which is PFI9/GPCTR0_GATE on
    the connector block, pin #3. I have verified that the tachometer is
    indeed pulsing correctly. I have used the DAQ Assistant to create a
    DAQmx task to acquire the frequency of a digital signal using the 1
    Counter Low Frequency Measurement method, input range is set from 1Hz
    to 1KHz, starting edge is set to falling. For Task Timing the
    Acquisition Mode is Continuous, Samples to Read = 100.
    When I run the test I get no response. And it also seems that the
    GPCTR0_GATE is always at +5V. I have tried just about every other
    combination of inputs, including using CTR1 on GPCTR1_GATE, pin 41, all
    with the same result - no signal read.
    So what is the problem? Every post or help article I have read makes it
    sound like plug and play to read the pulses but this is not the case -
    does the counter gate need to be configured as an input in either
    software or hardware? Am I supposed to have a signal set on the SOURCE,
    and if so what? And what about my ground line from the pulse source? I
    have tried attachign that to DGND, still no result, and if I attach the
    pulse signal gnd to the GPCTR0_SOURCE it causes my tachometer to lock
    up.
    This thread
    http://forums.ni.com/ni/board/message?board.id=170&message.id=34826&query.id=3937#M34826
    seems to be very closely related to what I want to do but is as vague
    as the help articles - it mentions using one of the two timebases as
    the source input - what does this mean in terms of code/wiring?
    Additionally in the NI-DAQmx help article under Device
    Considerations->Counter Signal Connections->AO/E/S Series it says
    "The count direction terminal must be tristated to use an external
    signal. Reset the device to ensure the terminal is tristated" for edge
    counting. A) Is this related? and B) how does one tristate by reset?
    Power cycling the scb-68 has no apparent effect on anything.
    I would appreciate any help on this matter, hopefully with as much
    detail as possible since the help manuals seem to be mostly useless for
    guiding one in performing any task.
    Thanks!
                       J. Slater

    Hi Shyam,
    The major factor that would come into play with the signal having some noise is that the counter is expecting a TTL signal and the oscilloscope is measuring an analog input signal. If your signal floats above the TTL thresholds or does not rise/fall within the specifications, the behavior is not predictable and it can be measured as a high or low by the counter. An oscilloscope will measure the analog signal and you may be able to measure the frequency of the noise on your scope by analyzing a smaller timeframe of the signal.
    What Is the Definition of a TTL (Transistor-Transistor Logic) Compatible Signal?
    http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/acb4bd7550c4374c86256bfb0067a4bd
    Steve B

  • DAQmx: Numerical indicators go blank intermittently using DAQmx Read

    Hello everyone,
    I was wondering if anyone else has ever fought this issue and won.  I have a loop (I will attempt to attach an image of the block diagram) which performs a DAQmx Read operation.  The loop employs a 200 millisecond wait.  The loop scales the data, sends all of the values to little indicators in an array, picks out a few critical values to display on duplicate large indicators, and optionally logs the data by streaming it to disk.  The task will usually (99.9% of the time) be run at 100Hz.  So, I was figuring I could do a "Read All", since at 200 ms of wait time due to the millisecond multiple wait function, I should always have around 20 points to read in the buffer the next time around.  This would allow me to have very current readings in my displays.  I could do a partial read, but then I figure I would have a lag between the displayed values and the reality of what's going on in the test.  Having current readings, as current as can be, is highly desirable for this application.
    I figured everything was good with what I was doing, especially when I tested it with a simulated device (I know a simulated device behaves much differently than a real device, especially at start up).  Everything seemed to work well.  When I go to the real hardware, though, I intermittently get blank indicators.  Actually, it is more like intermittent numbers in my indicators.  Most of the time, the DAQmx Read operation returns a null, empty array (no data available in the buffer).  I must be missing something, because I figured that a 200 ms wait would allow another 20 samples to be collected.
    If someone could please just ease my conscience and let me know that I haven't done something very fundamentally wrong in this code, even if you couldn't help me with a solution, I would very much appreciate it.  I feel that this code should work, keeping data in the indicators at all times, and don't know why it doesn't work.  If you could offer me the solution, even if it is to point out that I did something very wrong, I would much appreciate it.
    I am just writing this code, and still have some icons to make, so the sub VI's still have the default icons.  Sorry about that.  Basically all those do is get array subsets, or scale data, or write data to the data files.  If you need to ask questions about the code, I can understand.  I am not the greatest yet at writing self documenting code yet.  And if you need to know what that event structure does, it watches the two boolean button controls to determine what state in the state machine to go to next, and the time out case of the event structure highlights a data value if it goes out of bounds.
    Sorry if I am too wordy.  I have been accused of that before.  I just notice a lot of "Help!  DAQ doesn't work.  How do I fix?" posts, and I don't see how I or anyone else could help that person at all.
    I am using LV8.2, with DAQmx 8.3.1, on Windows XP, 1GB of RAM, and a fairly healthy Duo core processor.  I have a workaround where I throttle back the read operation, only reading 55% of the available samples, as reported by a DAQmx Read property node (the highest percentage I found that prevents the indicators from going blank).  This introduces a small lag between the real world and the data on display, however.  Also, it seems like a processor dependent solution.  I would have to tweak this percentage for every machine I run this on.
    If I have left anything important out, please let me know, and I will do my best to clarify, and thank to anyone who reads this, and a big thank you to anyone who takes the time to reply.  Again, I would be real happy with a "That code looks good to me, and your thinking is correct", if that indeed is the case.
    Thanks.
    Attachments:
    Log Monitor Block.JPG ‏292 KB

    Yeah, as you and Erik said, just specifying (Sample Rate / 5) as the '# to read' could do the trick.  Then you can ditch the 'Wait (msec multiple)' function.  I don't think I'd recommend the -1 = infinite timeout though.  I'm pretty leery of stuff that can lead to an infinite wait or an infinite loop.  Even a 1 sec timeout should easily be way more than enough.  Note however that this method depends on all your processing code executing in under 200 msec on average.  Otherwise, your reads will fall behind and you'll eventually get a DAQ buffer overflow error.  My earlier suggestion to first query for # available samples and then read the MAX of (# available, SampleRate/5) will prevent cumulative fall-behind effects.
    There's too many unknowns to speculate with any confidence on exactly why the software timing method didn't work.   I can point out some additional things that bear greater scrutiny though.
    1. You've got some sort of function dealing with file streaming that takes a path input and produces a path output.  This probably means that every loop iteration you're using the path to open a file, write data, and close the file again.  This actually may consume more than 200 msec, at least some of the time.  Because this runs in parallel with the msec wait function, something like the following could be happening:
    A. Iteration 1 proceeds as expected.  The DAQ read collects 20 samples, the file write consumes only 100 msec, and the wait msec function ends after 160 msec in order to end on a 200 msec multiple.  The wait function took longest, so your whole loop ends on a 200 msec multiple.
    B. On iteration 2, the wait msec function ends after 200 msec on the next 200 msec multiple.  The DAQ read collects another 20 samples (because it's been pretty much exactly 200 msec since the previous loop iteration started) right away.  However, Windows was busy messing with the file cache so this time your file write consumes 375 msec.  The file function took longest so your whole loop ends 175 msec into the next 200 msec multiple.
    C. On iteration 3, the wait msec function ends after 25 msec on the next 200 msec multiple.  The DAQ read collects 37 samples that have come in since the prior call 375 msec ago.  The file function consumes only 50 msec this time, ending the loop 25 msec into the next 200 msec multiple.
    D. On iteration 4, the wait msec function ends after 175 msec at the next 200 msec multiple.  The DAQ read collects the 5 samples that have come in since the prior call 50 msec ago.  Uh oh, not enough samples...
    One possible fix is to open the file outside the loop and leave it open until after the loop is done.  Opening and closing files has quite a lot of overhead.  Inside the loop, you'd be passing around the file refnum.  Doing this one thing alone might also be a way to fix your timing problem.  Along similar lines, you could write the data to a queue and then do your file writes in an independent loop that reads the data out of the queue.  You can search here for "producer consumer" for more info.
    -Kevin P.

  • 200560 timeout error using DAQmx

    I had 2 separate DAQmx tasks working concurrently on the same block diagram.  The two tasks were not triggered, but both were starting at roughly the same time, give or take a few samples.
    Next, I wanted to clean up my work and make 2 separate sub VI's from the 2 tasks on my block diagram.  So I coppied on block of code to a new VI and deleted that block of code from the original block diagram.  Now, the task onr the original block diagram gets error 200560 when I try to run it.  Specifically, the error message reads: "200560 occurred at DAQmx Wait Until Done.vi.  Possible reason - Measurements: Wait Until Done did not indicate that the task was done within the specified timeout".  The timeout was set for 10s.
    I replaced the block of code for the task that was moved and everything ran fine as before. 
    When I single-stepped through the code, I noticed that the second task started before the first task was done.  This led me to suspect some sort of timing issue.  I tried to induce a wait state by inserting a for loop with a 500 ms delay, but it did no good.
    Any ideas?

    For my application, I'm trying to energize a solenoid coil with a 12V pulse, while at the same time, making an acceleration measurement.  I'm generating the 12V pulse with the 9472 in slot 4 of the compact daq chassis.  I'm making the acceleration measurement with the 9233 in slot 1. 
    If you look at the attached VI, write pulse with internal counter_12_11_08.vi, you will see code for the pulse generation at the top of the block diagram and code for the acceleration measurement at the bottem.  If I delete the code for the acceleration measurement, the code for the pulse generation hangs up.
    Attachments:
    write pulse with internal counter_12_11_08.vi ‏33 KB
    Build Pulse Array.vi ‏19 KB

Maybe you are looking for

  • Testing 4x E5-4650s and 128GB RAM - tweaks for 32-core performance?

    Howdy. I've got the following system: 4x E5-4650 eight core CPUs (32 cores/64 HTs total) 16x 8GB EEC RAM - 4 sticks per CPU 2x 512GB Samsung 840 Pro SSDs 5x 3TB Hitachi HDDs in RAID5 1x GTX 670 w/ 4GB RAM Windows Server 2012 When I'm exporting 1080p

  • Runtime Error While executing the WebDynpro Application

    I am getting the Runtime Error While executing the WebDynpro Application. The error message is "TSV_TNEW_OCCURS_NO_ROLL_MEMORY". It says like " Short text     No roll storage space of length 9728 available for OCCURS area. What happened?     Each tra

  • Create table more than 1000 colum

    Hello I have 1500+ column in my select query. how to create table like my query is create table xyz nologging as select a1,a2,a3,a4,a5,b1,b2,b3,b4,b5,................a1500 from abcd a,bcde b where a.a1=b.b1 In oracle 10g I can create only 1000 column

  • I am getting an error message,

    The error message is The Adobe Acrobat/Reader selected for viewing PDF documents in browsers cannot be found at its installed location; it may have been moved or deleted.  Please reinstall or repair te application.  15.524    I just installed the Rea

  • How to make "Remove" being enabled in menu?

    Dear All, Just a simple top question, how to make "Remove" being enabled in Edit Menu? I couldn't find any UID on it. You could find it out under "First Record, Previous, Next and Last". Thanks in advance! Jemmy