Error -200284

pxi-6123 use  pxi-6653 ocxo  and star trigger    
I want to synchronization pxi-6123 with star trigger and Pxi_trigger2(or other pxi_trigger) from pxi-6653 .But there is error.Can somebody help me? thanks.
pxi-1042
slot 1 pxi-8108
slot 2 pxi-6653
slot 3----slot 8  pxi-6123
Attachments:
OCXC route zz.vi ‏41 KB

Attachments:
error -200284.JPG ‏172 KB

Similar Messages

  • Error-200284 for PXI-1010 MXI-3 fiberoptic connection to a PXI-6533.

    In the instruction lab in which I work, we have two types of systems:
    1)SCXI-1000 chassis connected by copper to a PXI-6035E card in a PC.
    2)PXI-1010 chassis connected by fiberoptic from a MXI-3 to a PXI-6030E card in a PC.  A PXI-6533 handles the digital I/O.
    We have LabVIEW8.5.1 running on both types of systems.  On the SCXI-1000 system, the LabView example Acq&GraphVoltage-IntClk-DigStart.vi runs just fine.  It does not run on the PXI-1010 systems.  Instead, I eventually get Error-200284.  In both cases we use PFI0 or PFI1, and digital ground, for the triggers, connected to lines 38, 39, and 33, respectively, in the SCXI-1302 terminal block, which connects to an SCXI-1180 feedthrough panel.
    I searched the forums and all ni.com for information on this problem, and have not been able to find any relevant information.
    Joseph D. Rudmin

    Hi Joseph,
    I think I'm starting to understand the problem you are having. Unfortunately, since on a SCXI module, all channels are generally multiplexed through AI0, the PXI/SCXI backplane only shares the necessary channels i.e. one AI channel and any required timing signals. Therefore, even if though you are using the SCXI-1180 module with a SCXI-1349 communicating adapter, you will not be able to access the other channels on your PXI-6030E since there is no physical connections being made to those channels in the backplane. There are 2 solutions around this problem:
    1. You can use an SCXI-1349 cable assembly to connect the front of the PXI-6030E module to the back of the SCXI-1349 adapter. This way the unused pins on the DAQ module can be accessed through the SCXI-1180.
    2. You can decide not to use the SCXI-1180 and simply use a standard 68-pin terminal block with your PXI-6030E and connect your 5V sync pulse to the PFI pins. This will still allow you to sample off of the SCXI-1100 since those channels are connected via the backplane.
    Here's a link to our online KnowledgeBase article which talks about this issue. 
    Can I Connect The SCXI-1180 To An SCXI Module In A PXI-1010 To Use The Additional Analog Input Chann...
    Please let me know if this answers your question.
    S_Hong
    National Instruments
    Applications Engineer

  • Error -200284, Behaviour in Execution Highlighting and Runtime Speed

    Hi
    I am having trouble with the attached VI.
    This VI reads a voltage on ai26 and it works fine if
    1) the wait in the flat sequence is 2000 milliseconds or more and execution highlighting is turned off
    or
    2) the wait in the flat sequence is zero or more and execution highlighting is turned on.
    LV reports error -200284 if I try executing 2) at runtime speed (execution highlighting turned off, wait=0). Is there a solution to change the VI in a way that the use of a wait is not necessary?
    I already checked the LV examples and it seems that the examples (on my hardware) suffer the same problem.
    Description of my task:
    I need to sample the voltage at 2000 Samples/sec. Signal observation must be 5 sec, that makes 10000 Samples in the end. No trigger needed. The USB-6259 has a buffer of length 4095 but this is not my problem since I will be doing the acquisition (with 2000 sample chunks) in the producer- and the analysis in the consumer-loop.
    My Hardware:
    I am using USB-6259, LV 8.2 and DAQmx 8.6 on a Windows 2000 Machine.
    Best regards
    Thomas
    Attachments:
    Read Analog Wfm.vi ‏34 KB

    In the attachment is the corrected VI without a wait.
    If I run this corrected VI at runtime speed, I get error -200284.
    If I place a breakpoint between the DAQmx Start and Read Task and run this VI (I will have to push the Continue-Button for the VI to finish), there will be no error.
    Why that behaviour?
    Thomas
    Attachments:
    Read Analog Wfm Correct.vi ‏32 KB

  • Please help me on error -200284 for usb6008 data A/D

    Hi,
    I am working on the A/D using usb6008, I program in visual c++.  I create a dialog to test the function of sample program: contAcquireNChan.c               in  NI-DAQmx Base.  I just changed the mode to DAQmx_Val_FiniteSamps and each time I just want to get several data. I used a button to start the a/d. The following is the code. The problem is very strange that while I click the start button for the sixth time, this error -200284 will occur when calling this function:
     DAQmxErrChk (DAQmxBaseReadAnalogF64taskHandle,pointsToRead,timeout,DAQmx_Val_GroupByScanNumber,data,2,&pointsRead,NULL));
    The discription of this error is:
    "Some or all of the samples requested have not yet been acquired.
    To wait for the samples to become available use a longer read timeout or read later in your program. To make the samples available sooner, increase the sample rate."
    I do not know what happened. And how to solve this problem. Please help me.
    The following is the code:
    void CBTTest001Dlg:nStart()
       // Task parameters
        int32       error = 0;
        TaskHandle  taskHandle = 0;
        char        errBuff[2048]={'\0'};
        time_t      startTime;
        bool32      done=0;
        // Channel parameters
        char        chan[] = "Dev1/ai0";
        float64     min = -10.0;
        float64     max = 10.0;
        // Timing parameters
        char        clockSource[] = "OnboardClock";
        uInt64      samplesPerChan = 2;
        float64     sampleRate = 2000.0;
        // Data read parameters
        #define     bufferSize (uInt32)1000
        float64     data[bufferSize * 5];
        int32       pointsToRead = bufferSize;
        int32       pointsRead;
        float64     timeout = 10.0;
        int32       totalRead = 0;
     index++;
     if(index==6)
        int a =0;
     m_bWorkFlag = true; 
      double a1= data[0];
      double a2= data[1];
      double a3= data[2];
      double a4= data[3];
      DAQmxErrChk (DAQmxBaseCreateTask("",&taskHandle));
      DAQmxErrChk (DAQmxBaseCreateAIVoltageChan(taskHandle,chan,"",DAQmx_Val_RSE,min,max,DAQmx_Val_Volts,NULL));
      DAQmxErrChk (DAQmxBaseCfgSampClkTiming(taskHandle,clockSource,sampleRate,DAQmx_Val_Rising,DAQmx_Val_FiniteSamps,samplesPerChan));
      DAQmxErrChk (DAQmxBaseCfgInputBuffer(taskHandle,2000)); //use a 100,000 sample DMA buffer
      DAQmxErrChk (DAQmxBaseStartTask(taskHandle));
      DAQmxErrChk (DAQmxBaseReadAnalogF64(taskHandle,pointsToRead,timeout,DAQmx_Val_GroupByScanNumber,data,2,&pointsRead,NULL));
     //    printf("\nAcquired %d total samples.\n",totalRead);
      m_fAnalog1 = data[0];
      m_fAnalog2 = data[1];
      m_fAnalog3 = data[2];
      m_fAnalog4 = data[3];
      m_fAnalog5 = data[4];
      UpdateData(false);
      if(taskHandle != 0) {
    //   DAQmxBaseStopTask (taskHandle);
       DAQmxBaseClearTask (taskHandle);
     return;
    Error:
        if( DAQmxFailed(error) )
            DAQmxBaseGetExtendedErrorInfo(errBuff,2048);
        if( DAQmxFailed(error) )
            printf("DAQmxBase Error: %s\n",errBuff);

    Dear Neal,
    Thank you so much !!
    "DAQmx Base was designed for use on operating systems other than Windows". Maybe that's the reason why I always met problems.  I am using windows now !! The only reason for me to use DAQmx Base is that it comes with the USB6008 device so that I think NI recommend to use it ! I also downloaded DAQmx from NI but I did not tried it (in fact it took me several hours to switch the firmware back to DAQmx Base ). I will try It now and tell you the result.
    "You say that you thought you solved the issue but did you not?"
    Yes.
    " Did you add the stop task function before and that is what you thought solved the issue? "
    Yes.
    I started from the example and do some modifications. First I met -200284 error and I found it is the caused by wrong number of data to be read. I changed to finite namber data read.
    Then I met sixth reading problem, at that time I use a button clicking to read the data.when I read for the sixth time, It will occur (I forgot the phenomena). I added a  stop task function and I thoought I solved the problem. I knew for a finite number data reading, stop function is not needed, but I do not have any other method so I tried it. "sixth reading problem" solved, but When I move the data reading function to ontimer function recently. The program will halt -- take 99% of CPU time after 30 second of reading (sometime several minutes, sometimes several seconds). If I move the start task back to OnInitialUpdate() function and cancel stop function, halt error will not occur but the data I read in not correct. That is the whole thing. The following is the code relative to the data read.
    Initialization;
    void Ctest2Dlg:nInitialUpdate()
       DAQmxErrChk (DAQmxBaseCreateTask("",&taskHandle));
      DAQmxErrChk (DAQmxBaseCreateAIVoltageChan(taskHandle,chan,"",DAQmx_Val_RSE,min,max,DAQmx_Val_Volts,NULL));
      DAQmxErrChk (DAQmxBaseCfgSampClkTiming(taskHandle,clockSource,sampleRate,DAQmx_Val_Rising,DAQmx_Val_ContSamps ,samplesPerChan));
    Data read
    void Ctest2Dlg:nTimer(UINT nIDEvent)
      if(taskHandle != 0)
         DAQmxErrChk (DAQmxBaseStartTask(taskHandle));
       DAQmxErrChk (DAQmxBaseReadAnalogF64(taskHandle,pointsToRead,timeout,DAQmx_Val_GroupByScanNumber,data,100,&pointsRead,NULL));
       DAQmxBaseStopTask (taskHandle);

  • Error-200284 with DAQmx

    Hello,
    I am trying to make a continuous reading of analogvoltage signal with DAQPad-6015/6016 using sampling rate of 1000 and number of sample=1000 but the DAQmx is showing 
    Error-200284 saying that the some or all samples requested have not yet been acquired.
    The vi is attached and the images showing the settings of the DAQmx,error mesaage are also attached.
    Can I know to solve this error.
    Thanks.
    Solved!
    Go to Solution.
    Attachments:
    DAQmx_settings.JPG ‏113 KB
    DAQ_method2_error.JPG ‏101 KB
    DAQ_method2.vi ‏22 KB

    John_P1 thanks for your suggestion.
    I will explain a bit clearly of what I am trying to do
    I am trying to use an example vi for adaptive filtering using least mean square but I am confused in modifying the example as per my requirements of
    1)for the first 1 sec acquired samples I want to filter this signal and want to feed this filtered signal as reference signal d(n) and acquired signal as x(n) to adaptive filtering block
    2)After first 1 sec the adaptive filtering vi produces two outputs e(n) and d'(n) .In which the e(n) should be feeded back as input d(n) to the adaptive filtering block and d'(n) is my filtered(required) signal
    This feeding of acquired signal for 1 sec interval as x(n) and the previous noise reference=e(n) as other input as d(n) to the adaptive filtering block should be a continuous process.
    can you help me out in modifying the example vi of filtering as per my requirements.
    Attachments:
    LMS block by block (example).zip ‏76 KB

  • What is error 200284 with counting ticks?

    Hi,
    I am trying to write a VI that will count ticks of a rotating encoder wheel. I was able to run the test panel in MAX and count total ticks during rotation with no problem.
    Next, I tried writing a VI that would do the same, but, I am getting errors that I do not understand, especially,  " 200284, Some or all of the samples requested have not yet been acquired."  It also tells me to supply an external clock...how do you do that, and how do you know which external clock is the correct one?  I tried many clock options, but, continue to get this error...
    Ultimately, I would like to have a VI that counts ticks per unit time, e.g. ticks/100ms etc.  For now, I am trying just to get it to count total ticks, and I am stuck here.  Really stuck.
    I am using cDAQ 9174 and NI 9401.
    Thanks!!!  Please help!!!
    Dave
    Attachments:
    forum_april_11.vi ‏21 KB

    Hi dav2010,
    An explanation of error -200284 can be found here. Furthermore, I would recommend starting from a shipping example, when developing your counter measurement task. Lastly, the NI cDAQ-917x User Manual contains information about the various counter input applications, starting on page 5-3.
    The default sample mode for the DAQmx Timing.vi is Finite. The sample clock for the counter task(s) may be set to Continuous but if the sample clock is not set to Continuous it is set to the default value (Finite). When the sample clock is set to finite without the samples per channel wired, it will set a default buffer size based on the rate. Once the buffer is full the sample clock stops and the counter task stops latching the counts because the clock source has stopped. The counter task(s) which are set to continuous will continue expecting more clock edges but will timeout giving error 200284 when it doesn't receive any more. Setting the sample clock source to Continuous will allow the clock to continue providing clock edges for the buffered counting task(s).
    Tunde S.
    Applications Engineer
    National Instruments

  • Error 200284 keep showing up with DAQmx/USB6259

    This error of 200284 has been persistantly showing up in my high speed data acqusition using DAQmx Read with USB6259 running LV8.5.1 and DAQmx 8.7.1.  I tried most of the approaches discussed on this forrum regarding this error such as increasing time out and sample rate, but still getting it. I stripped down the application that I recently took over and attached the basic vi..please voice any suggestions, thoughts, solutions, and comments, I really would like to see this code work out as it is our basic stuff.  many thanks in advance. 
    A little more detail...the original code (and this striped down version) would run for a minute or so with the loop index getting to over 20k, or 40k..but most likely stop before 60k with unpredictable numbers...thanks again for taking a look at the vi.
    Bryan 
    Message Edited by BryanL on 02-15-2009 02:26 PM
    Attachments:
    SampleVI.vi ‏75 KB

    Hi Doug,
    First thank you so much for the help and support.  I went to restart the NI variable engine and disabled the ZoneAlarm and firmwall, the variable engin now runs and not stopped, but the VI still stopps with the error 200284. Anythings else you think might be the issue here?  I really need to get this thing working as I have been on it for a few days now...please help.  Thanks again.  I have also copy and paste my post and that of Dansch here to give more background info:
    Hi Dansch,
    Thank you for looking into this issue!  I have compiled a reply to your comments and questions in the following quoted message: 
    dansch wrote:
    Hi Bryan,
    I
    took a look at your code, and after modifying the analog output
    channel, I was able to run it fine for a very long time on a PCI-6251
    board without any errors.
    Our
    original code also runs ok with our PCI boards, only after we switch to
    USB then we have this problem of error 200284 stopping the acquisition.
    The code also runs ok on one laptop with older USB (XP service pack 1),
    the two laptops with newer USB2.0 always have problems with error
    200284 on one and 200279 on the other(XP Service Pack 3).  I am trying
    to get the one with 200284 to work.
    One
    thing that I am interested in is the analog output task that you are
    referencing, since I am unable to see what type of setup you have
    configured for this channel. I am interested in knowing why the analog
    input task is using the ao/sampleclock as the source for its sample
    clock rather than the other way around (ao channel using the
    ai/sampleclock).
    The
    was not clear about the logic of the triggering setup of the
    initialization step, however, the analog output task used the task
    input setup from MAX, this also triggers the timing on the analog
    input.  The output chain is for running a light source with a wave form
    generated by a separated VI using the waveform parameters as shown on
    the front panel of my attached SampleVI.  This source runs
    continuesouly with the same waveform  function.  The input chain reads
    a detector contineously as DAQmx Read was put into the while loop. The
    start of the output waveform was triggered by the input chain so that
    the light source and data acquisition are synchronized.   We never had
    problem to start the data acquisition as we always read the correct
    waveform back.  The error seem to alway came from the DAQmx Read
    function in the while loop as the code on the left side of the while
    loop onlys runs once, while the while loop will keeping running, until
    it stops a minute or so later by the error 200284.
    Usually,
    when this type of -200284 error occurs, it is due to a problem with not
    receiving a trigger or sample clock edges. Perhaps something is
    happening to the analog output task that is affecting the analog input
    channel since it is using the ao/sampleclock.
    I will check further on the output task setup in MAX..if this is the issue, what is the recommended setup for the output task? 
    A
    couple of other things I would like to know more about are why you are
    reading just a single sample each loop iteration and also what your
    application involves since I noticed the program samples numerous times
    on the first channel for each single sample on the others. What overall
    rate are you trying to accomplish as well? Please let me know if you
    have any additional insight into your application. Regards,
    I
    was only reading a single sample for the demo purpose as it generates
    similar error as in the original application where we read all
    channels. The first channel is where the detector response are read and
    are accessed at the highest frequency.  That is why we build 992
    instances for this channel and leave the other 8 channels to read some
    other environmental parameters which happens at a less frequent time.
    This allows us to keep data acquisition going without restart other
    tasks. This was recommended by an NI engineer earlier to another
    enginer here and was work fine. 
    The following are some of our input parameters:
    On
    the Outuput side:  Waveform Scan Rate or Frequency (Hz): 1000    Number
    of Points in Waveform is 1000,  Waveform Update Rate is: 1000000/s,
    this final rate goes to output timing VI 
    On
    the Input side:      Number of Sample Spectrum (total numb. of
    channels) 1000.  Number slow channels: 8.   Input sample rate:
    1000000(Hz). This rate/1000=1000/s goes to the input timing VI 
    Please
    let me know if you need more info, if you do not mind, could you please
    send me a number and best time to call?  Many thanks.
    Bryan

  • Error -200284 not responding well to suggested fixes

    I get error -200284 when running labVIEW to acquire voltages.  Your suggested fixes are disabling the timeout feature (which makes the program just sit there and do nothing) or increase the sampling rate (I was using 1.5 kHz, and when I increase it to 10kHz, it will take 6 seconds of data, display it, pause, and take 6 more seconds of data and repeat rather than just continually sampling like it should).  Any ideas?

    It sounds like you probably have the correlation between the Sample Rate and Number of Samples setup incorrectly. Normally you want to keep this at a 10:1 ratio of Rate to Samples on a Continuous Acquisition.
    If you are sampling at 10kHz and it takes 6 seconds to returns data, you must have the Number of Samples set to 60,000? At 10kHz, you're getting 10,000 samples per second. If you had this same Number of Samples with a rate of 1.5kHz, it would take 40 seconds to acquire 60,000 samples. That's why you are getting the error. So if you follow the 10:1 rule, at 10kHz, getting 1000 samples would 100ms.
    The Number of Samples input specifies how many samples to acquire each time the Read vi runs. Normally for a continuous acquisition you acquire a small number of sample per loop iteration.
    Does that help at all?
    Ed
    Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
    Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.

  • Error 200284-DAQmx Analog trigger

    Hi,
    I am trying to start data acquisition (e.g. input channels ai6 to ai10) and save it to a file based on an analog input voltage signal change (acquire whenever ai6 >2 Volts) that will work as a trigger.
    I also found an example that is pretty similar to this (attached). The trigger source in my case is the first analog input channel. Following the attached example, I am always getting the error code 200284 after running the vi. Basically it gives the error after the specified timeout.
    I am using PCI-6289, but the problem is I cannot use any PFI lines for the voltage trigger and have to use ai channels only for trigger.
    Can't figure out what is wrong. 
    Any help is highly appreciated. 
    Thanks,
    Roy
    Attachments:
    cont_acq_volt_analog_start.vi ‏79 KB
    cont_acq_volt_analog_start.vi ‏79 KB

    Yes, you must use a digital channel as your trigger source because it has a different clock.  Remember, something has to activate your trigger!  For instance, let's say you want to use PFI0 as your trigger...when PFI0 goes high, start collecting data.
    How do you plan to control when PFI0 goes high?
    It can be an external trigger.  It can be another, digital, DAQmx task, where the DO line is hard-wired to PFI0.  But something has to cause PFI0 to go high, in order to trigger your task.
    Since you can only have a single AI task, since there's only one AI clock, you have no way of ever generating a trigger.  You won't start acquiring until you receive a specific signal on an AI channel, but you won't receive that signal until you start acquiring.  See why it's a no-go?
    So you want to acquire for 3 seconds after getting a signal on ai6 that's >2V.  So let's think this through, ok?
    If we set our task to finite samples, and we set our number of samples to 3000, what will happen?
    We'll acquire 3000 samples.  Right?  Right!  If our acquisition rate is set to 1kHz, it will take 3 seconds to acquire those samples.
    While we are acquiring those 3000 samples, we may (or may not!) see ai6 go over 2V.  Let's say we see ai6 read >2V after 2 seconds -- that is, our second loop iteration.  Since we've set our # of samples to acquire at 3000, we've already acquired 2000 samples (assuming a 1kHz sample rate).  That leaves us 1000 samples until our task expects to terminate (after which, you'll get an error).  That's not 3 seconds worth of data, is it?
    What if ai6 never goes >2V within our 3000 sample window?  Now you haven't collected anything, and your task will throw an error if you try to collect beyond 3000 samples.
    So no, setting our samples to finite and specifying the collection of 3000 samples isn't going to work, is it?  Clearly not.  That's 3 seconds' worth of data, all right, but it may not be the right 3 seconds' worth of data.  Since you don't know when ai6 will be >2V, you need to continuously acquire samples.
    Do you suppose we could do something with keeping track of time?  Specifically, the time at which >2V was detected?  Compared to the current time?  And take action based on that?  The logic for your case structure will become slightly more complex.
    Do you know about shift registers?  I'm not trying to be insulting, you said you were new and I'm not 100% sure of how new you are.  :-) 
    You seriously do need to take your Write to File out of your DAQ loop...please look into producer-consumers, or you'll be right back on this forum asking us about buffer overflow errors.  :-)  Also, beware of the Write to Measurement File Express VI...you don't have a file path wired in the code you showed, so it's going to pop up a dialog box every time it's called, asking for a file path.
    If you really want to learn LabVIEW, you will get rid of all Express VIs in your code.  At the very least, you need to understand exactly what they do and how they work.  Writing code that you don't understand is only going to cause problems later

  • How can I change the message for an error and then cancel it

    Hi everyone.
    I am currently developing an application where I have to use a trigger (DAQmx). Now it can happen, that the user (who will operate the device later on) can activate the trigger without a valid source. After a timeout, he will get a quite strange message stating he either might want to wait longer (Error -200284 occurred at DAQmx Read). I would like to redefine this error.
    So if this error number appears, he should get a message saying: "Your request couldn't be executed, since no valid trigger signal was found".
    How would I do this .. Thanks for help

    Hi Somnatic
    There are different ways. As you describe it, you'd like to cancel the occuring error (-200284) and show another message. I attach a vi with a view ways.
    Hope this helps.
    Thomas
    Using LV8.0
    Don't be afraid to rate a good answer...
    Attachments:
    ClearError.vi ‏80 KB

  • Why do I get SVFA Power Spectrum error?

    Hello,
    I'm having trouble with acquiring sound data from a microphone using the PCI-4474 and the DAQ Assistant and analyzing with the Sound & Vibration toolkit in LabVIEW 8.5.1. Every so often, I'm getting the following error from the Power Spectrum Express VI:
    Error -1931 occurred at SVFA Power Spectrum (1 Ch).vi:4
    Possible reason(s):
    Sound & Vibration:  The number of samples should be greater than 0.
    One time I also got error -200284 at the DAQ Assistant VI. I know that normally means a timeout issue, but it shouldn't be timing out because I'm acquiring 299 samples @ 60 kS/s, and the timeout is set to 11 seconds. I don't think it's a trigger issue either because the problem only happens occasionally, at somewhat random times, and I'm not using an external trigger.
    What really stumps me is that I don't get this error every time, and if I click Continue on the error dialogs, it seems to return to normal, at least for a while.
    Any suggestions would be greatly appreciated.
    Thanks!
    David

    Hi PBear,
    Thanks for replying. I probably should have explained better. The reason I was trying to take a sample of data smaller than 0.8 ms is because of the method I was using to calculate the exact duration of the beep. For each set of samples, I used the SVL AC & DC Level VI to calculate the signal level, then if it was above a threshold I captured a time stamp. During each subsequent iteration of the while loop, I would keep thresholding the signal and capturing a time stamp until the signal fell below the threshold, at which point I would collect a final time stamp and subtract the first time stamp from it to get the duration. This method works, but it's only accurate to the duration of the samples collected (maybe not even that). I'm sure there's a better method but that was the only way I could think of at the time. Anyway, that's what I meant by time resolution -- resolving the duration of the beep. I didn't mean the actual time resolution of signal acquisition; I know that depends only on the sampling rate.
    Hopefully now I've explained it more clearly and you can see my dilemma. You're right, if I sampled at 200 kS/s, I would have a data point every 5 µs. The problem is, I need a signal level (i.e. RMS value), not just one data point. And I need RMS values in high enough time resolution that I can verify the duration of the beep to within 0.8 ms. That's why I was trying to run my acquisition loop so often, because I only get one RMS value for each loop iteration. That sounds like a pretty inefficient method, though. Is there a way to capture more data points per iteration but somehow chop them up into smaller groups in real time and get more RMS values per iteration? And then how would I know my time stamps are accurate? (Am I anywhere in the ballpark?)
    Thanks for your suggestion on the DAQ Assistant. I'll see what I can do there -- maybe that will eliminate some of the extra noise.
    Below I've posted the latest version of my VI -- it's a little cleaner than the one I posted yesterday. Take a look at it and maybe my explanation will make a little more sense.
    Thanks,
    David
    Attachments:
    test20080627.vi ‏447 KB

  • Freuqency measurement error

    Hi.
    I have a VI which records 4 frequency channels for an NI9411 and outputs an anologue 0-5V channel. This works great apart from when there is no frequency siganl present.
    When my rig is first powered up there are no frequency signals present and after about 10 seconds I get the attached error message.
    Is it possible to modify the Vi (attached) so I do not get this error in the future? I can not guarantee that there will always be a frequency signal present.
    Solved!
    Go to Solution.
    Attachments:
    Queue - MeasureFreqandGraphSpeed.vi ‏55 KB
    Error 02-01-2014.png ‏26 KB

    r.youden wrote:
    Hi.
    I have a VI which records 4 frequency channels for an NI9411 and outputs an anologue 0-5V channel. This works great apart from when there is no frequency siganl present.
    When my rig is first powered up there are no frequency signals present and after about 10 seconds I get the attached error message.  -200284
    Is it possible to modify the Vi (attached) so I do not get this error in the future? I can not guarantee that there will always be a frequency signal present.
    Since you know error -200284 means signal not present IN THIS CASE. handle the error!  If error in  -200284 then error out =F and set freq to 0
    Jeff

  • USB 6009 Python Control

     Hello, 
    I am attempting to use python (with ctypes) to control my USB-6009.  The goal is to write out an analog voltage and then read in the voltage through an analog input with ability to change the number of points averaged and the number of times this is repeated(sweeps) averaging the analog input array.  The issue is that as we increase the number of times the voltage ramp is repeated (sweeps) we get a time out error (nidaq call failed with error -200284: 'Some or all of the samples requested have not yet been acquired).  This has us confused because the sweeps are in a larger loop and the Daq function should be the same if there are 10 sweeps (works) or 1000 sweeps (crashes).  Any insight would be greatly appreciated.  I have included the code below for reference.  
    import ctypes
    import numpy
    from time import *
    from operator import add
    nidaq = ctypes.windll.nicaiu # load the DLL
    # Setup some typedefs and constants
    # to correspond with values in
    # C:\Program Files\National Instruments\NI-DAQ\DAQmx ANSI C Dev\include\NIDAQmx.h
    # Scan Settings
    aoDevice = "Dev2/ao0"
    aiDevice = "Dev2/ai0"
    NumAvgPts = 10
    NumSweeps = 50
    NumSpecPts = 100
    filename = '12Feb15_CO2 Test_12.txt'
    Readrate = 40000.0
    Samplerate = 1000
    StartVolt = 0.01
    FinalVolt = 1.01
    voltInc = (FinalVolt - StartVolt)/NumSpecPts
    # the typedefs
    int32 = ctypes.c_long
    uInt32 = ctypes.c_ulong
    uInt64 = ctypes.c_ulonglong
    float64 = ctypes.c_double
    TaskHandle = uInt32
    # the constants
    DAQmx_Val_Cfg_Default = int32(-1)
    DAQmx_Val_Volts = 10348
    DAQmx_Val_Rising = 10280
    DAQmx_Val_FiniteSamps = 10178
    DAQmx_Val_GroupByChannel = 0
    def CHK_ao( err ):
    """a simple error checking routine"""
    if err < 0:
    buf_size = 100
    buf = ctypes.create_string_buffer('\000' * buf_size)
    nidaq.DAQmxGetErrorString(err,ctypes.byref(buf),buf_size)
    raise RuntimeError('nidaq call failed with error %d: %s'%(err,repr(buf.value)))
    if err > 0:
    buf_size = 100
    buf = ctypes.create_string_buffer('\000' * buf_size)
    nidaq.DAQmxGetErrorString(err,ctypes.byref(buf),buf_size)
    raise RuntimeError('nidaq generated warning %d: %s'%(err,repr(buf.value)))
    def CHK_ai(err):
    """a simple error checking routine"""
    if err < 0:
    buf_size = NumAvgPts*10
    buf = ctypes.create_string_buffer('\000' * buf_size)
    nidaq.DAQmxGetErrorString(err,ctypes.byref(buf),buf_size)
    raise RuntimeError('nidaq call failed with error %d: %s'%(err,repr(buf.value)))
    def Analog_Output():
    taskHandle = TaskHandle(0)
    (nidaq.DAQmxCreateTask("",ctypes.byref(taskHandle )))
    (nidaq.DAQmxCreateAOVoltageChan(taskHandle,
    aoDevice,
    float64(0),
    float64(5),
    DAQmx_Val_Volts,
    None))
    (nidaq.DAQmxCfgSampClkTiming(taskHandle,"",float64(Samplerate),
    DAQmx_Val_Rising,DAQmx_Val_FiniteSamps,
    uInt64(NumAvgPts))); # means we could turn in this to continuously ramping and reading
    (nidaq.DAQmxStartTask(taskHandle))
    (nidaq.DAQmxWriteAnalogScalarF64(taskHandle, True, float64(10.0), float64(CurrentVolt), None))
    nidaq.DAQmxStopTask( taskHandle )
    nidaq.DAQmxClearTask( taskHandle )
    def Analog_Input():
    global average
    # initialize variables
    taskHandle = TaskHandle(0)
    data = numpy.zeros((NumAvgPts,),dtype=numpy.float64)
    # now, on with the program
    CHK_ai(nidaq.DAQmxCreateTask("",ctypes.byref(taskHandle)))
    CHK_ai(nidaq.DAQmxCreateAIVoltageChan(taskHandle,aiDevice,"",
    DAQmx_Val_Cfg_Default,
    float64(-10.0),float64(10.0),
    DAQmx_Val_Volts,None))
    CHK_ai(nidaq.DAQmxCfgSampClkTiming(taskHandle,"",float64(Readrate),
    DAQmx_Val_Rising,DAQmx_Val_FiniteSamps,
    uInt64(NumAvgPts)));
    CHK_ai(nidaq.DAQmxStartTask(taskHandle))
    read = int32()
    CHK_ai(nidaq.DAQmxReadAnalogF64(taskHandle,NumAvgPts,float64(10.0),
    DAQmx_Val_GroupByChannel,data.ctypes.data,
    NumAvgPts,ctypes.byref(read),None))
    #print "Acquired %d points"%(read.value)
    if taskHandle.value != 0:
    nidaq.DAQmxStopTask(taskHandle)
    nidaq.DAQmxClearTask(taskHandle)
    average = sum(data)/data.size
    Thanks, 
    Erin
    Solved!
    Go to Solution.

    This forum is for LabVIEW questions.

  • Synchroniz​ation for AI and AO with non-regene​ration of output waveforms

    Hi all,
    I need to output several analog waveforms, while at the same time acquiring analog input, and synchronise the two. For this, I'm using a cDAQ-9178, a 9264 module for AO, and 9220 for AI.
    I managed to this all right following this example: http://www.ni.com/example/26527/en/ (NI-DAQmx: Simultaneous AI and AO Using a Shared Clock). The problems started when I moved the waveform generation inside the main while loop to be able to modify the waveform parameters on-the-fly: now I get Error -200018 as soon as I start the VI, or Error -200284 those few times when the VI manages to run some iterations.
    This does not happen if I omit the source of the sample clock for the two tasks, but then I lose the synchronisation between input and output.
    Any idea of what's going on?
    Thanks!
    Nathan
    Attachments:
    piezo_continuous.vi ‏82 KB

    Hi again,
    I've been tweaking my VI: at this point it's a hybrid between the "Multi-Function-Synch AI-AO" GerdW was mentioning, and the shared-clock approach found in the "Timing and synchronisation" white paper. Still, the input signal shows random fluctuations of the phase with respect to the output.
    Any ideas?
    Attachments:
    AI-AO-sync.png ‏94 KB

  • External Sample Clock timeout

    Hi,
    I'm attempting to program up a Met One 010c cup anemometer which sends out 11V pulses whose frequency correlates to wind speed. I've written the following program Met One 010c-3b.vi which works when there's no sample clock and outputs data to the graph and to the write measurement to file VI. 
    However the timestamp on the file only occurs intermittently (every 130 recorded samples if i recall correctly)  and i've been advised to put a sample clock in between the create virtual channel and start VI to make the timestamp occur every sample. However doing this i get errors that first tell me I have to use an external clock, making the clock external then gives the timeout error 200284 after the read function. I expect this is because the wrong source has been selected for the external clock on the timing function.
    I don't fully understand how the external clock works and i assume i need to set up which ever port i select as an external clock?
    I have read through the following
    http://digital.ni.com/public.nsf/allkb/FEF778AD990D5BD886256DD700770103
               -> how do i  verify that the start trigger is configured correctly? (i know my program doesn't have one)
               -> how do i verify the external timing is configured correctly?
    http://zone.ni.com/devzone/cda/tut/p/id/2835
    http://zone.ni.com/devzone/cda/tut/p/id/4322
    I tried to implement some of the diagrams indicated in the last link (eg Figure 2 & 3) but when i went to select the source for the analogue output I was given no available options. I have the NI 9205,9213,9403,9423,9215 sitting on a cDAQ 9178, so none of these do analogue output. Does this mean i can't use an external clock? 
    Thanks for the help, i know this is a simple question but i'm getting nowhere fast.
    Kind Regards
    Orfeo
    Attachments:
    Met One 010c-3b.vi ‏90 KB

    Thanks for your help Courtney,
    I had a look at the Write to Text File.Vi you suggested and i tried to implement it in my program. It appears to be almost working. The formatting of the strings is stuffed up so that i'm getting an ever increasing number of columns in my data (see attached text file). Can you advise me where i've gone wrong?
    An example of the file is below
    24/11/2011 11:21:54 AM     2.32     2.14
     2.62     2.11
     1.81     1.49
    24/11/2011 11:21:54 AM     2.36     2.32     2.14
     2.62     2.62     2.11
     1.82     1.81     1.49
    24/11/2011 11:21:54 AM     2.40     2.36     2.32     2.14
     2.59     2.62     2.62     2.11
     1.76     1.82     1.81     1.49
    24/11/2011 11:21:54 AM     2.43     2.40     2.36     2.32     2.14
     2.55     2.59     2.62     2.62     2.11
     1.73     1.76     1.82     1.81     1.49
    24/11/2011 11:21:54 AM     2.53     2.43     2.40     2.36     2.32     2.14
     2.48     2.55     2.59     2.62     2.62     2.11
     1.69     1.73     1.76     1.82     1.81     1.49
    I assume i've just not got my tab delimintors in the right place? or perhaps i need end of line qualifiers?
    I would also like to have the timestamp more accurate, down to the milisecond. I see the format time string VI has an option to format the string %<digit>u which should do this but it appears to just paste the <digit>u in the string. We are wanting to sample data at 10-20 Hz and record the time of the samples. For one instrument these samples will be done simultaneously.
    Thanks again
    orfeo
    Attachments:
    Met One 010c-3c.vi ‏42 KB
    TextFile.txt ‏550 KB

Maybe you are looking for