30 second counter for detecting peaks

Hello,
I want to count number of peaks detected in a 30sec interval from a pulse signal acquired using DAQ.I made this programme and in this each second is almost taking 12 sec's more as compared to the real clock second.As a total it taking more than what I need(30sec).In real time the sinesimalutesignal vi will replaced with the DAQAssistant.And also the programme is not always running when the run is clicked but rather running sometimes.
Can some help me with this.
thanks in Advance.
Attachments:
Peak_detection.vi ‏81 KB

Hi PatanGova,
I am not sure if I understand your question properly. However, I took a quick look at your program and modified it a bit. I removed the outer while-loop and the case structure and added some error handling and initialization. I also removed the 1 sec timing in your loop, because if you open the simulated signal express vi, then under timing you can choose "simulate acquisition timing" to run the loop in the rate specified by the signal collection rate (1000 Hz with 1000 samples equals one second worth of data).
What happens now is that you generate a sine wave with the frequency of your choice. You will collect 1000 samples for every loop cycle, executed once every 1 second. You count the number of peaks in real-time and also the total after the 30 second countdown.
Please tell me if this helped anything or try to specify your question again.
Attachments:
Peak_detection_mod.vi ‏116 KB

Similar Messages

  • Count for item records reaches 999 the second idoc gets triggered!

    Hi Experts,
         I have an issue. Sender is file and receiver is idoc with a header and item  level records. Only one header and n number of records can be there.
    Now we want to make  this way that as soon as the count for item records reaches 999 the second idoc gets triggered.
      Hints / Solutions Pls.
    Regards,
    Arnab .

    incorporate mapping logic such that for every 999 item records create new IDoc node
    check with this UDF for IDoc node mapping, item records will be input to UDF
    int count = a.length;
    int k=999;
    result.addValue("");
    for(int i=0;i<count;i++)
          if (i>=k){
              result.addValue(""); // if records > 999, add IDoc node
              k=k+999;     
    Do rest of the mapping accordingly

  • Compare firts count for second count the doc.inventory

    Hello,
    I need of the  SAP transaction to compare first and second count,in the process the inventory management.
    In module MM.
    tks,
    Danilo Araujo

    incorporate mapping logic such that for every 999 item records create new IDoc node
    check with this UDF for IDoc node mapping, item records will be input to UDF
    int count = a.length;
    int k=999;
    result.addValue("");
    for(int i=0;i<count;i++)
          if (i>=k){
              result.addValue(""); // if records > 999, add IDoc node
              k=k+999;     
    Do rest of the mapping accordingly

  • I am trying to detect signal peaks (derivatives of the peaks both +ve and -ve peaks). simultaneously 2 peaks detectors are running, 1 for +ve and other for -ve peaks.

    i am trying to detect signal peaks (derivatives of the peaks both +ve and -ve peaks). simultaneously 2 peaks detectors are running, 1 for +ve and other for -ve peaks. when a peaks get detected it would trigger a pulse of approx 1 sec duration and at the same time it would disable the other peak detector for 1 sec time duration. after the time period, again both the peak detectors would be enabled. i have been able to detect both peaks but still not able to control the detectors block the way mentioned before.
    the code and the data are attached.
    Attachments:
    eog peak detection.vi ‏192 KB

    I'm not suggesting any of this as a model, and your needs are different than mine.
    1) Go to Preferences -> Audio.  Under "Default Audio Tracks", Set "Mono Media: Mono".  Set "Stereo Media: Mono"  (Choices from the pull-down for both are Use File, Mono, Stereo, 5.1, Adaptive)
    You can change these, but I don't. I am using both mono and stereo tracks. I set up a custom sequence with the particular combination of stereo and mono tracks I want.
    2) Set audio for clips by selecting all clips and going to Modify Clip -> Audio Channels Tab.  Under "Number of Audio Tracks" there should be a "1".  Under Channel Format it should read "Stereo".
    I am not sending the audio to anyone else to edit further. I am doing a final stereo mix. If camera one is set up to record 2 mikes as a stereo track, then I leave that unchanged and put it onto a stereo track. If camera two is set up to record one mike onto channel 1 as ambient sound and channel 2 is a mono feed from a sound board, then I modify those clips as Preset Mono, 2 audio tracks, Channel format Mono, and that puts the left source channel (or whichever I choose) onto Audio track 1, channel 1 (of one), and right source channel onto audio track 2, channel 1.
    4) Delete all the existing audio tracks in the sequence and replace them all with mono tracks, so all tracks in the sequence are mono.
    I modify the tracks while creating the sequence, and ultimately use a custom sequence.
    Under my Effects Controls panel there is only Channel Volume, and nowhere to adjust the pan.
    I'm using the mixer, not the effects control panel.

  • How can i use my smart TV as a second monitor for my Power mac (2010) via HDMI cable? i've made the connection but no options show in system prefs display.

    How can i use my smart TV as a second monitor for my Power mac (2010) via HDMI cable? i've made the connection but no options show in system prefs display.
    the computer:Mac Pro, Mac OS X (10.9.5), 2 x 2.66 Ghz 6-Core intel Xeon
    the TV: LG Smart tv

    The Mac uses a highly-parameterized universal Driver for every display. The parameters are set at certain times when a query is sent to your display. The display MUST answer with its name and capabilities, or the screen stays dark. A TV set that is off or "not paying attention" because it is set to a different port when the query occurs will rarely answer, and so will often remain dark.
    You can use tools in the System Report to see whether your display has been detected at all. If it has, the report will look something like this, but its name will appear:
    The times when the query is sent are:
    • at Startup
    • at wake from sleep
    • when the Mac-end of the cable is inserted
    • when using the Option ( Detect Displays ) button in displays preferences

  • Need help incorporat​ing the second counter into a current data acquisitio​n routine (continuou​s retriggera​ble AI).

    My current application acquires data when it sees a TTL trigger line.  Then it wait until the next TTL pulse and continues taking data until the user stop the data acquisition process.  I use "counter 0" as counter source.  The program works well.  However I need to read digital data everytime I take AI data.  I plan to use "counter 1" to read the digital data.  The trick is that I need to synchronize both AI and counter 1 readings. Therefore the counter 2 will acquire data when AI acquires data.
    Here is the code I implemented and would like to know if it is correct.  The new code (implementation of second counter) is in the bottom part of the code.  I will really appreciate your help. 
    Yajai
    Attachments:
    code.txt ‏6 KB

    Hi DrObb,
    What is sounds like you want to do is to specify an external sample clock for your analog acquisition and a digital acquisition. Is there a reason in particular that you're using a counter? What hardware are you using? If you simply want to sample a digital and analog channel on the same clock edge, this won't be very difficult (provided your hardware supports hardware-timed digital IO). You can find an example of this being done in C by going to: 
    Start » All Programs » National Instruments » NI-DAQ » Text-Based Code Support » ANSI C Examples and then navigating to  Synchronization\Multi-Function\ContAI-Read Dig Chan
    Regards,
    Sean
    Sean Ferguson
    Application Engineering Specialist | RF and Reconfigurable Test

  • Play count for imported items

    Here's a new one for me...
    Starting with this latest version, when I burn a CD, it automatically marks the Play Count for those items at 1. Anyone else encounter this? Is there a fix?

    i've noticed that sometimes the play count does not increase for songs, and the only workaround i've seen that works is to do a second sync after the first one completes.

  • Detecting peaks in blood pressure waveform.

    Hello all.
    I am studying human pulse waveforms and attempting to detect peaks in real time. I have a continuous stream of data coming in a serial port, this is converted from characters into integer values which are then plotted as a moving waveform. It is a good clean signal with little noise so I thought the easiest way was to keep a running array of values and, when the present value is less than the one before the previous value, (to allow for any single sample noise) that is the point where the peak has just happened. I then switch an LED.
    The point then is that I don't want the LED to stay on all the way down the slope, just flash briefly. Then I guess I need to ignore the comparison until the signal has gone past the valley and then start looking for a downward slope again.
    Can anyone tell me how, once the peak has been detected, to ignore looking for it until I'm on the upward slope again, maybe some sort of latching case structure, unlatched by a positive slope?
    I know there are peak detection functions in LV but they don't seem to suit real time waveforms. And I can't have thresholds because the signal amplitude may vary considerably.
    Thanks for any help.
    Andrew
    BTW, I'm using LabView 2012.

    Hi ASH2020,
    how about calculating the signal's discret first derivation; the derivation's sign should indicate a positive or negative slope.
    Alex
    ♜♖ LabView 8.6 - LabView 2014 ♖♜
    Attachments:
    2013-05-09_ddx.vi ‏13 KB

  • How to use peak detection in labview to detect peaks from data acquisition information

    Hi
    I am a university engineering student who is working in a team to develop a coin detector, its purpose is to recognize different coinage and detect fakes.
    For this we are using LabVIEW 8.5.1. I am relatively new to labview and have had no experience of using to before. We are trying to integrate four voltage signals produced by an electromagnet, straingauge, optical sensor and a proximity sensor. We have already developed signal conditioning for these tests and now wish to put them into labview.
    Our plan is to use peak detection on each of the tests so that labview can detect peaks which correspond to different coin types, provided they meet set criteria for each coin. Then to combine these either using logic or mathscript to produce a Boolean output for each coin.
    One of our advisors helped us develop a peak detection program for a simple simulated sine wave however we are struggling to adapt this for data acquisition information and itegrate it with mathscript and to be honest it does not make much sense. I have attached the program below. Thanks in advance for your assistance. 
    Attachments:
    Strain 2.vi ‏25 KB

    Chris,
    Here are several ways to help  you get started with peak detection:
    1. On your functions palette, you can search for "peak detect" and you'll find several different variations of VIs that will do peak detection.
    2. You may also want to take a look at this tutorial: Peak Detection Using LabVIEW and Measurement Studio
    3. There's an example in the example finder called "Peak detection and display" that will probably be useful. 
    Hope this helps, 
    Misha

  • I/O count for multipath device on each path

    Hi,
    I am using MPxIO (Bundled multipath) in my Solaris 10 (SPARC) setup for LDEVs from a Hitachi storage (USP-V), each LDEV is being accessed using two paths from the server. I want to verify the I/O count on each of the paths for LDEVs any idea what OS command I may use to verify this.
    Thanks in advance.
    Solomon.

    Hi Nik,
    iostat -Y <device Name> - does show the I/O count for all available paths. E.g.:
    iostat -Y ssd30 3 6 extended device statistics
    device r/s w/s kr/s kw/s wait actv svc_t %w %b
    ssd30 2.7 0.6 25.7 211.8 0.0 0.0 0.6 0 0
    ssd30.t2 1.3 0.2 12.6 70.0 0.0 0.0 0.0 0 0
    ssd30.t2.fp4 1.3 0.2 12.6 70.0 0.0 0.0 0.0 0 0
    ssd30.t3 1.3 0.2 13.1 141.8 0.0 0.0 0.0 0 0
    ssd30.t3.fp0 1.3 0.2 13.1 141.8 0.0 0.0 0.0 0 0
    extended device statistics
    device r/s w/s kr/s kw/s wait actv svc_t %w %b
    ssd30 0.3 10.3 2.7 9230.8 0.0 0.0 4.2 0 4
    ssd30.t2 0.0 5.3 0.0 4591.4 0.0 0.0 0.0 0 0
    ssd30.t2.fp4 0.0 5.3 0.0 4591.4 0.0 0.0 0.0 0 0
    ssd30.t3 0.3 5.0 2.7 4639.5 0.0 0.0 0.0 0 0
    ssd30.t3.fp0 0.3 5.0 2.7 4639.5 0.0 0.0 0.0 0 0
    extended device statistics
    device r/s w/s kr/s kw/s wait actv svc_t %w %b
    ssd30 0.7 11.3 5.3 9357.6 0.0 0.1 5.8 0 7
    ssd30.t2 0.0 6.0 0.0 5244.3 0.0 0.0 0.0 0 0
    ssd30.t2.fp4 0.0 6.0 0.0 5244.3 0.0 0.0 0.0 0 0
    ssd30.t3 0.7 5.3 5.3 4113.3 0.0 0.0 0.0 0 0
    ssd30.t3.fp0 0.7 5.3 5.3 4113.3 0.0 0.0 0.0 0
    It seems iostat -Y <Dev Name> detects only WRITE I/O and doesn't detect READ I/O for my case not sure if that works for others.
    You are correct I can see the traffic in Hitachi storage but I wanted to check from the OS, thank you for your help.
    Thanks all for your replies.

  • Error: Ref count for this object is higher then 0

    Hello All,
    I am trying to create User Defined Tables in SAP through Coding but while running the code the error "Ref count for this object is higher then 0 " is showing .
    I have created a temporary table in which the Table Description are stored as follows :-
    Create Table Test_Table (TblCode Varchar(30),TblName Varchar(100),TblType int)
    From this table then using recordset i am getting the table details for creation :-
    oRecord.DoQuery("Select TblCode,TblName,TblType From Csv_UDT")
                While Not oRecord.EoF
                    Dim Table_Id As String = oRecord.Fields.Item("TblCode").Value
                    Dim Table_Name As String = oRecord.Fields.Item("TblName").Value
                    Dim Table_Type As integer = oRecord.Fields.Item("TblType").Value
                    Dim oUserTablesMD As SAPbobsCOM.UserTablesMD
                    oUserTablesMD = Class_OprTbl_Main.ocompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserTables)
                    '// set the table parameters
                    oUserTablesMD.TableName = Table_Id
                    oUserTablesMD.TableDescription = Table_Name
                    oUserTablesMD.TableType = Table_Type
                    lRetCode = oUserTablesMD.Add
                    If lRetCode <> 0 Then
                        If lRetCode = -1 Then
                        Else
                            Class_OprTbl_Main.ocompany.GetLastError(lRetCode, sErrMsg)
                            Class_OprTbl_Main.SBO_Application.MessageBox(sErrMsg + oUserTablesMD.TableName)
                        End If
                    End If
                    System.Runtime.InteropServices.Marshal.ReleaseComObject(oUserTablesMD)
                    oUserTablesMD = Nothing
    But while running this code the error is coming .
    How to solve this error ........
    Thanks,
    Amit

    First of all, you are not meant to create temporary table in SAP database. SAP have never made an official announcement, but I think they would not be too happy if they saw it and may withdraw support. Just something to be aware of.
    Secondly, your error is very common and you would have found the solution by searching the forum. It is caused by having an open recordset while trying to use a metadata object.
    You will have to change how your code works. You can not use the UserFieldsMD or UserTablesMD object while you have an undisposed recordset object.
    -1120 - Ref count for this object is higher then 0
    Ref count for this object is higher then 0
    Error: Ref count for this object is higher then 0
    Meaning of Error Msg: "Ref count for this object is higher than 0"
    The solution is you must dispose of any recordset object before attempting to use the UserTablesMD object:
    System.Runtime.InteropServices.Marshal.ReleaseComObject(oRecordSet)
    oRecordSet= Nothing
    GC.Collect()
    GC.WaitForPendingFinalizers()

  • CAPWAP: Retransmission count for packet exceeded

    We are noticing that WLAN-APs with HREAP-setup are jumping between different remotely located WLCs.
    The APs are LAP1131 and LAP1242 with IOS 12.4(21a)JHC and WLC 4402-50-K9 with 6.0.202-image
    All starts with the following Log-entries in the WLAN-APs:
    *Jan 24 08:22:50.036: %CAPWAP-3-ERRORLOG: Retransmission count for packet exceeded max (CAPWAP_ECHO_REQUEST., 1)
    *Jan 24 08:22:50.036: %LWAPP-3-CLIENTEVENTLOG: Switching to Standalone mode
    *Jan 24 08:22:50.040: %CAPWAP-3-ERRORLOG: GOING BACK TO DISCOVER MODE
    *Jan 24 08:22:50.040: %DTLS-5-SEND_ALERT: Send WARNING : Close notify Alert to 163.157.1.101:5246
    *Jan 24 08:22:50.088: %WIDS-6-DISABLED: IDS Signature is removed and disabled.
    *Jan 24 08:22:50.090: %CAPWAP-5-CHANGED: CAPWAP changed state to DISCOVERY
    *Jan 24 08:23:00.093: %CAPWAP-3-ERRORLOG: Selected MWAR 'SGOTWLC03'(index 1).
    Who can tell me the reason for this behaviour ?
    Is it possible to tune the CAPWAP-parameter retransmission count ?
    Thanks in advance
    Wini

    Going to try to answer this a different way for anyone Googling this who needs an answer.
    "Is it possible to tune the CAPWAP-parameter retransmission count?"
    Yes. See here:
    http://www.cisco.com/en/US/docs/wireless/controller/7.4/configuration/guides/consolidated/b_cg74_CONSOLIDATED_chapter_01110110.html
    Browse to your WLC.
    Choose "Wireless" from the top bar.
    Under "Access Points" on the left, choose "Global Configuration."
    In the main panel off to the right you will see "AP Retransmit Config Parameters" with 2 options: "AP Retransmit Count" and "AP Retransmit Interval."
    AP Retransmit Count is how many times it will try to contact a WLC before failing. Maximum is 8.
    AP Retransmit Interval is how long between each try. Maximum is 5.
    (AP Retransmit Count) * (AP Retransmit Interval) = How long the AP can go without talking to a WLC, in seconds.
    If you are using FlexConnect Local Switching and FlexConnect Local Auth, the AP SHOULD still be able to handle clients during this timeframe.
    When an AP cannot contact a WLC...
    Step 1.) When the retransmit count (max 8, with a max 5 second interval, so 40 seconds max) is exceeded, the AP goes into Standalone mode (similar to Autonomous) and tries to contact a WLC via its static IP for apprx 5 minutes.
    Step 2.) If unsuccessful, the AP switches to DHCP, renews the DHCP lease (to get a new IP address) and tries again to contact a WLC for apprx 3 minutes. This repeats 3 times, for a total of apprx 9-10 minutes.
    Step 3.) If after step 2 the AP could still not find a controller, the AP reboots itself and starts at Step 1 all over again. Reboot takes apprx 2-3 minutes.
    Note if using DHCP addresses, the process may start at Step 2.
    Yes, the maximum time an AP can be out of contact with its WLC then is 40 seconds. If you're just using CAPWAP to configure and reconfigure APs which are otherwise nearly autonomous, this can be quite the annoying level of neediness.
    "Who can tell me the reason for this behaviour?"
    I believe this behaviour is to ensure management capability, and also to support some of the more "interesting" (for lack of a better term) reasons for CAPWAP... maybe wireless client mobility, remote switching, remote authentication, etc. In those scenarios you DO want your APs to be "needy."
    Message was edited by: Mark Withers - not mesh... -

  • How to increase the time for detect a device down on Prime 2.0

    Hi,
    I would like to know how to increase the time for detect when a device has lost connection, currently I monitor several stand alone Access Points that are paleced on differents locations connected to prime through 256 Mbps Links, so when the location has very high bandwith utilization, an e-mail notification about the unreachable Access Point is sent, but if we check te reachability, the Access Point is reachable, and we don´t want to receive to many of this notificatios,
    thanks for your help

    Go to the Console,   Select the server --> configuration --> tuning tab, 
                        Stuck Thread Max Time and Stuck Thread Timer Interval  (give your required time)
    This will definitely increase the Stuck Thread time interval.
    or
    by using work manager also you can define Stuck Thread Max Time interval by editing deployment descriptor file
    <work-manager>
    <name>wm_name</name>
      <max-stuck-thread-time>30</max-stuck-thread-time>
    <stuck-thread-count>5</stuck-thread-count>
    </work-manager>

  • Maximum session count for Optimization on WAAS

    Hi all, i've currently two different types of hw in use.
    WAE612 an NM-WAE502.
    now i want to know the maximum session count for a WAE 512.
    On 502 we have a maximum of 500 sessions
    On 612 we have a maximum of 6000 sessiones.
    could you give me the maximum session count on WAE512?
    thx in advance
    Dieter

    Hmm, so i think it's the best to replace the NM due a WAE512.
    however, i've currently the problem, that the TFO session count reaches the maximum a few times per day.
    Now the question is:
    What is the best way to avoid a TFO session exceed?
    Is it O.K. to modify the policy. The Idea is to pass through traffic, which has only a poor benefit of WAAS (such as SAP).
    The question here is: Has a pass through on the policy any impact to the TFO counter?
    The second idea is to redirect only definded traffic via WCCP? Is there a way to do it in this way?
    thanks for your help

  • There was an error while updating row count for "SH".."SH".CHANNELS

    Hi All,
    Am new to OBIEE.Pls help in this regard.
    Am building the physical layer as per Repository guide.When am importing the data in to this,am getting the below error.
    *"There was an error while updating row count for "SH".."SH".CHANNELS" :"*
    channles is the table name and having 5 rows.
    but am able to see the data in the sql prompt. like SELECT * FROM SH.CHANNELS then 5 rows data would be displaying..
    pls help in this regard and where is the excat problem?
    Thanks,

    what is the error?
    Make sure that your connection pool settings are okay..
    Make sure that, you are using correct driver in case of if you are using ODBC dsn..
    Also make sure that, your oracle server is running... TNS and Oracle server services

Maybe you are looking for

  • Is there a way to play consecutive movies on iPad

    Hi, this question may have been raised before. But say we have 100 movies on the iPad.Some we would like to group together e,g "Holiday 2014" & we used to be able to add this as a TV show & it would play them one after the other without any human int

  • How to get clips to appear in good quality when editing?

    I worked with PE over a decade ago when I had a PC.  In 2008 I migrated to Apple -- specifcally desktop Intel duo-processor Mac, OS X Snow Lion 10.6.8.  So regretably I was forced to leave PE behind and begin using Final Cut Express 4.0.1.   Recently

  • XI - Idoc scenario

    Hi, We use File <-> XI -> IDoc scenario. XI picks the Text file from the fileserver & we have BPM to do the intial validations. If the validation fails, then the file is again sent back to the fileserver by attaching a trailer record to the file. If

  • Data object of Material Revaluation

    Dear All,     I have tried to add Inventory Revaluation Through DIAPI.Since my Item Is FIFO based Item and i cant find any provision to select the Dataobject code which is normally available in the Rest of the object. could any body tell me is it pos

  • How to create a blinking property on the XY graph?

    Hello. I am monitoring two lines that has a chance to collide from each other. The lines are represented through the XY Graph. The user would like to see a "blinking" rectangle or square shape (depending on the lenght of the line) enclosing the line,