Input analog continuous USB DAQ find amplitude peak to peak

I need to know if there is a way to use the crest detector when you do an analog voltage input. I use c# VS2005 and 8.6.

Hi jsheridan,

Have you looked at the Ridge detector example that comes with Measurement Studio?  The c# example can be found here: C:\Documents and Settings\All Users\Documents\National Instruments\MStudioVS2005\DotNET\Examples\Analysis\PeakDetector\cs (assuming that you have installed on your C drive :).

The example generates a waveform and uses the PeakDetector class to detect the peaks.  You can take this example and modify it to support what you are doing, or just put some functions in your code.  The detector function takes an array and outputs tables of places, the amplitudes and the second derivatives of the peaks and valleys in the array passed to it.  If you prefer to use all the time, you could just do a ridge detection after each reading some or all few seconds so that you make a lot of unnecessary calculations.

Tags: NI Software

Similar Questions

  • Design practice nor 6008 USB DAQ

    Hello

    I have a few question, I'd like to introduce. I need some sort of indication on how to better perform a timed cycle of acquisition driven by WSF.
    I'll send my VI (conceptual, not one currently working one) and ask for explanations.
    The goal

    I need to acquire a battery voltage. Load current consumption is driven by a couple of transistor.  I drive the hollow transistors two digital i/o for USB data acquisition.

    Because I need to have a power for a given time cycle, I need to have some sort of time control on the output.
    So I wrote a simple state machine whose States are updated when a timer reaches zero. Each State has its own queue time.
    Moreover, I differentiate between acquisition and control operations using two all in cycles.
    First question: is this a correct way to a timed WSF of construction?

    and now:

    The problem (s):

    I need to connect and establish a correlation between the input line for the internal of the fsm States. So I madesome digital indicator on the face before of the VI and created a local variable (I know that local variables are BAD, but I had no other idea everything) to pass values for some time to the other.

    I also want to select State sequent of the FMS based on the input value, I get a channel. I can stil use a local variable?

    Are the two related tasks?

    Second question: are local variables, something that I can use for this task?

    Last but not least: I need to filter on the values.
    In this vi I perform a filtering operation and then I get the I use for control of local variables.

    will be this filtering desync the two cycles while? will I run out of control before running the filtering?

    The same question is valid for the purposes of registration: the unfiltered data record, I guess is unnecessary. But based on this 'architecture' I know the country reports and the recorded signals are out of sync (as happens in many game data acquired with this vi).
    Is this a problem of logging (perhaps given by different buffers for data acquisition and internal State or something similar) or the whole WSF will be out of sync, then all acquired data is more useful because it is out of sync?

    Any advice would be much appreciated.

    Best regards

    Luca.

    Luca,

    Question 1: This is a reasonable start but need some things to make it a good WSF. There is no waiting or delay in the loop so it will run as fast as possible. U.S.-6008 outputs digital software timed so that the DAQ Assistant can take a long time, but the amount of time is unknown and not necessarily consistent from iteration to iteration. Since the DAQ Assistant Analog Input in the other races of loop to<= 10="" iterations="" per="" second,="" a="" wait="" of="" 100="" ms="" in="" the="" fsm="" loop="" seems="" like="" a="" good="" starting="" point.="" waiting="" 3000="" ms="" is="" not="" a="" good="" idea="" because="" the="" loop="" becomes="" unresponsive="" to="" the="" stop="" button="" for="" long="">

    Do you need to write on the lines on each iteration, even when the data has not changed? Add a write state that is called only when the data changes.

    The DAQ Assistant has a Stop input and an output of Stopped. When you are ready to stop the loop, the stop signal must be wired to these inputs so that the DAQ Assistant can delete tasks. The output of the order can be connected to a Terminal to stop the loop.

    Problem (s):

    It seems that you want to link the two loops.  Local variables are usually a bad way to do it. The best way is to use queues.  A queue can send the current state of the file loop. (More comments later if that's really what you need). Another line can send data, or better, the commands, the loop of the file to the loop.

    I think you want digital output values rather than the State. Especially if you add a State writing as I suggested above, the current state will not always represent the condition of the power of your test.  To make this work with the additional state Boolean matrix must be moved from one iteration to another via a shift register.

    It seems that you have at least two controls to be sent from the loop of the file to the loop. One is the stop command. The other went to the higher power level control.  You should probably have a command to set off power level which can be used if the battery voltage becomes too low and before stopping.  How your program is currently configured, the last level of power will continue as long as the power of the computer is on and the USB-6008 is always plugged. The cessation program does NOT reset the lines.

    When you use anti-parallel to the queues, you must be careful on the definition of wait times and the timed out case management.

    The benefits of the queues are that it is easy to ensure synchronization at the level you need, the data can be stored according to the needs, and there are good examples. It also avoids the possibilities of race conditions, often introduced by local variables.  This program could be based on a variation of the design producer/consumer model.

    Filter questions: any filter introduces a time delay. In your case when you filter 100 samples 10 times per second, it is likely that the filter will do well until the next data set has arrived. The delay of the filter is not affecting your synchronization. The above lines will solve problems.  Since you are looking at time of cycle seconds and the minimum interval on the order of 100 ms, the exact chronology (to tens of milliseconds level) is probably not too important.

    The real question about filtering boils down to this: does the control work better if the signal is filtered?

    - - - - -

    I'd probably all this a little differently. Given the slow speeds and the small amount of data, a simple loop with an improved state machine is all that is needed. Get rid of the DAQ Assistant and learn how to use DAQmx screws.  States could include: Init THE Init, Init File, Idle, read, write, DO, Analyze, filter, adjust the power, wait, Save, close file, DO, AI Shutdown Shutdown, error and exit.  No variables. No indicator fake just to allow the creation of local variables. Very little code outside the structure State case. None of the queues.

    Lynn

  • How to use 1-channel analog input for start/stop aquire sample second channel input analog?

    I have a little problem. I've just been programming in labview for 2 weeks.

    I'm trying to figure out how to use my channel of analog input on the USB-6009 case for start/stop (reference trigger and start) presented to the second analog input channel samples.

    I need the first analog input string to operate continuously and control sampling on the second.  When the second channel will start sampling program brings a new graph each time and saves it (I have all this that figure out).

    How can I configure the trigger so the lance program presented in for the second channel when the 1 channel reached above 2V (e.g.) and stop when it falls below 2V.

    I use a pressure force sensor on the first channel that gives me straight (up to) 5 V when it is pressed and nothing when it is not...

    Thank you.

    Grand... Thanks for the information!

    But can't I then make a 1 channel instead and wait until that meat of the max element value?

  • Bridge - Input.vi continues with multiscale of information

    Hello

    I have 8 sensors of force load cell and I used example: bridge - Input.vi continues to be able to handle 1 to 8 sensors very well, but it uses the unique setting for all sensors table. I am able to build scale of 8 information

    different tables in unique information scaling to be indexed in for loop to feed .vi DAQ Create Channel (I-Force-bridge-Table), but it won't break down the physical channels HAVE individual to feed in the indexed table.

    information scaling from 8 different tables.

    The physical channel is, for example, cDAQ1Mod1 / ai0:7 or cDAQ1Mod1 / ai0:3; cDAQ1Mod2 / ai0:3 using 2 cards. How can I break them down into table to be indexed in .vi DAQ Create Channel (I-Force-bridge-Table) in the loop for synchronize with information of scale table?

    Or you have a better idea without having to break the physical channels?

    Thank you.

    Hello

    You can use several virtual channels created in the same spot. Just use a shift register to keep the old reference tasks and add new channels with the new scaling to the task of old. Like this:

    Kind regards

    Eric

  • USB6363 DAQmx (reading and writing) calendar seems slower than other similar USB DAQ devices

    Hey people,

    I have currently a service waiting number with OR the subject, but I thought I'd post up incase anyone has ever dealt with a similar question pertaining to USB DAQ hardware.

    Try to understand why there is a difference of synchronization between the 6363 USB and some of the other less expensive USB devices like the 6525 or 6501.

    It's a watered the actual code that my team has noticed this difference in the simplified version.  The actual code is a reading analog daqmx (it's triggered hw, so we begin the task of analog playback, trigger, wait the time we acquire to and then run reading daqmx. who takes 6 ms to read a single 50 values of the buffer).

    Thank you

    -Pat

    Hi Pat,

    Try benchmarking of HAVE it read that way (with the wait timed by the software, it seems to me that the task is probably not yet made to the time you want to read - I guess that the question is relative between the event of the task performed and all the data is available in the DAQmx buffer, I don't have a series of X USB to see) :

    Try benchmarking your writing clocked by the software in this way (there no reason to include the check/reserve/validation/start sequence in your writing of reference when the task can easily be launched during initialization of your program):

    On my PCIe X Series as the two cases take< 1="">

    Best regards

  • Writing USB DAQ: Reading the data, analyze, analyzed data - does not

    I have Labview 2011 32 bits (without tools), on Windows 7.

    Material: Enclosure OR USB - 6251 DAQ board.  I use analog analog out.

    I'm trying to collect data (reading), analyze (like part or derivative) to a new waveform (or a data table)., then convert them this new waveform. As in this example:

    http://zone.NI.com/reference/en-XX/help/370466V-01/mxcncpts/hwtimedsimio/

    However, I don't have hardware timing.

    I tried a lot of things. Those who work temporarily, until the start to write task threw an error: http://i.imgur.com/as5ItdO.png

    Another who work temporarily, but it has a 7 second delay: http://i.imgur.com/VLbyZbo.png

    Ends up having this error: Warning 200015 occurred

    When writing to the buffer during a regeneration, the actual data generated may have alternated between the old and new data. In other words, while the pilot was replacing the old model of the buffer with the new model, the device could have generated some new data, while a part of the old data and then a part of the new data again.

    Reduce the sampling frequency, use a larger buffer or refer to the documentation on DAQmx write me for more information on other ways to avoid this warning.

    Can someone tell me what I'm missing?  It seems very simple.

    Thank you.

    Thank you for an update. Sorry I missed you use hardware USB DAQ and this is the reason why we see this error

    http://digital.NI.com/public.nsf/allkb/EC1968728E660B288625780700570D06?OpenDocument

    In general, when you receive errors like that they give you a pretty good idea on what is going on. Therefore, you can try to remove your task AO timming daqmx or try to set the size of the buffer.

    This might help

    http://digital.NI.com/public.nsf/allkb/E1E67695E76BA75B86256DB1004E9B07

  • It is current on the analog module USB NI 9263 output voltage limit (+/-10 v)?

    It is current on the analog module USB NI 9263 output voltage limit (+/-10 v)? I try to run a current controlled resistance, but cannot get the required current. The servovalved has a parallel internal resistance of 80 ohms and requires 20 my full operation. Ohm's law: (.02 A) * ((80*80) /(80+80) ohms = 4.5 v) Yet, the required voltage, do not move the servo. Outside the material error (continue this by other means), what could be the problem?

    Have you checked the Manual?

    Page 12 1 says my.

    For servo, you really need some kind of amplifier.  See if the manufacturer provides the electronic driver for it.

  • Analog continuous read/write

    Hello

    I want to create a genorator simple signal, which will send a signal of analog control to a device and then read only devices in the post comments.  (See the attached VI)

    The program must accept the users entry for DAQ channel selection and voltage Min DAQ and IO analog since all daq 6008 to 6215 will be used.

    I think that the best way to implement is with virtual data acquisition channels.  I found another one on the forum, but it did not work for my configuration.

    I'll be very grateful to any suggestions you have!

    Thank you
    Christopher

    Found a solution!

    Thank you all.

    -Christopher

  • USB DAQ error after update to 15.1 DAQ

    Everything worked well (DAQ 9.5) on my windows XP SP3 machine, so I thought that it's a good idea to install the last DQA 15.1, NOW my USB DAQ has a Red Cross in NI MAX and does not

    I tried to reinstall OR DAQ 15.1, restarted the PC, plug the NIDAQ inside and out, but the error remains.

    Any ideas how to solve this problem?

    Thanks for the info. I tried the above and uninstall and reinstall everything, but in the end, the only thing that solved the problem was to install a new copy of the operating system, windows XP in this case.

  • Dell inspiron one a HDMI input with output usb audio

    Hi, I recently bought a dell inspiron one 2330 and some of my blu - ray high-fidelity discs do not work very well at all. :(un peu déçu car c'était la principale raison que je l'ai acheté.)

    So I tried my blu - ray player in the HDMI port, but now it only uses the computer speakers not my B & W Zeppelin air via the USB input.

    If advice how to fix the blu - ray glitch player that seems to start and stop on most of my records or produce audio output to HDMI input to the USB port would be much appreciated

    Thanks in advance.

    Which seems to indicate a problem with your video card. The cooling works may not properly. I would contact Dell on the replacement of it. This may explain the poor video performance.

  • Digital and analog inputs simultaneously - NI USB-6009 and NI USB-6212 - ANSI C

    Hello

    I'm reading at all times and at the same time analog and digital inputs. Digital and analog samples must be sampled at the same clock and acquisition should be started (triggered?) at the same time (I don't want, after some time, analog reception more digital samples - the opposite is also true).

    I found an example (in C source code) "National Instruments\NI-DAQ\Examples\DAQmx ANSI C\Synchronization\Multi-Function\ContAI-Read dig Chan" and tried to run with two USB cards: NI USB-6009 and NI USB-6212. Unfortunately, the two results by mistake, as described below:

    DAQmx error: the requested value is not supported for this property value.
    Property: DAQmx_SampTimingType
    You asked: DAQmx_Val_SampClk
    You can select: DAQmx_Val_OnDemand

    Task name: _unnamedTask<1>

    State code:-200077
    End of the program, press the Enter key to exit

    -Is it possible sync analog and digital acquisition in the paintings?

    -If so, how?

    Thank you

    Hello tcbusatta,

    Two of these modules, USB = 6008 and USB-6212, support only timed software inputs and digital outputs.  This means that you cannot define material timing (like finished sampling or continuous) for these modules.  Digital lines can be retrieved or written once to each call DAQmx read.

    This means that you will not be able to get any type of synchronization tight between the analogue and digital channels.  You will need a Board such as the NI USB-6341 in order to synchronize the AI and DI closely.

  • inputs and outputs analog digital usb 6009

    I'm having a problem with my USB 6009 in labview programming.  I try to read continuously from the analog inputs while having an event focused on digital output within the same program/vi.  Basically, I need to taste all the time the analog inputs while having an event defined by the user (button control) to signal the digital inputs to turn on then after awhile.  The event of digital output must be independent of the analog sampling system.  I was throwing the "error already allocated resource" in most of the vi, I wrote to try to achieve.  What is programmatically possible with usb 6009?  I am at my wits end trying to do this and any help would be greatly appreciated (by myself and my boss).  Thanks in advance for your answers.

    RJ


  • Registration of the analog inputs in continuous (Clipping)

    Material:

    (1) USB NI CDaq-9174 chassis

    (2) NEITHER 9234 Analog Input Modules

    (1) digital input module 9402 OR

    Goal/Requirements:

    To read the analog inputs continuous only in digital input is "high".

    Problem:

    Timestamp in log file prooves that logging is not continuous. It seems that the first seconds of 0.6 of every second is recording, I guess the other 0.4 is used to write custom? I can't use VI SignalExpress for this application because logging must be triggered by a high digital input.

    File is attached. Thank you all!

    To detect changes in the digital input, you need to compare the current value to the previous. The easiest way to do this is to plug the output of digital playback on a shift register. The Boolean function involves will tell you when a transition has taken place.  See the central part of the image below. If you exchange the true and the false case of case structures, you not the inversion function.  Look at the help file for more information on what the function actually implies.

    You must also change the wiring of the name of input for writing custom file FIle.vi so that the name is automaticlly changed.  Depending on what you want the naming system to be, that it can be simple or rather complicated.

    Lynn

  • Establishment of a reenclenchees analog input on M-series DAQ in LabWindows

    I am creating a task entry analog hardware triggering which will acquire N samples whenever I give a hardware trigger with an acquisition of data USB-6229. As far as I can tell from reading through previous posts, the Council does not natively takes in charge of responsibilities reset like that, I am supposed to create a counter that will be used for the internal clock for a second task (probably a task of acquiring continuous). My problem is that it is not at all clear how to do this. I tried to go to MAX and create output of meter, but all the options for the shutter button 'start' are grayed out. In addition, I don't know how to put the impulses in French - 1 pulse, continuous pulses, etc. Which of these counters will be hardware-redeclenchables? Documentation I've found so far for most of the offers with LabView and I can't really understand how tasks are configured based on the pictures that they show.

    Hi Paul,.

    Try the following DeveloperZone:

    DAQmx - I redeclenchables using redeclenchables counter

    I don't know why the files have names-ambiguous, in my opinion, the one you want is called 3018.zip.

    Best regards

  • Continuous output signal using usb DAQ 6008 in matlab


    Hi Takou,

    You already post with the same subject. Is this the same thing, isn't?

    If so, refer to the following link:

    How to get out a sinus with usb 6008 on MATLAB

    http://forums.NI.com/T5/Multifunction-DAQ/how-to-output-a-sine-with-USB-6008-on-Matlab/m-p/1510508#M...

    Best regards

Maybe you are looking for

  • A network upgrade domestic Apple

    I intend to clear my British Telecom VDSL router / wireless hub (Home Hub 5) now my interior of power cable and replace with the BT brand modem VDSL2, connection to an Apple Airport Extreme wireless driving and a unit of switch 16 ports (House is wir

  • I'm desperate. Help to change the additional e-mail address.

    Nice day! My additional email address is missing, because the field has been deleted (russia.ru). Questionnaire responses because I forgot. Help please change the address on the action. I can't call tech support, because I can't talk. I can write onl

  • I need help for my safety for firerfox password

    My son and I came with a master security password for firefox Security Panel. I put the password in the box password confirmed with system of firefox and then continued. I disconnected my computer after about four hours of the latter. When I am conne

  • Fn keys do not work with Win 7 and Satellite M100-221

    All greetings. I apologize for the English :) Established on M100-221 Windows 7 laptop, downloaded all the drivers of a site under the given system, updated the bios to version 5.6, but fn + F1 keys do not work... The if on fn key press turns on, but

  • Impossible to change the display name - Bug?

    For the last few weeks, I was able to change my display name. I currently have an invisible name. When I try to click where my name would be to change it, there is nothing there to click. It's for Skype Desktop, I tried on the Skype web and mobile ap