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

Similar Messages

  • Internal counter/timer PCI 6259.

     I need to create a high digital pulse and them wait a certain time (I choose) that the device must wait(low level) until it creats a new high state level. This wait time must use the PCI's clock as base.

    Krsone, the example you sent didn't open here because I have only LabView 7.1 here in the Laboratory.
    Wayne, I've searched in the examples and I didn't find what I want or something related.
    What I did is create a boolean array and put it to send each position in a specific frequency. For example I chose a frequency
    of 10Mhz and create a boolean array of 20000 positions. In the first position and in the last I put a "High Level data" and in
    the others a "Low Level data", so I achieved  a sinal that sends a High level signal and after 2 sec send another one.
    To change the time between the high level states I must change the boolean array and for it I have to stop the vi.
    What I want is a vi with a configurable time between these 2 high states while the vi runs.

  • 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

  • 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

  • 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

  • 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

  • Can I use Intel 815EP AGP 4X Pentium and plug in 5 Nos NI 6002 PCI counter Timer cards, instead of going for expensive PXI based solution? Hope there will be no degradation in performance - when used for constructing an Energy Meter test Bench.

    I was recommended to buy NI 6002 with PXI series, 5 Nos cards($875x 5 nos), and additionally a PXI rack costing about $ 2195 + some min--- card to interface with the computer costing another $ 875. Compare this with $ 675 x 5 Nos for 5 Nos PCI based NI 6002 + some cablesa nd connectors for synchronisation.
    First option is extremely expensive. But NI marketin manager will be glad that he sold more harware. But I want the truth. Why can't Intel 815 Pentium board be used?

    I am addressing the question if using PCI-6602s instead of using PXI-6602s will affect the performance, and the answer is NO. 6602 counter/timer devices comes in two different form factors, PXI/Compac PCI and PCI. The accuracy and performance is the same for both the PXI and PCI 6602s. However, using PXI solution will allow users an easier time with synchronization since that is the provided in the backplane of the PXI chassis. Additionally, if you ever need a higher accuracy solution you can add the 6608 device which has 75 parts per billion ppb vs 50 ppm of the 6602 devices. With 6608 plugged in the second slot of the PXI chassis (the one next to the controller), the high accuracy timebase is automatically shared acrossed the backplane of the PXI chassis which mean
    s that other 6602 devices in the chassis will share the same accuracy of the 6608. If the difference in the accuracy is not a concern and you are currently not ready to invest in the PXI platform, then you can go with the PCI 6602 devices.
    Best Regards,
    June Zhu
    National Instruments
    Digital and Timing Product Support Engineer

  • Mounting 3 pairs of omron sensor E3X-F21 at 25mm intervals to measure time taken by moving object breaking beams and connecting to 6601 counter/timer card

    System is Windows ME Labview 6.1 6601 Counter/timer card. 3 pairs of Omron Photoelectric sensors E3X-F21 are mounted on a flat surface and as the object passes the first pair of sensors it starts timer1 and timer2.
    As the object passes the second pair of sensors it stops timer1 and as the object passes the third pair of sensors it stops timer2
    We have a known distance between the sensors so we are able to calculate the objects speed and position.
    We need a wiring diagram to connect the sensors to the 6601 card.

    I think I can describe a method that'll probably be simpler than the previous answer because it won't require any external logic circuitry.
    1. Configure two counters for "Two-Edge Separation" measurement, let's say counters 0 and 1.
    2. Wire Sensor 1's signal to both AUX-0 and AUX-1.
    3. Wire Sensor 2's signal to GATE-0.
    4. Wire Sensor 3's signal to GATE-1.
    5. Wire each sensors' 'ground' to the appropriate ground pins on your terminal block.
    6. Software configure both counters to use "max internal timebase" for a source -- 20 MHz for the 6601.
    You can specify the polarity of the transition you care about for both the AUX and the GATE signal, but I'll explain in terms of rising edges for both.
    Counter 0 will count time from Sensor 1's rising e
    dge until Sensor 2's rising edge. Counter 1 will count time from Sensor 1's rising edge until Sensor 3's rising edge. The count values will be in units of "# of 20 MHz cycles elapsed."
    You can probably get a decent starting point on the software using one of the shipped examples.

  • Programming periodic interrupt generation on PCI-6601/6602

    Does anyone have experience or knowledge programming the the PCI-6601/6602 or similar card in Visual C++ using the NI-DAQ library to generate an interrupt at a user defined rate (eg. 60Hz) and tying a user defined ISR to that interrupt? I've been looking for sample code, and even the commands in the NI-DAQ function reference to be able to do this, but have found nothing.
    Thanks,
    M Evans

    Anuj,
    I have a vehicle driving simulation application which must me executed at a constant, steady rate, could be 60, 70, 72 Hz, depending on the hardware in the system. The update rate cannot be controlled internally by the application itself due to the limitation of millisecond resolution in Windows' callbacks, etc. So we want to use the high resolution timer on a card like this one and tie our application to an interrupt or event generated by the card.
    With the millisecond resolution in Windows, the closest we can get to 60Hz is 62.5Hz (0.016 seconds per frame). With microsecond resolution we can actually get 60Hz (0.016666 seconds per frame).
    I realize that we will still be at the mercy of the Windows operating system to some extent, but this solution gets us a lot closer to the steady, realtime update rate that we need.
    Thanks,
    M Evans

  • 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 need to read multiple counters using PCI 6601 can I do this, and How?

    I am reading 4 TTL signals from a Magnetic Pickup how do I read multiple channels using PCI 6601?

    Not concerning my primary question, I would like to point out to an N.I. Rep. that there is a typo in the help section concerning "posting a message".
    I have built a large format, two axis digitizer using linear encoders, a 6601 counter/timer, and labview 8. In building my application program, I  initially am using two daq assistants, with each set up to accomplish  the task of reading two encoders simultaneously. In doing some research, It has come to my attention, that, with my current configuration, errors may result, due to one daq assistant attempting to access the cards driver while the other is acquiring data.  All attempts to get two channels working through a single daq assistant have resulted in an error message informing me that I can only have one task per counter.Thus far, I have not seen any noticeable errors, thought I would like to have this device "rock solid", as it will be used extensively.
    Is it possible, that I should have purchase  an "S" series board instead?

  • Counter roll-over when measuring period

    Hi,
    I'm using PCI-6251 counter 0 to continuously measure the period of a signal, and I notice there are occasionally  error readings. Since the counter can roll over when it reaches 2^32-1, I need to know what will happen to the period measurement when counter roll overs. Would anyone please help me?
    Thanks.
    David

    The count value will simply wrap-around back to 0 and then continue to increment.  I can think of a few ways to handle this:
    1. Specify a slower timebase for the measurement.  If you go from, say, 80 MHz to 100 kHz, it'll take 800 times as long a period to cause rollover.  This method is pretty simple to implement, but not all apps can accept the loss in precision.
    2.  You can use a 2nd counter to be sensitive to the 1st counter's "terminal count".  This gets a bit complex, so you may need to do more research on some of the terms that follow.
    An internal pulse signal is generated on the board when the 1st counter rolls over from 2^32-1 back to 0.  It's commonly known as "terminal count" or TC.  You'll need to configure a 2nd counter that also measures periods of your external signal, but which uses those TC pulses as its timebase signal.  You may need to fiddle with the "Duplicate Count Prevention" property on the 2nd counter so that it will buffer values of 0 during the majority of intervals where no TC pulse occurs.  During the intervals where rollover happens, the 2nd counter will count how many times it happens.
    You would further need the 2 counters to be started off a common "arm start" trigger to keep their data sync'ed.
    3.  Software method.  You can query the DAQmx Channel property "Counter Input -> General Properties -> More -> Terminal Count Reached".  When you get a 'True' output, the property resets such that subsequent calls will return 'False' until the next rollover occurs.  The problem here is trying to correlate this software-detected rollover with a specific period in the 1st counter's measurement buffer.  You'd probably also need to be querying and tracking the DAQmx Read property for Total Samples Acquired both before and after the TC event.  Even then you might not always be able to determine unambiguously which interval had the TC event.
    -Kevin P.

  • Is ther a way to speed up a Mac? Mine has gotten slower and slower over time.  When memory comes close to full would that have an effect on performance? Is there a way to determine unused programs/software to remove and free space?

    Is there a way to speed up a Mac (similar to de-fragging on a PC)? Mine has gotten slower and slower over time. 
    When memory/disc comes close to full would that have an effect on performance? How should I determine what programs/software to remove and free space?

    Things You Can Do To Resolve Slow Downs
    If your computer seems to be running slower here are some things you can do:
    Start with visits to:     OS X Maintenance - MacAttorney;
                                      The X Lab: The X-FAQs;
                                      The Safe Mac » Mac Performance Guide;
                                      The Safe Mac » The myth of the dirty Mac;
                                      Mac maintenance Quick Assist.
    Boot into Safe Mode then repair your hard drive and permissions:
    Repair the Hard Drive and Permissions Pre-Lion
    Boot from your OS X Installer disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Utilities menu. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the installer.
    Repair the Hard Drive - Lion/Mountain Lion/Mavericks
    Boot to the Recovery HD:
    Restart the computer and after the chime press and hold down the COMMAND and R keys until the Utilites Menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD disk icon and click on the arrow button below.
    When the recovery menu appears select Disk Utility. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported, then click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the main menu. Select Restart from the Apple menu.
    Restart your computer normally and see if this has helped any. Next do some maintenance:
    For situations Disk Utility cannot handle the best third-party utility is Disk Warrior;  DW only fixes problems with the disk directory, but most disk problems are caused by directory corruption; Disk Warrior 4.x is now Intel Mac compatible.
    Note: Alsoft ships DW on a bootable DVD that will startup Macs running Snow Leopard or earlier. It cannot start Macs that came with Lion or later pre-installed, however, DW will work on those models.
    Suggestions for OS X Maintenance
    OS X performs certain maintenance functions that are scheduled to occur on a daily, weekly, or monthly period. The maintenance scripts run in the early AM only if the computer is turned on 24/7 (no sleep.) If this isn't the case, then an excellent solution is to download and install a shareware utility such as Macaroni, JAW PseudoAnacron, or Anacron that will automate the maintenance activity regardless of whether the computer is turned off or asleep.  Dependence upon third-party utilities to run the periodic maintenance scripts was significantly reduced since Tiger.  These utilities have limited or no functionality with Snow Leopard or later and should not be installed.
    OS X automatically defragments files less than 20 MBs in size, so unless you have a disk full of very large files there's little need for defragmenting the hard drive.
    Helpful Links Regarding Malware Protection
    An excellent link to read is Tom Reed's Mac Malware Guide.
    Also, visit The XLab FAQs and read Detecting and avoiding malware and spyware.
    See these Apple articles:
              Mac OS X Snow Leopard and malware detection
              OS X Lion- Protect your Mac from malware
              OS X Mountain Lion- Protect your Mac from malware
              About file quarantine in OS X
    If you require anti-virus protection I recommend using VirusBarrier Express 1.1.6 or Dr.Web Light both from the App Store. They're both free, and since they're from the App Store, they won't destabilize the system. (Thank you to Thomas Reed for these recommendations.)
    Troubleshooting Applications
    I recommend downloading a utility such as TinkerTool System, OnyX, Mavericks Cache Cleaner, or Cocktail that you can use for removing old log files and archives, clearing caches, etc. Corrupted cache, log, or temporary files can cause application or OS X crashes as well as kernel panics.
    If you have Snow Leopard or Leopard, then for similar repairs install the freeware utility Applejack.  If you cannot start up in OS X, you may be able to start in single-user mode from which you can run Applejack to do a whole set of repair and maintenance routines from the command line.  Note that AppleJack 1.5 is required for Leopard. AppleJack 1.6 is compatible with Snow Leopard. Applejack does not work with Lion and later.
    Basic Backup
    For some people Time Machine will be more than adequate. Time Machine is part of OS X. There are two components:
    1. A Time Machine preferences panel as part of System Preferences;
    2. A Time Machine application located in the Applications folder. It is
        used to manage backups and to restore backups. Time Machine
        requires a backup drive that is at least twice the capacity of the
        drive being backed up.
    Alternatively, get an external drive at least equal in size to the internal hard drive and make (and maintain) a bootable clone/backup. You can make a bootable clone using the Restore option of Disk Utility. You can also make and maintain clones with good backup software. My personal recommendations are (order is not significant):
      1. Carbon Copy Cloner
      2. Get Backup
      3. Deja Vu
      4. SuperDuper!
      5. Synk Pro
      6. Tri-Backup
    Visit The XLab FAQs and read the FAQ on backup and restore.  Also read How to Back Up and Restore Your Files. For help with using Time Machine visit Pondini's Time Machine FAQ for help with all things Time Machine.
    Referenced software can be found at MacUpdate.
    Additional Hints
    Be sure you have an adequate amount of RAM installed for the number of applications you run concurrently. Be sure you leave a minimum of 10% of the hard drive's capacity as free space.
    Add more RAM. If your computer has less than 2 GBs of RAM and you are using OS X Leopard or later, then you can do with more RAM. Snow Leopard and Lion work much better with 4 GBs of RAM than their system minimums. The more concurrent applications you tend to use the more RAM you should have.
    Always maintain at least 15 GBs or 10% of your hard drive's capacity as free space, whichever is greater. OS X is frequently accessing your hard drive, so providing adequate free space will keep things from slowing down.
    Check for applications that may be hogging the CPU:
    Pre-Mavericks
    Open Activity Monitor in the Utilities folder.  Select All Processes from the Processes dropdown menu.  Click twice on the CPU% column header to display in descending order.  If you find a process using a large amount of CPU time (>=70,) then select the process and click on the Quit icon in the toolbar.  Click on the Force Quit button to kill the process.  See if that helps.  Be sure to note the name of the runaway process so you can track down the cause of the problem.
    Mavericks and later
    Open Activity Monitor in the Utilities folder.  Select All Processes from the View menu.  Click on the CPU tab in the toolbar. Click twice on the CPU% column header to display in descending order.  If you find a process using a large amount of CPU time (>=70,) then select the process and click on the Quit icon in the toolbar.  Click on the Force Quit button to kill the process.  See if that helps.  Be sure to note the name of the runaway process so you can track down the cause of the problem.
    Often this problem occurs because of a corrupted cache or preferences file or an attempt to write to a corrupted log file.

  • 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

  • Counter/Timer Waveform

    I would like to convert period measurements (RPM data) received from my counter/timer board into waveform data type so that I would be able to conduct frequency analysis on the data (e.g. FFT). Have tried with limited success interpolation & decimation techniques. Would be grateful for any suggestions.

    Malfesto,
    I had a look and can offer up a few comments:
    1. I don't understand your comment about "truncation error" in the slow speed pulses case. Perhaps your are remarking about the "glitches" in the slow data embedded in the block diagram array? More on this a bit later...
    2. At least at a quick glance, the interpolation seems a little funky. I didn't spend a ton of time wrapping my head around it so maybe it's actually ok, but I saw a finite difference that would act like a derivative of the period, and a scaling factor based on the average period -- things that make me go hmmmm.
    Also, if you zoom on the graphs for the Slow Data, you can kinda see that the "Post Processing Graph" looks like a derivative of the "Pre Processing Graph". I suspect you need to rework your interpolation method.
    3. When I did a similar project, I think I first converted all the periods to frequencies and also generated a "sample time" array that was the cumulative sum of the periods. (I toyed with tweaking the time array so that the timestamp would correspond to the midpoint of the interval that I had converted to a frequency. I don't recall now whether that tweak proved useful enough to bother with).
    Once I had laid out arrays for frequencies and (unequally-spaced) sample times for those frequencies, I could generate an equally-spaced time array at a desired "virtual sampling rate" and interpolate to create new "virtual frequency" values. Since I was merely post-processing data, I think I also used the native LabVIEW array functions 'Threshold 1D Array' and 'Interpolate 1D Array' in the interpolation process.
    Now, before going into an FFT you'll want to remove the huge DC offset. This may be as simple as subtracting the mean or median frequency from all entries if you are nominally at constant speed.
    4. Your raw dataset for Slow Data has suspiciously periodic glitches in the periods. There is a very strong and dominating pattern that repeats every 16 intervals. Your typical period is registering about 10 million timebase cycles. However, in every set of 16 periods, you get one period around 27 million and another around 35 million.
    I don't know how you gathered your "Slow Data" values, but there seems to be a systemic error in the measurement. That sort of one-sample discrepancy looks very suspicious. I'd urge you to determine the source of those glitches and try to eliminate them. They don't appear to be telling the truth about the motion you wish to characterize. The device you measure doesn't by chance start and stop or go back-and-forth during your measurement, does it?
    Hope this helps.
    -Kevin P.

Maybe you are looking for