NI-DAQmx: PCI - 6601 - counting pulses in fixed intervals

Dear friends,
I found, that similar topics to my question have already been discussed, but I was unable to find exactly my case, or where it is near - LabView is discussed. If you know address where my question already has been discussed, please, let me know. Because I still have not decided whether I will use CVI or other C-based environment, my questions are more oriented to the principles, I hope that no matter which C environment is used, the algorithm should be the same.
Now to the question:
For my project, I am using board PCI6601 and NI-DAQmx drivers. What I need to do is illustraded in the following figure:
I time ago I have tried to realize the above function through the evalution CVI environment, but I filed. I have some questions regarding my experience:
1. I have one general question: Is the functionality needed possible to be realized using the board 6601 and LabWindows/CVI (or Visual C environment )? If yes, please, comment the questions below:
2. I suppose, a period measurement should be used, but which type? I suppose, a single period measurement should be used. The buffered continuous period measurement seems to be not suitable, because there is no way for ensuring the time T2 for system processing.
3. How the measurement should be configured, which functions should be used? I tried to apply the function DAQmxCreateCIPeriodChan(..) and I noticed the following:
- in order to be able to set the GATE time T1 according the needs, I must use for the parameter measMethod only value DAQmx_Val_HighFreq2Ctr;
- may be the values for the parameters minVal  and maxVal need to be calculated each time dependently on the time T1 set?
4. How should be organized the reading, which functions should I use to read the counter value? By now I tried to use the function DAQmxReadCounterScalarF64(...) and I noticed the following:
- my system needs to know when the counting T1 is finished, in order to do the processing needed in the period T2. What value should I set for the parameter timeout in respect to this? Shall I use the timeout in order to obtain the result, or I must detect when the result is ready checking the Return Value of the function? Shall I use timeout, depending on the T1 period used?
-  a number of pulses “zero” in my system is a normal value. How to avoid the problems, related to this? When I connect and disconnect the pulse source, an error occurs. I tried to use the function SetBreakOnLibraryErrors() to disable the error messages, and I succeeded to disable them, but it seems, on error the task is automatically stopps and needs to be restarted.
- which variant is the correct way for reading with respect to the task start/stop:
Variant 1:
a) Start the task
b) Start the counting
c) Wait the counting to finish
d) Stop the task
e) Process the result
d) repeat the sequence (a-e) so many times as the number of the countings;
Variant 2:
a) Start the task
b) Start the counting
c) Wait the counting to finish
d) Process the result
e) Repeat the sequence (b-e) so many times as the number of the countings;
f) Stop the task
Thank you in advance,
Kamen Ivanov
Message Edited by THE_SNAKE on 10-09-2008 05:41 AM
Message Edited by THE_SNAKE on 10-09-2008 05:43 AM

Dear
Kevin,
Thank
you for your attention! Now step by step:
> You mention a DAC -- do you have another NI board, maybe a
multifunction board? If you do, or if you can add one, there's a pretty
straightforward way to do this stuff well. Assuming there's an NI multifunction
board available (I'd recommend an M-series board), I would approach this just a
little differently.
The
only NI hardware I have is this 6601 counter board. It has enough general
purpose pins, and I am using them to realize the digital part of the DAC. The
additional analog components, needed to complete the DAC functionality are
existing in the XPS system and they don't need to be added by me. The NI board
only must provide the corresponding binary combination. In fact, by this moment
I realized the DAC in this way, using a simple software routine to convert the
decimal value to a binary output value on the general purpose pins, it seems to
work fine (I have not explored its timing parameters yet – for example the time
needed for the output to be updated).
>The approach you've planned counts on making a near-real-time
update of an analog output DAC based on measured results. 
You
got it right! Here I need to correct myself: the DAC update is always related
to "moving" the DAC output with one step/level prior each counting. The
DAC output value does not depend on the result from the last counting, I know I
have written like this in my first message, excuse me for this! However, this
does not change the task to be solved
>Your data correlation depends on you stopping and starting the
counting in sync with generating your DAC update.
This
is very well said!
>It restricts you to doing software-timed AO as well. 
I
am not sure that I got this right, but if you mean the DAC update itself - yes,
the DAC update is software driven.
>All that can work, but consider the following approach that also
uses an analog input A/D channel. I assume what you care about is the
correlation of AO voltage to subsequent count rate, right? 
What
I need to ensure is that no single counting will be started prior its
corresponding DAC update, and that after finishing a counting, the next DAC
update will be done as soon as possible.
> What *I* would consider doing first is to hardware-sync the
counting task with an analog INPUT task which simply measures the analog output
voltage.  It sounds kinda dumb at first
to create a measurement task that measures a signal you're generating, but
there are benefits to this approach.  It
would free you to change the analog output DAC voltage any time and any way you
want, without having to worry about the processing time spent on it.  Your master data record would be the count
and analog input tasks, which can be synced in hardware.  
Also, you would have a continuous record of count rate vs voltage
with no "blind" time.
I
think I got your idea. But my problem is related only to the board 6601.
May
be we have to think how using only this board similar to your idea can be implemented.
It
seems, I can additionally simplify my question:
Is
the board 6601 suitable to be used for the task I need to solve, without adding
any additional (NI) hardware?
Because,
if my task can not be solved easy using exactly this board, I will try to
search other solution, but I need to know for sure and to have arguments, that
this board alone is suitable/not suitable for the task I have to solve.
Best regards:
Kamen Ivanov

Similar Messages

  • PCI 6601 Counter stops when digital channel operated

    This is a problem being re-visted from last year after thinking I had found a solution.
    Basically I have set two while loops up.
    Each While loop has a counter channel running in it, Ctr0 and Ctr3 respectivly.
    When the program is run the two counter channels generate a waveform as expected.
    I then have added into each While loop Digital output channels that provide logic for Direction and Enable.
    If the program is now run Ctr0 outputs as expected but Ctr3 remains off.
    I then put the digital WRITE vi's into case statements, put the case to false and started the program.
    Both counters outputted waveforms.
    Turned one of the case statements on and Ctr3 stops. It did not matter which case statement was turned off, Ctr3 always stops.
    Tried changing counters to Ctr1 and Ctr2 - Same result one counter stops
    Changed the 6601 for a 6602 and got similar results.
    I have attached vi in version 8.6
    Jack
    Labview Version 8.5
    Labview Version 8.6
    Labview Version 2013
    Attachments:
    Run 2 Counter Chg Freq 2.vi ‏28 KB

    Vi with digital channels added.
    Jack
    Labview Version 8.5
    Labview Version 8.6
    Labview Version 2013
    Attachments:
    Run 2 Counter Chg Freq 3.vi ‏35 KB

  • Can PCI-6601 pulse signal over RTSI every Nth encoder count?

    Hi All,
    I have a PCI-6601 counter/timer connected to a quadrature angular encoder.   The 6601 is also connected to a PCI-1422 frame grabber with a RTSI cable.
    I want to be able to trigger the frame grabber by sending a pulse over the RTSI cable every N encoder counts (or X degrees).
    How would I go about do this using C++?
    Thanks in advance,
    Brad 

    Hi Brad,
              There are a few resources I think you may find helpful.  First, there's this DevZone article, " Generate and output pulse every no count an encoder traverses".  Generally, the way this would work is:
    If you want to output a pulse every 4 counts, you will need to take the
    total count size of the counter (2^32 bits) and subtract 4 from this.
    This will be the initial count to set, so that after 4 counts, the
    counter will reach Terminal Count and the Counter Output Event pulse
    will be fired. You can then export the Counter Output Event to a PFI
    line, and use this line as the Z index terminal. If you set the Z index
    value to be equal to the initial count, the counter will always reset
    to 4 ticks below the Terminal Count, and will output a pulse on every
    4th tick. The only drawback to this method is that it will require that
    only X1 decoding be used, and that the counter would have to be
    dedicated to sending out the Counter Output Event (if you want to
    actually count the encoder and keep track of position, another counter
    will have to be used).
    As for specifically doing this in C++, I would recommend referencing the DAQmx C Reference Help (Start»All Programs»National Instruments»NI-DAQ»Text Based Code Support»DAQmx C Reference Help).  Hope that helps, for more assistance on the frame grabber portion of your question, I would reference the post you put in the vision forum.  Have a great day! 
    aNItaB
    Applications Engineer
    National Instruments
    Digital Multimeters

  • PCI-6601 - Group Config error -10444 after 9 hours running

    We developed a vi in order to acquire from the unique dma channel of the PCI-6601 counter 4 multiplexed inputs for a period measurement. We use the national VI buffered_measured_period_TIO. Each cycle the VI is supplied with one of the 4 input line.
    Everything works fine until the 32211 second of measurement (about 9 hours) and after we receive the -10444 error on the group config block and the card freezes (not the software). We need to switch off and on again the PC to start again.
    The cycle of measurement is exactly the one from the original Ni Vi and each cycle the reset is performed.
    Looking in the database we found a similar problem after a long running (10hours) and a PCI-6602.
    We suppose that after s
    everal initialization some internal counter goes in overflow (maybe the TAskID counter?).
    Does exist any explanation and workouround to solve this?
    Is it possible initialize the card only one time for the 4 channel and how?
    Regards
    Andrea Pede

    Hi Andrea,
    What is probably happening is that your memory is becoming increasingly fragmented and after 9 hours there are no continuous blocks of memory available. If you are continuously reconfiguring your counters, that is what is morelikely causing the problem. I included an example that uses all 8 counters and only needs to configure them once. A couple other suggestions:
    1) What happens when you create a larger buffer? Can you run the program for longer?
    2) Have you tried running a disk defrag program on your memory? One suggestion I found on the net was mem-turbo from a shareware site.
    3) What happens if you only use 1 counter? Does the error still occur?
    4) Some issues (including error 10444) with the NI-DAQ driver and analog input were solved
    by upgrading to NI-DAQ 6.9.3. What is your current computer configuration (software, hardware, driver version etc.)? This might help narrow the problem down.
    Simultaneous Buffered-Event Counting on All Eight Counters of the 6602 or 6608 Devices
    http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B45EACE3DC9F56A4E034080020E74861&p_node=DZ52325&p_source=External
    Hope that helps. Have a good day.
    Ron
    Applications Engineering
    National Instruments

  • I want to interface PCI-6601 with photoelectric sensors to count the number of PCB chassis.

    I want to interface PCI-6601 with photoelectric sensors to count the number of PCB chassis. Related this I have following problems-1)Where I can connect sensors(pin numbers)?
    2)How I can acquire data from that sensors(Is is necessary to write any program? If yes, what?)
    3)In which format I will get the output data?

    Hi,
    We're going to need a little more info about your application before we can get you a compete answer.
    Your 6601 is a counter/timer board that can count and measure TTL pulses.
    You can get the pinout for your board from the user manual found here: http://digital.ni.com/manuals.nsf/websearch/dd0dbb6404bc139886256721007cf16d
    In LabVIEW, you can find shipping examples for various counter measurements by going to Help >> Find Examples >> Hardware Input and Output >> DAQmx >> Counter Measurments.
    I would also suggest downloading and installing the latest NI-DAQ driver:
    http://digital.ni.com/softlib.nsf/websearch/90B60D5899BCCCDB86256FC700581B89?opendocument&node=132050_US
    -Sal

  • Slow counting time (PCI-6601)​-Single period measuremen​t

    Dear friends
    I wish to count TTL pulses from my device(Avalanche Photo Doide) by using PCI-6601 for a certain time. Thus, I tried to use "Measure Period.vi" with "for loop" configuration.
    And the gate frequency from another counter is 100 Hz ( 10 ms time binning). Unfortunately, the acquition time is so slow considering binning time (10 ms).
     We tried to modify this vi and found that the acquisition speed cound be fast when we remove "while loop" with "0" counting. As I know, the "while loop" function is to check  whether arming acutally occurs, which is quite questioning why this kind of function exist even though the control code already do it. 
     Can you guys help me ? ^_^

    Duplicate
    Ryan Verret
    Product Marketing Engineer
    Signal Generators
    National Instruments

  • Slow counting(PCI-6601)

    Dear friends
    I wish to count TTL pulses from my device(Avalanche Photo Doide) by using PCI-6601 for a certain time. Thus, I tried to use "Measure Period.vi" with "for loop" configuration.
    And the gate frequency from another counter is 100 Hz ( 10 ms time binning). Unfortunately, the acquition time is so slow considering binning time (10 ms).
     We tried to modify this vi and found that the acquisition speed cound be fast when we remove "while loop" with "0" counting. As I know, the "while loop" function is to check  whether arming acutally occurs, which is quite questioning why this kind of function exist even though the control code already do it. 
     Can you guys help me ? ^_^
    P.S. Pulse train has a role to generate gate pulse with 100 Hz.
    Attachments:
    SPM_NI.vi ‏98 KB

    Hi yatintyagi,
    This VI has two tasks, one for edge counting and one for pulse generation. When doing Edge Counting the task counts the rising or falling edge of your input signal using a counter channel. The read VI is reading the value of the counter task. In this case a Buffered Edge Counting is performed, so the actual count will be updated with every edge of the sample clock. I think the image on the Edge Counting of the LabVIEW Help might be really helpful, you can also find it here. The counter output task is generating a signal that is defined by the frequency and duty cycle specified in the “Create Channel – Co Pulse Freq” VI. This pulse train generated is used as the sample clock for the Edge Counting task. I hope this is helpful,
    Ana P
    National Instruments
    Applications Engineer

  • Is it possible to generate pulses on a ctr out and simultaneously read them on another ctr input using one NI PCI-6601?

    Hi,
    I am trying to output a pulse train on ctr0 OUT and I want to receive them on CTR1 SOURCE of the same NI PCI-6601 card, but no use! :-(
    The pulses are generated OK, but the acquisition fails within timeout (10 sec.). The generated signal has 1 Hz frequency and 20usec high time. I've studyed the NI examples for this.
    Can anyone help me, please?

    Hi Julien,
    I can post the code, but actually, it worked! I was making a loop between CTR0 OUT and CTR1 SOURCE and it didn't work. I made a loop CTR0 OUT <-> CTR1 GATE and it worked like a charm! As far as I read in the NI PCI-660x manual, I cand loop to either SOURCE or GATE pins and the pulses' acquisition should work anyway.... Maybe I am wrong. Can you explain me why it didn't work on the SOURCE pin?
    Thank you very much for your tine!
    Regards,
    Marles

  • Issues with counters 3 and 4 on PCI-6601

    Hi All,
       I am using counters 1-4 on the PCI 6601 card with NI-DAQmx 8.0 to generate continuous pulses in Labview  8.0. After I configure the counters, I can see the pulses going out on a scope. If I then configure other DIO lines as digital outputs, the pulses on counter 3 and 4 goes away. Counter 1 and 2 is  still okay. Has anyone seen this before. Somehow the configuration on counter 3 and 4 is changing when I try to configure other DIO lines as outputs? For configuration of continuous pulses I  am using the Pulse Train Gen.vi  from the DAQmx PWM Examples.zip folder from NI website minus the while loop and the DAQmx clear Task.vi. The Pulse Train Gen.vi include DAQmx Create Channel(CO-Pulse Generation Frequency).vi, DAQmx Timing(Implicit).vi, DAQmx Start Task.vi, and  DAQmx Is Task Done.vi. For digital outputs I am using DaQmx Write(Digital Bool 1 Line 1 Point). Any suggestions as to why counter 3 and 4 configuration changes and not counter 1 and 2. I need to have these counter going before I configure output lines.   

    Hi @George1971 
    If possible please turn off magnify mode - to do this, go to Settings > Accessibility and toggle the Magnify Mode switch
    After doing this, test the keyboard and let me know if you are still having trouble with key detection. Thanks! 
    Did someone help you? Click Like! Did a post solve your issue? Click Accept as Solution!
    Follow me on Twitter or Google+ and subscribe to the Inside BlackBerry Help Blog

  • 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

  • Pci 6601 for decoding renishaw and new encoder

    i have a pci 6601 and scb 68 that was recommend for decoding a renishaw encoder.
    it works great for determing the position of the renishaw.
    the renishaw encoder type is
    rgh24x30a00a
    http://www.renishaw.com/en/rgh24-linear-encoder-system--6444
    i would like to try the pci 6601 on a similar encoder.
    With this new encoder, im not seeing any output from the pci 6601. 
    I can see the pulses on the oscilloscope so im alittle confused.
    The pulses appear center around 2.5 volts and are around 1v in amplitude.
    In the same manner as with the renishaw, B- goes to counter 0 aux, a- to 0 source, and grond to ground.
    I believe the particular renishaw has a 1v peak to peak sinusoid pair (sin / cos).
    The new servo has a build in encoder with one volt peak to peak sinsuoid centered at 2.5v.
    Any ideas on why no counter number is showing?
    Message Edited by jimmyinct3 on 11-14-2009 05:57 PM

    If the signal is centered around 2.5V as mentioned, then it sounds like you will have difficulty meeting the TTL thresholds for hi/low. A TTL input signal is defined as "low" when between 0 V and 0.8 V with respect to the ground termina...  Scope both encoders and compare the signals that you are seeing on both.  What are the differences?
    Regards,
    h_baker
    National Instruments
    Applications Engineer
    Digital Multimeter Resources

  • Cartes compteurs carte PCI 6601

    Bonjour,
    Je souhaiterais compter le nombre d'implusion d'un signal carré. Pour cela j'utilise la carte PCI6601 avec la carte de comptage SCB-68. Comment faire pour configurer la voie sur laquelle on récupère le comptage? et comment récupérer cette valeur, y'a t'il des configurations spécial?
    où puis-je trouvé des exemples sous labview 7?
    merci de votre réponse.

    Divers exemples sont livrés avec LabVIEW.
    Pour la version anglaise de LV 7.1 :
    Menu de LV --> Help --> Find examples --> Onglet "Browse" --> Browse according to : Task --> Hardware Input and Output -->
    Pour DAQ traditionnel :
    Traditional DAQ --> Counters --> NI-TIO --> Count Edges (NI-TIO).vi
    Pour DAQmx :
    Daqmx --> Counter Measurements --> Count Digital Events --> Count Digital Events.vi
    Ces deux exemples fonctionnent avec la PCI-6601 et donnent les indications nécessaires pour le câblage et vous serviront donc de point de départ pour réaliser votre application.

  • Count pulses with pci6601 and bnc2110

    Hi,
    I am trying to count pulses using a pci-6601 in combination with a bnc2110 connector block. I tried to connect a lolck wave to the 2110 but I dont know to which connector I should connect it. In the measurement and automation explorer I dont see any counts. Also in the measurement and automation explorer I can only choose pfi39 to 11 and I cannot find these on the 2110.  I dont know to which bnc connector pfi39 is connected and it does not say it in the manual.
    Any help is greatly appreciated!
    Toeno

    ear Sir,
    Thank you for your post. You should indeed use the BNC 2121. The BNC 2110 us not supported for the counter timer cards.
    To know a little bit about the routing from the signals you can compare the pinout positions from the SCB 68 to the positions with the BNC box. Connector layouts can be found under http://digital.ni.com/public.nsf/allkb/F011AD8B0F4BD35086257050006CBB70?OpenDocument
    But again the BNC 2110 is not supported for the PCI 6601,
    best regards,
    Martijn S
    Martijn S
    Applications Engineer
    NI Netherlands

  • Generate a delayed counter pulse

    I am posting this to see if anyone can shed any light on various DAQmx operations with counters.  I appear to have found a solution for the project but various counter operations are certainly not well documented and the notes I am posting may help anyone trying to do something similar.
    The project is to monitor an analog input channel and when a certain criterion is met generate a pulse with a specified width at a specified delay from the event.  It is being done in a LV Real Time system.  Initially I tried to start a counter task within a loop, wait until done and stop the task.  What I have found is that it takes a long time (of the order of 10-100's of ms) for the start task to return and the wait until done doesn't reliably return at the time the counter pulse is finished being generated.  Other people seem to have found the same problem.  This is described in the part 1 attachment and the attached vi.
    The other way to do it is with a retriggerable counter task and using a digital line on the same card to trigger the counter.  Then the way the counter works if there is a single pulse or multiple pulses is different.  The way low time and high time are interpreted is odd.    This is described in the part 2 attachment with screenshots from Scope captures.  I have a proposed solution but I'm not sure if it is the best way to do it.
    Any suggestions appreciated.
    Attachments:
    Generate delayed Counter Pulse problem part 2.doc ‏108 KB
    Generate delayed Counter Pulse Problem part 1.doc ‏25 KB
    Generate Counter Pulse.vi ‏153 KB

    Andrew,
    If you want to start a counter output task based on an analog input you should use an analog trigger (if your device supports analog triggering). Take a look at the example Cont Acq Sample-Timed Loop-Analog Start.vi (in the example finder - search for "trigger") for how to set up an analog trigger in DAQmx. Also, you can use the Start.Delay property in the DAQmx Trigger property node to specify an amount of time to wait after the Start Trigger is received before generating the first sample
    Michael P
    National Instruments

Maybe you are looking for

  • Using Usb cable?

    I have tried using various mini USB cables to connect my BB to my desktop PC I have used a cable with separate power and with out. I always get a message saying there needs to be a connection with more power. How is that achieved? Thank you

  • Can i play different songs to different airplay speakers at the same time ?

    Can i play different songs to different airplay speakers at the same time ? I know you can select the different speakers to play the music to, but wondered if you can also push different music to different speakers at the same time ? If not is there

  • External Authentication Solution?

    I am looking for an external authentication solution for Web AS (ABAP Specifically but the whole AS would be preferable) i.e. Our External Authetication system sits in front of SAP that does Auth then passes username in a HTTP Header to SAP.. So far

  • Cannot create PDF via Postscript

    I am trying to create a postscript file from Photoshop CS3 via the Adobe PDF 8.0 Printer. The file needs to fit on tabloid size paper to accommodate the crop marks. I choose the PDF printer, create postscript file, distill it and open it in Pro 8.1.2

  • Oracle 11i(11.5.0.2) Data guard setup

    Hi, Hi, I am currently doing a test for 11i(with10.2.0.3 db) with Data guard. Since I have only one test server. I have created the Primary,Standby and the application Tier on one server. After switching over to the standby and trying to run autconfi