TIO Edge Seperation 6601

I don't know what I'm doing. I need to calculate a machines running speed. I am using 1 counter to track the number of pieces run. I was told by someone (who can no longer give me further info) that I need to: "Measure speed: configure counter 2 with frequency signal of 100000, calculate speed using 36,000,000 per hour(or was it second?) as base." I found the TIO Edge Seperation VBP example and I'm trying to use it as a start. But if I change the frequency from anything but the '20,000,000' it originally has, it returns nothing. Also, the documentation says that if I set buffer mode to continous, the CWCounter1_AcquiredData event will be fired every time the value of NMeasurements is reached, but it is only firing once. I'm new to this, pl
ease help.

Hi GearRunr,
One of the ways counters calculate speed is by counting the number of pulses it receives in a known period of time in the case of multiple events. You can also calculate speed or frequency of a device by measuring the number of pulses of a known frequency occur within a portion of the signal.
The best way to get started is to use the shipping examples with NI-DAQ (driver for the 6601 card). If you are using VB, you should have installed support for VB when installing NI-DAQ. You can also modify your installation now to include support for VB by going to Add/Remove Programs and modifying the insatllation. Once you have support installed, you should have shipping examples installed in the National Instruments/NI-DAQ directory.
Since c
ounters can measure and generate pulses, we will need a combination of both to take speed measurements. You will want to configure one counter (counter 0) to generate a pulse of known width (1 second for example). Then you would connect this output to the gate of a second counter. The gate effectively turns on or off the counter when it is counting. So if you connect your signal to be measured to the source of this counter the counter will count the number of pulses that occur in 1 second (in our example). Therefore if you read 2,500 counts, you know your speed is 2,500 counts/second.
Anyway, I've included a simple example that uses VB and the CW controls to count edges. Many times, you would only need to right-click on the control and adjust the counter properties through that method instead of programmatically adjusting them in code. Hope that helps. Have a good day.
Ron
Attachments:
DAQSTC_Event_Counting.zip ‏4 KB

Similar Messages

  • Two Edge Seperation / PCI-6238 / Error -200140

    Trying to use a PCI-6238 card to measure the time between Digital Inputs rising or falling.  From what I was directed, this should be able to be done via the Two Edge Seperation Task... However, when I configure the task it seems that no matter what the Min. and Max Time I set, I get the error:
    <<<<
    Error -200140 occured at MyTwoEdgeSeperationTask - DAQ Assistant
    Possible Reason(s):
    Two consecutive active edges of the input signal occurred without a counter timebase edge. 
    Use a faster counter timebase. 
    >>>>
    I can I change the Counter Timebase?? I thought the system selected the optimum counter timebase based on the Min and Max value entered in..
    Thanks for any help.

    Not at hw to test, but here are some brief thoughts anyway:
    1. Error message sounds a little odd to me, almost like it's only looking at 1 input signal rather than 2.  Could simply be poor choice of error text though...
    2. There's a property called "Duplicate Count Prevention" that is frequently relevant to situations where the signals to be timed are faster than the timebase used to time them.  If you search the forums for that term, you'll find more detailed info.  The summary is that it can either be enabled or disabled and the behavior when the inputs are too fast are either to produce an error like yours or to return a measurement of 0.  (I honestly don't know which setting does which -- it's easy enough to experiment and find out though).
    3. The timebase can be chosen explicitly, though DAQmx should indeed have picked the appropriate one for your specified Min / Max.  You'd probably want a Min of 0 and a Max that's less than about 50 seconds.  My guess: DAQmx *did* pick the appropriate timebase, and the error text suggesting you use a faster one is just generic advice that doesn't actually apply to your case.
    4. Two Edge Separation requires you to know which signal will come first.  If you don't know which one will come first, you may still be able to accomplish your goal by setting up a "change-detection" DI task and then measuring the period of the change detection pulse signal with a counter.  I know this would work on the 5V DIO versions of the M-series, but I'm not so familiar with your particular board.
    -Kevin P.

  • 5s screen edge seperated.

    My iphone 5s's screen edge seperated...
    i have change a new one already..
    this is the second time happened on 5s...
    what should i do for my 5s????
    my screen doesnt broken...

    My right upper screen by the lock button keeps lifting up away from metal bezel. I've had it replaced 4 times now for the same issue. Apple support says all they can do is a new phone replacement... (Did that and still happening.) They also say I'm apparently the only one with this problem.... 

  • Two edge seperation counter

    Hi,
    I'm struggling to use the counter on a USB 6251 to count edges - can anyone advise?
    I need to count edges on the source input between aux and gate inputs, using Two-Signal Edge Seperation Measurement as described on page 7-18 of the M series manual (April 06 371022F-01 release of this document). The device should be capable of this, it was sold to me specifically to perform this task.
    My problem is that I can get seconds or ticks between edges on the Aux and Gate signals (on PFI 10 and 9 for counter 0), but not a count from the source input.
    I have verified both in MAX and my own code that the source input works - level changes can be detected there.
    Is there a setting I have missed that forces the device to read from the Source input (PFI8 for counter 0), instead of using it's own clock?
    See attachment for code.
    Bandit
    Attachments:
    Test Harness - Test counter.vi ‏23 KB

    Hi Jon, thanks for the reply.
    I'm measuring dynamic wear on a rotating drive nut. The nut is driven up and down a fixed threaded rod. Start trigger (edge one) is from a fixed position the nut passes. Pulses are counted from regular spaced lines around the nut. An index mark against one of these lines provides the stop trigger (edge 2). As the nut wears, the pulse count between edges will change and so wear in the thread can be measured. For this application a time isn't what I need - it's the fraction of a turn the nut makes between the start and stop trigger that I need to measure.
    The USB 6251 was chosen for this task in conjunction with my local NI field engineer. We selected it after reading the M series manual section on Two-Edge Seperation, which describes measuring the seperation of 2 signals either in time, or as a count of source events (as per my original, not very detailed post). I have posted after spending a day trawling help files, product manual, vi libraries, user forum and knowledge base.
    Two edge measurement should work from rising or falling edge of aux to rising or falling edge of gate (and it does). You get to choose rising or falling edge for each with the DAQmx Create Channel.vi in it's (CI Two Edge Seperation) variation.
    The only problem I have is getting a timing input from the source connection.
    I will check the DAQmx Count Edges task as you suggest, though at the moment I don't know how I use both start and stop triggers.
    Watch this space for an update, or post any further info you come up with.
    Regards,
    Bandit. 

  • NI 6602 measure quadrature encoder with two signal edge sepearation

    Is it possible to improve the position measurement for X4 encoders,
    that the measurement starts at start trigger and stops at the stop
    trigger signal like the normal two signal edge seperation measurments.
    Everything I tried don't works. Does anyone have an idea. Thank You
    for Your trouble.

    Hello Yong,
    You have no wait time within your for loop.  This means that the loop will execute as fast as possible, but not at a constant rate.  To acheive a more constane rate, try inserting a Wait Time of 1 ms.  This will get you a loop with a 1 kHz rate.
    How fast is your PWM Signal?  It may be that you are missing some two edge measurements while waiting for the loop to iterate.
    I suggest merging your error clusters out of the DAQmx Read.vis.  Right now, you are just clearing out any errors.  Let me know if you start returning any errors once you have done this.
    Regards,
    Sean C.

  • Start - stop with two daq counters

    I have the following problem:
    I have two channels. One channel consist of one ttl pulse, repeated with a frequency nu1. The other channel consist of two ttl pulses (with a certain distance in time deltat1= (B-C)), repeated with a frequency nu1.
    The scheme below should help to visualize
    ......][......A....................][.....
    ......][............B....C........][......
    I would like to measure the time difference B-A, and C-A.
    Is there a simple way to do that using the counters? I have a DAQ card of NI with two counters on it and LV 6.0. Any suggestion would be greatly appreciated.
    Thanks you a lot
    -Claudio

    Hi,
    What you need is 'Two Edge Seperation Measurment', and this is only available on a NI-TIO based devices (660x family). This can not be achieved with the card you have - I assume it is an E-Series card. There is a shipping example that ships with LabVIEW 6.0 that would measure edge seperation (Two Edge Seperation Measurement (NI-TIO).vi).
    Regards,
    RamziH.

  • How to check 6 digital signals change value at the same time with PCI-6229??

    I am using DAQ card PCI-6229.
    Channel 1 generate a digital signal.
    Channel 2,3,4,5,6,7 acquire digital signals.
    I want to check:
    1. Whether the rising edge of Channel 2,3,4,5,6,7 occures at the same time;
    2. The time delay from the rising edge of Channel 1 to the rising edge of Channel 2,3,4,5,6,7 is within a certain range.
    I know I can use counter to get the two edge seperation time delay. But I only have two counter, it is two time-consuming if I check one by one.
    I don't know how to check the rising edge of 6 different channels occure at the same time.
    Does anyone has any suggestions?
    Thanks

    Hello,
    You can use the DAQ card's digital input change detection circuitry to detect changes in the input, you can then use a counter to measure the relative time between samples. Please read Page 6-9 DI Change Detection Applications for more information. Let me know if this helps
    Christian A
    National Instruments
    Applications Engineer

  • PXI-6624 Pulse Frequency measurement

    Hi.  I'm working with a PXI-6624 and am interested in doing pulse frequency measurements to get both frequency and duty cycle on its inputs using DAQmx.  
    Whenever I go to create the virtual channel however, I get error -200431:
    "Selected physical channel does not support the measurement type required by the virtual channel you are creating."
    "Requested Value: Pulse Frequency"
    "You Can Select: Frequency, Period, Pulse Width, Semi Period, Two Edge Seperation, Position:..."
    Is this card really not capable of doing these pulse frequency measurements?  
    Solved!
    Go to Solution.

    Yes, the "Pulse" (not to be confused with "Pulse Width") measurement was introduced with NI's STC3 devices including X Series and CompactDAQ.  
    Pulse Measurement:
    However, you should still be able to measure frequency and duty cycle on your card with a semi-period measurement:
    Semi-Period Measurement:
    Images are from the X Series User Manual.
    The difference between the two modes comes down to how the data is stored and buffered on the card--with the semi-period method the hardware doesn't distinguish between high and low samples and puts everything into a single buffer.  However, if you start the counter off the appropriate edge (see below property node), then you would know in software the order of high and low samples and can pretty easily calculate frequency and duty cycle from this.
    Best Regards,
    John Passiak

  • Running VB6 SP5, CW 3.0(536), NI-DAQ V6.7, PCI-6023E. Placed a CWCounter component on my form, setup parameters and c

    alled CWCounter1.Configure which returned a success. Called CWCounter1.Start and got the following error: Run-time error '10123': Start DAQ operation Invalid paramID used. There is no param specified for this method in the doc. Any suggestions? Thanx.

    alled CWCounter1.Configure which returned a success. Called CWCounter1.Start and got the following error: Run-time error '10123': Start DAQ operation Invalid paramID used. There is no param specified for this method in the doc. Any suggestions? Thanx.NI-DAQ 10123 is the generic error for an invalid parameter in counter configuration. Our counters can be used for many things (pulse and period measurement, edge seperation, event counting, etc.) and require different configuration settings. Without seeing the properties you chose and without knowing your specific application, I would recommend starting your development process with our wonderful counter examples that ship with CW. Pick the closest sample to your application and modify as needed. They are usually available in the MeasurementStudio\VB\Samples\DAQ\Counter directory. They should run with the default settings.
    good luck
    ben schulte
    national instruments

  • DAQmx Error 89137 When trying to make a high frequency measurement.

    I am using a PCI-6602 Timer/Counter for multiple measurements on a serial interface...
    I have the clock line connected to Gate0, the enable line to Aux0 because I need to make a two-Edge seperation measurement between the two later...
    But I also want to make a "Period/Frequency Measurement (High Frequency with Two Counters)" measurement...
    This requires that the signal to be measured is on Source0...
    I implimented the following Code:
    void meas_FP_Freq(float64 *Freq0, float64 *Freq1)
    TaskHandle CLK0_Freq, CLK1_Freq;
    DAQmxCreateTask ("FP_CLK0_Freq", &CLK0_Freq);
    DAQmxCreateTask ("FP_CLK1_Freq", &CLK1_Freq);
    DAQmxConnectTerms ("/Dev3/PFI38", "/Dev3/Ctr0Source", DAQmx_Val_DoNotInvertPolarity); // Gate0 to Source0, No Error....
    DAQmxConnectTerms ("/Dev3/80MHzTimebase", "/Dev3/Ctr1Source", DAQmx_Val_DoNotInvertPolarity);
    DAQmxCreateCIFreqChan (CLK0_Freq, "Dev3/ctr0", "", 6000000, 6500000, DAQmx_Val_Hz, DAQmx_Val_Rising, DAQmx_Val_HighFreq2Ctr, 0.001, 4, "");  // High freq measurement
    DAQmxCreateCIFreqChan (CLK1_Freq, "Dev3/ctr1", "", 6000000, 6500000, DAQmx_Val_Hz, DAQmx_Val_Rising, DAQmx_Val_LowFreq1Ctr, 0.001, 4, "");
    DAQmxReadCounterScalarF64 (CLK0_Freq, 3.0, Freq0, 0); // Run-Time Error -89137 Specified Route cannot be satisfied..etc
    DAQmxReadCounterScalarF64 (CLK1_Freq, 3.0, Freq1, 0);
    DAQmxDisconnectTerms ("/Dev3/80MHzTimebase", "/Dev3/Ctr0Source");
    DAQmxDisconnectTerms ("/Dev3/80MHzTimebase", "/Dev3/Ctr1Source");
    DAQmxClearTask (CLK0_Freq);
    DAQmxClearTask (CLK1_Freq);
    The "Low Frequency" method works fine, but the resolution is too low...
    Every help file I've read indicates I can use different PFI inputs for measurements... What am I missing?

    Hi,
    The reason that you are getting the error is the PFI lines are being reserved twice. You don't need the DAQmx Connect Terms functions in your code because the DAQmx driver does this for you automatically. If you still receive an error after doing this, try to changing the low frequency counter number.  I hope this helps you with your application.
    Regards,
    Hal L.

  • Will USB-6251 execute multiple tasks at the same time?

    Hi all,
    I have an application controling an experiment and logging data using a USB 6251. One measurement uses Two Edge Seperation , and takes a while to complete (20 to 30 seconds). Meanwhile I need to execute another task repeatedly to sense a digital input pin. Does anyone know if the USB 6251 can execute a second task while it's busy doing the edge seperation task? So far I haven't found anything in the documentation or on the forums.
    BTW I can't just 'try it and see', or at least it's very tricky to do so. The control system is at the top of a scaffold tower, a long way from my development system. Every code change has to be deployed and installed to test it.
    I recomend you avoid such an installation if you can  )  It makes for a tough time debugging.
    Thanks for any help.
    Bandit.
    Message Edited by Bandit on 03-20-2007 12:05 PM

    A small addition to YatimM's answer
    You can execute two tasks together as long as they are not accessing the same channels or digital lines.
    For acquisiton on analog input channels, you cannot execute 2 tasks simultaneously even if they scan for 2 seperate sets of channels
    For Ex: task 1: acquiring from analog channels 0 to 3 and task2 : acquiring from analog channels 4 to 6, will still give a 'device reserved' error, because a single ADC is available and used for multiplexing all channels in a task/ scan list and the second task will give up this error

  • Doing simultaniusly two task with NI PCI 6221

    I am using  timer 1 configure as two-signal edge-separation measurement. I want to one of the signal witch start the counting to be taken from the same device NI PCI 6221.   I want set one of DI0 and i want to this setting started the counting. While I am setting the DI0 timer should be already configure and arm. I understand that ,this mean two task shuld be done simultaniusly. How can I do it.

    Hi Fazi,
    As I understand it, you would like to use a DIO line to start your counter task.  Start triggers for counter tasks must be set using an the arm start trigger.  Here is a great knowledgebase that talks about using arm start triggers on M Series devices such as the PCI 6221.  In addition, I have taken the Meas Two Edge Separation-Buffered-Continuous.vi example (Help » Find Examples » Hardware Input and Output » DAQmx » Counter Measurements » Two-Signal Edge-Seperation) and added an arm start trigger below.  You will need to connect the digital start trigger line to a PFI line to use it as the arm start trigger.
    I hope this helps,
    Paul C.Message Edited by Paul C. on 10-23-2007 11:06 AM
    Attachments:
    armstart.JPG ‏45 KB

  • Cannot get mail - invalid credentials (failure)

    i have just purchased an iphone and tried to configure gmail on it, using the procedures given on the gmail site (https://mail.google.com/support/bin/answer.py?answer=77702).
    i receive the following error:
    Cannot get mail
    Invalid Credentials (failure)
    I have tried:
    adding another users account (my friends) - worked
    changing my password so it doesnt have any uppercase or numbers - failed
    using wifi and edge seperately - failed
    The only major difference i can see between his account and mine is that my user name contains a . such as: [email protected]
    i am at odds as to why i cant access my gmail account via the iphone when my mates works on my phone.

    Hey dpark,
    The link you posted is for setting up IMAP GMail account on the iPhone. Make sure you first setup your GMail account for IMAP.
    http://mail.google.com/support/bin/answer.py?answer=77695
    They also have a YouTube video linked from this page:
    http://mail.google.com/mail/help/intl/en/about_whatsnew.html
    Jason

  • What are the 3-bit field choices for Hw_Arm_Sel in PCI-6601

    Hi,
    I am programming our own driver to operate the PCI-6601. For our application we need hardware arm option. I know it is possible to use 2 counters for that, but NI-TIO should support also hw_arm. Although it is not explained in the registry document at all, after some tedious check in the DDK examples I found that this bits are located in the Gi counting mode register. I know the position of the HW_enable as well as the position of the 3 bits for pin sellect options. What I do not know is What are the 3-bit field choices for Hw_Arm_Sel . I contacted NI support but got no support. How can NI sell boards and when a customer who is not using LAbview or Measurement Studio or DDK, but is implementing his own driver is then so arrogantly turned down from NI? Also, how can NI publish just part of the registers the board support, and when a customer contacs and asks for some registers get not at all support? I can not foretell the missing registers, and it is pretty unprofessional to document just partly the registers of 660x devices. And on request you got nothing.
    I hope someone from the community know about this Hw_Arm_Sel 3 pin options. Otherwise, there is just an option of error and trial. Or simply throw the board in the garbage.
    Dr. Kirco Arsov
    Solved!
    Go to Solution.

    Hi Kirco,
    I have some more information for you :-)
    I haven't been able to speak to the developer who is the most familiar with TIO programming since he's out of the office, but I have come across his notes from when he was writing support for the DAQmx driver.
    As I described earlier, the HW_Arm_Sel bits don't select a connector I/O pin, but an internal trigger signal. There are seven internal trigger lines, and the HW_Arm_Sel bits map directly to the internal trigger signal: 0b000 - 0b111 map to 0d0 - 0d7. In order to route an I/O pin to an internal trigger, you must also write to a few more registers.
    From what I've read, there are two more register families that need to be programmed: TG_x_LevelEdgeReg and TG_x_CombinationReg, where x is the internal trigger number. In your case, you only need one pin from the I/O connector to be your arm start trigger, so TG_0_LevelEdgeReg and TB_0_CombinationReg will suffice for your application.
    TB_0_LevelEdgeReg :: Offset 0x660
    TG_0_LevelEdgeReg is only 8 bits wide, and maps as follows:
    7..6: EdgeMode
    5..0: LESel
    LESel selects the I/O connector pin to use as the source for the internal trigger signal. 0d0 - 0d39 will select the I/O pin of the same number. NB: behavior for TG_x_LevelEdgeReg is more limited for triggers 1-7, and only a small subset of the I/O pins can be selected for those trigger signals. Trigger 0 can use any I/O pin. Setting these bits to 0d63 forces the trigger source low, and can be used as a way to 'unroute' it when you're finished with your program.
    EdgeMode determines whether the TIO will detect an edge of the incoming signal, or just pass the signal level straight through. When detecting edges, it will latch the signal and generate a single TIMEBASE3 pulse instead. 0b00 sets level mode; 0b01 sets rising edge; 0b10 sets falling edge; 0b11 sets either edge.
    TG_0_CombinationReg :: Offset 0x6A0
    TG_0_CombinationReg is 32 bits wide, and has three fields of interest:
    19..16: CombFunction
    5..4: CombTypeB
    1..0: CombTypeA
    CombTypeA controls which trigger subsystem to use as the source for the trigger signal. Since you're coming from an I/O pin and using the edge/level subsystem, you must set these bits to 0b01.
    CombTypeB is similar to CombTypeA, and although you won't be using trigger B, set it to 0b01 to be safe.
    CombFunction performs a simple logic function on A and B. Since you're only using a single I/O connector, you only need the A output, so set these bits to 0b1100.
    All of the other bits should be set to 0b0.
    Unfortunately, I'm unable to test these statements since my test machine is currently being used for another research project. Please let me know what happens if you decide to test.
    Joe Friedchicken
    NI VirtualBench Application Software
    Get with your fellow hardware users :: [ NI's VirtualBench User Group ]
    Get with your fellow OS users :: [ NI's Linux User Group ] [ NI's OS X User Group ]
    Get with your fellow developers :: [ NI's DAQmx Base User Group ] [ NI's DDK User Group ]
    Senior Software Engineer :: Multifunction Instruments Applications Group
    Software Engineer :: Measurements RLP Group (until Mar 2014)
    Applications Engineer :: High Speed Product Group (until Sep 2008)

  • Some problems with 3 counters on PCI 6601

    Good afternoon,
    after a lot of time i'm here yet.
    The problem with the PCI 6601 aren't finished in sense that i have tried a lot of solution but my sistem crashed after some acquisition.
    The code that  had write on Visual Basic 6 are :
    'Inizializzo la scheda PCI-6601
    Public Sub init_6601(NumSens As Integer)
    Dim edge As DAQmxEdge1
    On Error GoTo ErrorHandler
        MyChannel(NumSens) = "My Channel" & NumSens            'Definisce il nome per il canale (optional)
        'Creo i tre task che servono per il funzionamento del programma
        DAQmxErrChk DAQmxCreateTask("", taskHandle(NumSens))
        'Questa funzione serve a creare il canale dalla quale poi viene effettuata la misura
        If (NumSens = 0) Then
            DAQmxErrChk DAQmxCreateCIPulseWidthChan(taskHandle(NumSens), "Dev1/ctr1", MyChannel(NumSens), 0.00001, _
            0.0009, DAQmx_Val_TimeUnits3_Seconds, DAQmx_Val_Edge1_Rising, "") ' DAQmx_Val_TimeUnits3_Ticks, DAQmx_Val_Edge1_Rising, "")
        ElseIf (NumSens = 1) Then
            DAQmxErrChk DAQmxCreateCIPulseWidthChan(taskHandle(NumSens), "Dev1/ctr2", MyChannel(NumSens), 0.00001, _
            0.0009, DAQmx_Val_TimeUnits3_Ticks, DAQmx_Val_Edge1_Rising, "") 'DAQmx_Val_TimeUnits3_Seconds, DAQmx_Val_Edge1_Rising, "")
        Else
            DAQmxErrChk DAQmxCreateCIPulseWidthChan(taskHandle(NumSens), "Dev1/ctr3", MyChannel(NumSens), 0.00001, _
            0.0009, DAQmx_Val_TimeUnits3_Seconds, DAQmx_Val_Edge1_Rising, "")
        End If
        DAQmxErrChk DAQmxSetReadReadAllAvailSamp(taskHandle(NumSens), False)
        'Con questa funzione si sincronizza il timebase della scheda con il segnale da leggere
        DAQmxErrChk DAQmxSetCIPulseWidthDigSyncEnable(taskHandle(NumSens), MyChannel(NumSens), True)
        'DAQmxErrChk DAQmxSetReadOverWrite(taskHandle(NumSens), DAQmx_Val_OverwriteMode1_OverwriteUnreadSamps)
        'DAQmxErrChk DAQmxCfgSampClkTiming(taskHandle(NumSens), "", 100000, DAQmx_Val_Rising, DAQmx_Val_AcquisitionType_ContSamps, 10000)
        'provare queste due funzioni per aspettare che il campione sia realmente disponibile.
        'La seconda èdovrebbe essere quella che da il migliore compromesso tra uso CPU e velocità.
        'DAQmxErrChk DAQmxSetReadWaitMode(taskHandle(NumSens), DAQmx_Val_WaitMode_WaitForInterrupt)
        'DAQmxErrChk DAQmxSetReadWaitMode(taskHandle(NumSens), DAQmx_Val_WaitMode_Yield)
        'Setta il numero di campioni da acquisire ogni volta che va in lettura e
        'il modo di lettura. Si è impostato "contsamps" per avere la lettura continua
        'La dimensione del buffer è determinata da quel 10000 che va messo così secondo le specifiche del daqmx
        DAQmxErrChk DAQmxCfgImplicitTiming(taskHandle(NumSens), DAQmx_Val_AcquisitionType_ContSamps, 10000) 'DAQmx_Val_AcquisitionType_ContSamps
        'La scheda NI PCI 6601 ha soltanto un canale per il DMA (Direct Memory Access) quindi non riesco a leggere
        'contemporaneamente tre task per volta. Quindi devo attivare un meccanismo diverso per la lettura
        'basato sugli interrupt, ogni volta che ho una lettura automaticamente leggo il dato
        DAQmxErrChk DAQmxSetCIDataXferMech(taskHandle(NumSens), MyChannel(NumSens), DAQmx_Val_DataTransferMechanism_Interrupts)
        'La funzione di seguito serve semplicemente per leggere il campione più recente generato
        DAQmxErrChk DAQmxSetReadRelativeTo(taskHandle(NumSens), DAQmx_Val_ReadRelativeTo_MostRecentSamp)
        'La seguente funzione è complementare ad una utilizzata nell'inizializzazione e serve per impostare la lettura
        'sull'ultimo campione generato
        DAQmxErrChk DAQmxSetReadOffset(taskHandle(NumSens), -1)
        DAQmxStartTask taskHandle(NumSens)
        taskIsRunning(NumSens) = True
    Exit Sub
    ErrorHandler:
        For i = 0 To 2
            If taskIsRunning(i) = True Then
                DAQmxStopTask taskHandle(i)
                DAQmxClearTask taskHandle(i)
                taskIsRunning(i) = False
            End If
        Next i
        MsgBox "Error: " & Err.number & " " & Err.Description, , "Error"
    End Sub
    For the reading i use :
            DAQmxErrChk DAQmxReadCounterF64(taskHandle(NumSens), -1, 0.5, temp(NumSens, 0), 10000, ReadSamp(NumSens), ByVal &O0)
    Well, my problem are very simple, I want an continuos acquisition on three channel and the input signal's frequency that i have to measure is 1 kHz .
    when i try to keep 2 channel after some cycles appears the error -200141 (buffer overwriting). Why?
    The read function is called some times every ms and evry time keep out an different value, even if that are impossible because the input signal is at 1 kHz, and why the buffer fill up? What is wrong in my code?
    Thanks in advance for your help
    Have a nice day!!
    Igor Piero Prato

    HI Igor84,
    Error 200141 occurs when the data acquisition device acquires data faster than the computer can read it from the FIFO (first-in-first-out) input buffer.
    You can see this document:
    Error 200141 Occurs When Doing Buffered Event Counting
    http://digital.ni.com/public.nsf/allkb/83656593DCF​1FB0F862570B6004D7222?OpenDocument
    and this forum :
    Buffer Overflow -200141
    http://forums.ni.com/t5/Measurement-Studio-for-VC/​Buffer-Overflow-200141/m-p/607234
    I hope that these links can help you.
    Regards

Maybe you are looking for

  • SAX Qns

    the following codes will print out my whole XML document. Is there any way to print a selected item from the xml file? import javax.xml.parsers.*; import org.xml.sax.*; import org.xml.sax.helpers.*; public class Parse{      public static void main(St

  • "Rebel" Dock icons

    Hi all I usually like to change the icons that come by default in some applications. I particularly have a soft spot for a 3D, toy-like version of the "standard" Chrome icon. I usually change the Firefox and Safari icons, too. It happens that Chrome

  • Does it matter who i use to register a domain name?

    thanks.

  • Unable to bind the select() result to datagrid here........in air+sql connection

    <?xml version="1.0" encoding="utf-8"?> <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()"> <mx:Script> <![CDATA[ import mx.controls.Alert; import flash.data.SQLConnection; import flash.events

  • Create a DR for  a ASM instance

    Hi All, We are planning for the ASM migration. Database - 10.2.0.4 Currently we are using the SRDF process to replicate the data in to the DR site.... After migrating the database to ASM instance, is Data Guard the only option for DR or we have any o