How to reset a counter on external signal in LabView?

Hallo there!
I am using LabView v 8.5 and the NI USB-6211 to acquire signals, among them are the following:
1) angular pulses from a rotary encoder
2) a reference pulse for the rotary encoder witch will give a pulse on a specific position of the movement for every rotation
3) value from a pressure sensor
What I am trying to do is to create a pressure/volume diagram based on the pressure and volume inside a cylinder of an IC engine. To do this, I will need the angle of the engines crankshaft to calculate the pistons position in the cylinder. This way I can calculate the volume and put it in a xy graph to represent the volume (x-axis) and the pressure(y-axis).
I am using clk0 to count the pulses from the angular encoder, and this works great. However I now need the reference pulse to somehow reset the count at the precise time it goes high in order to precisely know the angular position.
How can I do this? And how precise will this be? And will I need any kind of synchronization with my pressure measurements? If so, how?
The relevant part of the program I am working on resembles the Count Digital Events with reset.vi 33 KB as found in this thread. However, I don't know how to get the reference pulse to reset as the stop button is. How can I do this?
In addition: the fast pulses of the angular encoder = 0-> ~10kHz. I seem to lose information if I use the basic level trigger detection.vi when I put this signal on an analog port.
-J

Hi Nick,
If you have an X Series or 2nd Generation cDAQ chassis (basically any cDAQ chassis except for the 9172 or 916x sleeves) then you can implement:
1,2,3,4,5,6,7,8,9,10,(reset),1,2,3,4,5,6,7,8,9,10,(reset),1,2...
You would have to configure an Edge Count Task, set the initial value to 232 - 6 (such that the 6th count causes the counter to rollover, which generates a pulse on the counter output), and enable the count reset using your external signal:
The count reset isn't currently available for other DAQ devices, but I believe it should be available on M Series (62xx) and TIO (660x, 6624) with a future driver release (some time in 2012).
If you don't have an X Series (or gen II cDAQ), don't despair.  On other hardware, you can get close to the previous behavior with a counter output task, with the exception that the "reset" signal would only be detected after the 2nd tick after your pulse is output.  Also, the reset signal would have to occur at the beginning to arm the counter the first time.
Or, you can get the 3rd behavior that you asked for by doing a continuous counter output task with the external signal as the source of the timebase ticks.  For example:
1,2,3,4,5,6,7,8,9,1,2,3,4,5,6,7,8,9
In toggle mode (default):
6 ticks of initial delay, 2 ticks high, 7 ticks low, 2 ticks high, 7 ticks low, ... etc.
In pulse mode:
6 ticks of initial delay, 9 ticks high, 9 ticks low, 9 ticks high, 9 ticks low, ... etc.
See here for an overview of the difference of the two modes.  Basically, pulse mode will emit a short pulse when TC is reached, and toggle mode will toggle the state of the counter.  You can't have less than 2 ticks as a high time, low time, or initial delay.
Best Regards,
John Passiak

Similar Messages

  • How to reset play count

    how to reset play count in iTunes

    Right-click the track(s) in iTunes, and choose "Reset Plays."

  • How to take a derivative of a signal in Labview Fpga

    How to make derivative of a position signal acquiring using AI module of cRIO to get the velocity signal.
    I got one example in forum and i m attaching that, bt i need to implement this in FPGA.
    Note : The position is varying at 30Hz to 80Hz Freq.
    Attachments:
    derivative.jpg ‏48 KB
    derivative.jpg ‏48 KB

    I forgot to mention that one problem with numerical differentiation is that if you have a noisy signal, the noise is amplified!
    You can try implementing a moving average or median filter in the FPGA code. There are a number of previous threads and Community posts on these, ranging from simple implementations to more complex ones. Try using the search function at the top of the page to look for them.
    Of course, it's easier to acquire the raw data, send it to the RT host and do your processing there, depending on resources.
    Regarding the sampling time, you have hopefully set this via the tick delay you set in the FPGA acquisition loop.
    CLD

  • How to reset a count variable in a conditional format trigger

    I am using a conditional format trigger to eliminate sections of a report where there is no data. The trigger is automatically generated by reports (shown below). the condition is :com_count = '0' therefore no record, no display of section - if :com_count>0 then data present and display record.
    It works fine eliminating the sections - until actual data is found - and count is set to 1 and it displays the record. The problem is that once :com_count >0, then the section displays throughout the rest of the report whether there is actually data or not.
    It seems that :com_count needs to be reset to 0, but when I try to do that, it throws an error stating that :com_count is a read only variable.
    I am new to PL/SQL so can anyone suggest how I can reset the :com_count to 0 each time the trigger fires with :com_count = 1?
    Any help would be appreciated. Thanks,
    Glenn
    The conditional format trigger is:
    function M_G_COM_RANK_GRPFRFormatTrigge return boolean is
    begin
    -- Automatically Generated from Report Builder.
    if (:COM_COUNT = '0')
    then
    return (FALSE);
    end if;
    return (TRUE);
    end;
    The count
    It works perfectly

    wher is your COM_COUNT defined?
    If should be defined in the datamodel in the "mastergroup" of the "detailgroup" of which you want to count the records.
    If you do so, there is a property of the item "Reset at" ( which is by default set to "Report") and you then can change it to the name of the mastergroup. So every time a new record is "active" in the mstergroup, the count-item will be reset to 0.
    hope this helps

  • How can I measure coherence between EEG signals using labview?

    well, I have an EEG signal(a matrix 16X8498)whose lines represent the channels and collums the samples. The last line is the stimulus channel. I would like to know if I can measure the coherence between my EEG channels(lines)using labview.If,yes,is there someone who has the block diagram?

    Search the Labview help for coherence and you'll find several functions (in Labview 6.1 Full Development System). The functions are in the palette Analyze >> Waveform Measurements >> Frequency Response Function (Mag-Phase) or (Real-Im).

  • How to reset new page counter

    Does anybody knows how to reset page counter (next free page number suggested on page creation)?

    If your web host doesn't provide you with meaningful stats, sign-up for Google Analytics.  Google will give you more valuable stats about your site visitors than a hit counter will.  And it's free.
    http://www.google.com/analytics/
    Simply paste the GA code they give you into your web pages.
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb

  • How to Reset HP LaserJet 1500L Drum and Toner

    (Note: This also applies to some other laser printers too. If so then please update this thread to indicate the model and any extra instructions.)
    The legacy 1500 and 1500L use dumb toner and drum cartages. They have a chip which simply counts the number of pages printed, and when a preset number (as per cartridge size) have been printed, it sends a signal to the printer to replace it. This is ok if you print the average amount of ink per page, but if you print a lot of photos, the cartage will be exhausted before the indicator flashes, and if like the rest of us you print the usual selection of documents etc, then probably about 50 to 25 percent of the toner remains - what a waste!.
    Fortunately, (or not) HP kindly provide incorrect instructions how to reset the counter. It's a pity that customer support don’t read their own documentation, or put it in the manual.
    Do exactly the following:
    1) Turn the printer power switch off.
        Wait 10 seconds for any residual charges to clear.
    2) While powered off, press and hold the GO button (right hand)
    3) Turn the printer power switch on while continuing to hold the GO button down.
    4) After the Go, Ready, and Attention LEDs turn on, continue holding the GO button
        for at least 20 seconds (maybe 30 seconds). During this time, the Attention,
        Ready, and Go LEDs will each eventually turn off.
    5) When it seems to have stopped, now release the GO button.
    6) The printers LEDs will begin cycling from front to back. After about 15-30 seconds it finishes    
        and everything goes quiet. The printer should now be in the 'ready' state.
    7) (The missing instruction) Press the cancel (orange) button.
    Send a simple colour document to the printer and it should print out ok, proving it is all ok.
    Keep printing until one of the cartages or the fixer toner drum are depleted and printing result is unacceptable.

    Hailun, welcome to the forum.
    Here is a guide to help you solve your problem.  Read it carefully and follow the instructions step by step.
    Please click "KUDOS" if I have helped you and click "Accept as Solution" if your problem is solved.
    Signature:
    HP TouchPad - 1.2 GHz; 1 GB memory; 32 GB storage; WebOS/CyanogenMod 11(Kit Kat)
    HP 10 Plus; Android-Kit Kat; 1.0 GHz Allwinner A31 ARM Cortex A7 Quad Core Processor ; 2GB RAM Memory Long: 2 GB DDR3L SDRAM (1600MHz); 16GB disable eMMC 16GB v4.51
    HP Omen; i7-4710QH; 8 GB memory; 256 GB San Disk SSD; Win 8.1
    HP Photosmart 7520 AIO
    ++++++++++++++++++
    **Click the Thumbs Up+ to say 'Thanks' and the 'Accept as Solution' if I have solved your problem.**
    Intelligence is God given; Wisdom is the sum of our mistakes!
    I am not an HP employee.

  • Can I trigger the read of a buffer period measuremen​t with a external signal (PFI line) with my 6602 card? How can I do it?

    I am doing a buffered period measurement with a 6602 card, Labview real time. I want to measure the period of 6 rising edges of a TTL, but I want to do it exactly when an edge comes on other external signal (of course slowler than the previous one), that is to say that I want an external start trigger. Can anybody help me? I have hardly searched at the web and I have not found an example of code of what I am looking for.
    Another question:
    After reading the buffer, how does my program know that the data has been refreshed in a continuous measurement? I attach two VIs I am trying to make work and a quite explanatory bmp of what I
    want to do.
    Thanks.
    Attachments:
    rtc_regimen.zip ‏3 KB
    Buffered_Period_pulse_generation.vi ‏283 KB
    simgle_counter_pulse_generation.vi ‏177 KB

    Hello;
    I can't think of any way to accomplish that task. Once the counters have only two input pins, and both are in use when one configures the counter to do buffered measurements, there isn't a way to trigger that operation in hardware.
    I'm not sure if I understood your second question, however, the buffered operation on a counter is hardware controlled, meaning that a pulse on its gate input triggers the transfer of the count value from the counter register to the PC memory buffer. That is therefore a continuous measurement.
    Regards
    Filipe A.
    Applications Engineer
    National Instruments

  • How do i reset a counter in crio scan interface mode

    Hai,
         I am using cRIO 9104 with NI 9421(DI SINKING) module for my counter application in scan mode.
    I have a doubt that how do i reset my counter previous value when my system is in idle mode(i.e stable mode).I tried to use a timeout in property node, But i am not able to put a timeout in my code ,herewith I have attached the printscreen of my program.You can see the timeout option is in hide mode.Any other option is there to reset a counter.Kindly solve this problem and let me know the details.
    Thanks and Regards
    Jayanthi.K
    Attachments:
    Untitled.png ‏292 KB

    You need to get a refnum for the module.  The simplest way to do this is to drag the module in the project onto your block diagram.  It will drop a refnum constant for the module.  You will find all kinds of useful properties and methods on this refnum.  In this case the refnum is of a class named "SD Module" (where "SD" stands for "Specialty Digital") and it has a method on it for resetting counters.  See the attached screenshot of the block diagram.
    Ross Houston
    Senior Software Engineer
    RIO Software R&D
    Attachments:
    reset_counter.png ‏3 KB

  • I have a new HP Officejet 6500A plus.  I cannot get it to connect to            my Airport Extreme V5.6.  It see the wifi signal but Fails on "Filtering" and possibly the channel.  Does anyone know how to reset or reconfigure filtering

    I have a new HP Officejet 6500A plus.  I cannot get it to connect to my Airport Extreme V5.6.  It see the wifi signal but Fails on "Filtering" and possibly the channel.  Does anyone know how to reset or reconfigure filtering and channel on the old airports?

    This is a part of the larger MacBook Pro connectivity issue. There are several related threads dealing with the MBP's networking problems. If your unit is suffering from this type of difficulty, good luck ... (or a long ethernet cable)
    (PS Everybody please make noise on this one so apple comes up with a solution.)
    < Edited by Host >

  • How do i reset play count?

    How do i reset the play count on my iPod? (I have an iPod Video.) Also, in anyone knows how to do it on itunes too, that would be awesome. Thanks.

    In iTunes go to edit/select all (or highlight just the songs that you want to reset). Right click on the songs and select "reset play count". Click 'ok'.
    Sync your ipod to iTunes to reflect the changes on there also.

  • How to reset a row count based on a column value?

    OracleBI Discoverer 10g (10.1.2.3)
    Oracle Business Intelligence Discoverer Plus 10g (10.1.2.55.26)
    I've got a Discoverer Plus report that shows item receipts, receipt dates, and if the receipt was inspected. I've got items that should be inspected every 5th receipt. There's got to be a handy-dandy function I can use to do this, right?
    Item        Receipt Date      Inspected         
    Bracket     1/1/2009               Y
    Bracket     2/1/2009               N
    Bracket     3/1/2009               N
    Bracket     4/1/2009               Y <--let's assume someone didn't follow the instructions
    Bracket     5/1/2009               N
    Bracket     6/1/2009               N
    Bracket     7/1/2009               N
    Bracket     8/1/2009               N
    Bracket     9/1/2009     I'm looking to count the receipts and reset the counter when Inspected = Y
    Item        Receipt Date      Inspected     Inspect_Count       
    Bracket     1/1/2009               Y                  0
    Bracket     2/1/2009               N                  1
    Bracket     3/1/2009               N                  2
    Bracket     4/1/2009               Y                  0
    Bracket     5/1/2009               N                  1
    Bracket     6/1/2009               N                  2
    Bracket     7/1/2009               N                  3
    Bracket     8/1/2009               N                  4
    Bracket     9/1/2009                                  5 <-- receiver should inspect on this receipt I'm open to other methods if mine seems like a dud.
    -Tracy

    Hi,
    You can use this query for achieve your requierment in your view or you can include in your etl .
    REgards salim.
    SELECT item, receipt_date, inspected
      FROM table_inspect;
    ITEM    RECEIPT_DA INSPECTED                    
    Bracket 01/01/2009 Y                            
    Bracket 02/01/2009 N                            
    Bracket 03/01/2009 N                            
    Bracket 04/01/2009 Y                            
    Bracket 05/01/2009 N                            
    Bracket 06/01/2009 N                            
    Bracket 07/01/2009 N                            
    Bracket 08/01/2009 N                            
    Bracket 09/01/2009                              
    9 rows selected.Solution
    SELECT item,receipt_date,inspected,inspect_count
    from table_inspect
    model
    partition by (item)
    dimension by( row_number()over(partition by item order by receipt_date) rn)
    measures(receipt_date,inspected,0 Inspect_Count )ignore nav
    (Inspect_Count[rn]= case when inspected[cv()]='Y' then 0 else Inspect_Count[cv()-1]+1 end)
    order by receipt_date;
    ITEM    RECEIPT_DA INSPECTED  INSPECT_COUNT
    Bracket 01/01/2009 Y                      0
    Bracket 02/01/2009 N                      1
    Bracket 03/01/2009 N                      2
    Bracket 04/01/2009 Y                      0
    Bracket 05/01/2009 N                      1
    Bracket 06/01/2009 N                      2
    Bracket 07/01/2009 N                      3
    Bracket 08/01/2009 N                      4
    Bracket 09/01/2009                        5
    9 rows selected.Edited by: Salim Chelabi on 2010-03-03 07:49

  • How do I create an interrupt on the PCI-DIO-96 from an external signal connected to the lines PC0 or PC3 of a port?

    Hi everybody,
    we are currently using the PCI-DIO-96 for data acquisition from an old AT-DIO-32F card. All PPIs and ports work in mode 0 (standard input/output). The manual mentions the possibility to create an interrupt from an external signal connected to the lines PC0 and PC3 of port C from a PPI. To get the interrupt I have connected my interrupt service routine to the PCI-DIO-96, enabled the master interrupt enable bit in the interrupt configuration register 2 and enabled interrupt enable bits of every PPI chip in the interrupt configuration register 1. The interrupt should be generated if a signal low-to-high transition occurs on th
    e lines PC0 or PC3 of a PPI. We've simulated the signal low-to-high transition with an external voltage source connected to the line PC0. We actually saw in the memory that the line toggled from state low to state high, but no interrupt was generated. I don't have a guess what I am doing wrong. Perhaps anybody knows the solution of this problems.
    Thanks and best regards.
    Sven Jungnickel

    You may want to try disabling your USB or IEEE-1394 host controller. It's possible that one of these devices could be on the same interrupt as you DIO-96 and causing the interrupt to not be serviced.
    Regards,
    Erin

  • How to reset junk mailbox message count?

    Apologies if this is resolved elsewhere, but I can't find it. For the past several months I have received several "ghost" spams per day. (There is nothing in the sender, message header, or body.) The mail filter does not catch them. I wrote a rule (based on a suggestion in this forum) where if "from" does not contain "@" it is sent to junk. It seems to work fine. Since about then - and I'm not sure if the events are simultaneous - my junk mailbox won't reset its count of messages. I have erased all messages in it and SOME are erased, with the count being reduced by 3-4. The total shown next to the mailbox icon continues to grow, however. It is now around 50. There appear to be no messages in the mailbox. This began before I upgraded to Tiger and has continued since then. Mail seems to work fine, but it is very irritating. Thanks for your help.

    Hello Michael.
    Assuming this junk mailbox is for a POP type account, quit Mail first and using the Finder go to Home > Library > Mail > this account named folder (named by the user name and incoming mail server for the account) > Junk.mbox.
    Delete the Junk.mbox folder and empty the Trash.
    When re-launching Mail, a new Junk.mbox will be created automatically by Mail within the account named folder when receiving the next message that is automatically or manually marked as junk.

  • How do you reset pram with an external keyboard

    Hi, this is related to the keyboard and trackpad not working anymore on my 21month old MBP. I tried reinstalling osx 10.5 and no luck. Tried holding down the power button for 10seconds, got the beep but no trackpad and keyboard afterwards. The preference pane does not show up in the system pref panel anymore for the trackpad. I even downgraded to 10.4. and no luck. So question is there anyway to reset the pram with an external usb keyboard hooked up to the MBP. That is the only way that I can type right now. Or should is this a logic board issue. My video had been having issues about a week ago. The screen would stay blank and also zoom would work properly with pdfs or in CAD (it would be very pixelated at times). Any thoughts. Did the new firmware update fry my computer. Help Apple!

    Hi Bob.
    You can reset pram via a external usb keyboard the same way you would normally reset pram. Apple + Option + P + R. However pram will do nothing to your situation. Sounds as like you are having much bigger issues. When you reinstalled the OS, what type of install did you do? If you did an erase and install without bringing back you data, you probably have a hardware issue.
    Boomer

Maybe you are looking for

  • How can I back up my contacts and apps to Windows 7 if my iPhone has been previously sync'd to a Mac?

    I have always used my iBook G4 to sync and backup my iPhone 3GS, until the screen went wrong on my Mac. I managed to salvage the songs off the mac by turning it into a mass storage device (holding T on startup), and I'm currnetly using a Windows 7 la

  • Adding contacts to an icloud photo collection

    I tried to send a photo colection to iCloud. That worked all right. The probelm is I was adding names to those I wanted to be able to access the collection and did somthing wrong and it lauched and that was it. Now I cannot add contacts to have acces

  • Lumia 620 - Over sensitive screen, is this a fault...

    Hi In certain situations the screen on my lumia 620 will turn mega sensitive. It will detect my thumb above the screen and input letters and characters I am not touching. Sometimes it will even input letters on the bottom row when my thumb is over th

  • Default selection color

    Need some help with the following: Meshes in an 3D annotation are selectable, clicking a mesh changes it's color. double clicking a mesh selects all meshes in the annotation and draws some kind of wire frame box around all meshes in the scene. I want

  • Customer consignment stock view not available at Ship-to party level

    We have moved our stock to customer consignment stock using order type KB (Consignment fill-up). When we view stock situation using MB58 (Consignment at customer) the stock shows up under customer sold-to. However, we would like to see how much consi