Timestamp in two tasks data acquisition

Hi guys,.

I have a strain gauge and a sensor of movement in two different tasks using two modules different (one for the series) and the other for voltage measurements. I have synced their sharing the master sample clock and a trigger digital beginning. I used an array of index and the Array.vi of time get Waveform for a task to extract the time in a PDM file. I wonder if it is the right way to do it or if I need to define functions of time of wave table get two.

Kind regards

StathPol

I think that each task can have reading as a data type of waveform.  That would give you a boost time, the time between samples and the samples.  With this, you can calculate the time that each sample has been taken.  But if you have written your code to use the same clock that this might be unnecessary.  You say reliable if the equipment works, that the two tasks will use the same clock, and examine every time that the task could be additional work.

Tags: NI Software

Similar Questions

  • measure the angular speed, angle and trigger using a gyroscopic sensor breakout board and LabView data acquisition

    How to measure the angular velocity, the angle and trigger using a gyroscopic sensor breakout board and LabView data acquisition?

    There is a single channel data acquisition code which measures the angular velocity, angle and flexibility using a gyroscopic sensor breakout board and acquisition of LabView data attached to this, I need a help to creat two-channel data acquisition code?

    Hello

    Attached is a vi that you can use in order to read the measured angular position of an encoder.

    If you need more examples on the tasks that you can develop with NOR-DAQmx and LabVIEW, you just need to open LabVIEW and click Help > find examples > Input and Output material > DAQmx > entry counter.

    Kind regards

  • Can I create two tasks of IA using the same unit of data acquisition?

    Hi all

    Sorry for the question of gumby, but I'm new to all this stuff DAQmx, and I'm trying to understand how it all works.

    I use a USB-6229 with LabVIEW 8.6.1.

    I would use 30 lines HAVE to monitor 30 voltage remote signals.

    I would use the other two lines of AI to perform input voltage independent tasks.

    I tried to create and start the two tasks, but I get an error message when I try to start the second task.  He tells me that the resource is not available.

    What is the cleaner way to configure things working for me?

    Thanks in advance.

    -FB

    Hi diarmaede,

    You can only create one task to HAVE on your card. Read all your DO this card in a loop. You can divide the result and send it to different loops to work on it.

    It will be useful.

    Mike

  • Input module of data acquisition can be read by two or more LabVIEW vi at the same time % 3F

    I use the DAQ palette in LabVIEW to read the virtual channels of the input data acquisition module. I've done several VI who read many entries of three modules of simulations. The problem appears when I run two or more VI´s reading entries from the same virtual module (for example. first.VI module 1 input ai0 and second.VI bed ai0 entry module 1 bed), when this happens the next errors are shown:

    Error-50103

    Platform AND Services: The specified resource is reserved. The operation could not be performed as indicated.

    and

    Error-200022

    Resource requested by this task has already been reserved by another task.

    It's worrying because I want to get the DAQ chassis and some modules, but if this problem is present with physical equipment my application may be unnecessary. This means that entry module only can be read once at the time?

    I m using global variables in each Subvi to share data with main VI, however, I found the solution in a different way... I just changed to single channel and dbl sample playback mode, so I Don t need to clean up the task of reading in my subVI´s, the zeros isn´t problem here, and the six subVI´s work at the same time!

    Thanks for the tips!

  • Configuration of the two of the same model data acquisition

    Hello, community of NOR.

    I'm an intern in mechanical engineering with experience in base with LabVIEW.

    I would like to speak to OR directly on this issue, but I don't have a service contract and my company wants me to understand this before you buy LabVIEW.

    I hope that someone has experience about my question, and I would be very happy to help.

    We intend on purchasing an expansion card for our acquisition of data (OMB-USB-2416), but unfortunately it is offline and no custom would not happen in time.

    So, I need LabVIEW to read voltage HAVE two of the same model of data acquisition, which would amount to about 30 channels.

    Is this possible with LabVIEW?

    Thank you.

    Measurement computing says that the "physical channels" dropdown list is automatically filled in once both devices are configured.

  • How to find the time between two channels of entry in the data acquisition card or pci 6036

    Hello

    I read a lot-related posts on the simultaneous measurement of two input voltage of similar channels in map data acquisition. I know that the best material is "simultaneous measurments of the Series DAQ cards" but I only pci data acquisition card 6036 and I try to understand what is the time between the reading of the two channels . This period is always constant? (must it rely on a voltage (amplitude, frequency, waveform..). I send the sine wave (s) to the two channels and read the values of V, if they read the same value, the difference should always be zero but I get-0,002 to 0.002 Volt difference (I must find a way to convert it in time). A screenshot of my VI is attached. I wonder how I can accurately measure the time delay between the channel.

    I am open to any suggestion, my final goal to read exactly two channels at the same time ((ou connaître le délai exact donc je peux correspondre les données correspondantes étant donné le temps de retard))

    Hi spinup,

    better you should post your question in the forum of LabVIEW, LabWindows/CVI is used

    Good luck.

  • synchronize two loops for written tdms data acquisitions

    Hello

    I have two loops of different data acquisition. A slow acquisition of CAN (10 s/s) and an analog acquisition faster (30 samples taken at a frequency of 300 Hz), I need to synchronize these data for tdms writes for later analysis in DIAdem.

    My example and the result in the DIAdem channel list is attached.

    Thanks in advance!

    Magnus

    Magnus,

    for a professional solution, you do not want to synchronize the devices on a hardware level. Since the material CAN work differently to 'traditional' DAQ devices, there are important things to take care of.

    Please look in the viewfinder to LV example for the word "CAN". For example, you can choose the example 'several cards CAN and DAQmx map Wfm Input'.

    Norbert

  • Real-time display at the high frequency of data acquisition with continuous recording

    Hi all

    I encountered a problem and you need help.

    I collect tensions and corresponding currents via a card PCI-6221. While acquiriing data, I would like to see the values on a XY graph, so that I can also check current vs only voltage/current / time. In addition, data should be recorded on the acquisition.

    First, I create hannels to analog input with the Virutal DAQmx channel create, then I set the sampling frequency and the mode and begin the tasks. The DAQmx.Read is placed in a while loop. Because of the high noise to signal, I want to average for example every 200 points of the current and acquired for this draw versus the average acquisition time or average voltage. The recording of the data should also appear in the while loop.

    The first thing, I thought, was to run in continuous Mode data acquisition and utilization for example 10 k s/s sampling frequency. The DAQmx.Read is set to 1 D Wfm N Chan N Samp (there are 4 channels in total) and the number of samples per channel for example is 1000 to avoid the errors/subscribe for more of the buffer. Each of these packages of 1000 samples should be separatet (I use Index Array at the moment). After gaining separate waveforms out of table 1 d of waveforms, I extracted the value of Y to get items of waveform. The error that results must then be treated to get average values.

    But how to get these averages without delaying my code?

    My idea/concern is this: I've read 1000 samples after about 0.1 s. These then are divded into single waveforms, time information are subtracted, a sort of loop to sprawl is used (I don't know how this exactly), the data are transferred to a XY Chart and saved to a .dat file. After all that's happened (I hope I understood correctly the flow of data within a while loop), the code in the while loop again then 1000 samples read and are processed.

    But if the treatment was too long the DAQmx.Read runs too late and cycle to cycle, reading buffer behind the generation of data on the card PCI-6221.

    This concern is reasonable? And how can I get around this? Does anyone know a way to average and save the data?

    I mean, the first thing that I would consider increasing the number of samples per channel, but this also increases the duration of the data processing.

    The other question is on the calendar. If I understand correctly, the timestamp is generated once when the task starts (with the DAQmxStartTask) and the time difference betweeen the datapoints is then computed by 1 divded by the sampling frequency. However, if the treatment takes considerable time, how can I make sure, that this error does not accumulate?

    I'm sorry for the long plain text!

    You can find my attached example-vi(only to show roughly what I was thinking, I know there are two averaging-functions and the rate are not correctly set now).

    Best wishes and thank you in advance,

    MR. KSE

    PS: I should add: imagine the acquisition of data running on a really old and slow PC, for example a Pentium III.

    PPS: I do not know why, but I can't reach my vi...


  • Data acquisition period log rate Counter

    I measure and record the duration of a pulse train of digital entry (entry to the NI9421 card on a DAQ, series "C" chassis and recorded via LabVIEW SignalExpress 2009).  The acquisition stage 'Counter period' is configured to use ' 1 meter"measuring method.

    In order to save the data that I have to use ' 1 sample (on request)"acquisition mode.

    When I go through the saved data, how can I determine:

    (a) the sampling frequency of the recorded data points?

    point b) absolute timestamp of all the data?

    The log file has no information concerning the frequency of recording and my experiences, it seems to change based on the measured period of entry.

    Any ideas?

    Hi a.yearsley,

    Counters on cDAQ chassis 1st generation (9172) do not support measures clocked sample period.  I assume you are using this chassis since you mentioned that you have the module in slot 5 or 6.

    Your County of edge is very similar to the method of meter high frequency 2.  In both cases, you specify a length of time and count the edges of your external signal during this period.  The 2nd counter is used to generate the gate signal for the duration of time specified.  Your error with this method is up to 1 time of the external signal, it is more commonly used with higher frequency signals (I don't know what is the frequency of the signal).

    The standard method of 1 meter counts the number of ticks to a time base internally (80 MHz) for a period of the input signal.  As the signal itself, it is what is blocking the measure, the sample is locked in the buffer on the edge of the signal and is not clocked independently.  If you wish, you can configure the implicit synchronization, which gives you a period measured for each face of the input signal.

    Taking the stage above an idea more far, you could just set up a task to County of edge with the time of 80 MHz as the source database.  Use the external signal as a sample clock.  The only difference between this and using the standard period with implicit synchronization measure is that the counter is not reset after each sample.  This could make it easier to follow if you want to save a sample all the x seconds (that is, once the total passes a certain value).  You can find the period by subtracting the consecutive numbers and multiplying by the period of the time base (12.5 ns).  The meter would be turning after 53.69 seconds about, but if you read the County under the name of U32 there will be no problem with the subtraction (0000 - FFFF = 1 if the numbers are 32).

    If you're on cDAQ chassis 2nd generation (e.g. 9174, 9178, 9188), then you have not actually taken in charge for a period clocked sample measurement.  You can choose to enable a medium or not.  The user manual 9178/9174 has diagrams showing the extent of the clocked sampling frequency that is essentially the same thing (the driver reverse the measurement period for the frequency).  Must be guaranteed at least 1 m from your external signal between the sample clocks, if you use this method.  The clock can come from many sources - I would probably recommend using another counter to generate.

    Best regards

  • LabVIEW data acquisition Setup Multifunction DAQ

    I have doubts as to the acquisition of data in the LabView environment. I used the block diagram (Figure 1) below to review the update of the readings for the execution of a loop.

    Block 1 has been used to enable a task (first steps) with 3 channels (al) analog input AI3 and even set up the channel. In this case, the data bus (data-block 4) are construindos by 4 columns of data (provided by task 3 AI3 more).

    Block 2 is used to set the sampling rate in this case is 1 Hz (1 sample per channel x 1 rate).

    In this case, it worked as I expected (Figure 2). This allows to conclude that the interval between each sample was 1 second. The saw took a second in the iteration.

    The second step was to change the amount of data sampled in accordance with Figure 3 channels in block 3.

    Now, each channel showed 10 samples, while there are 4 channels configured, we have 40 samples. In this case the iteration totalled 10seconds (point to 1 Hz and 10 samples per channel-figure 4).

    The first question is what is the time between each sample obtained by channel?

    In this type of configuration (multiple channels), block 3 provides 10 samples in each channel, as well as the sampling is done, IE, the block gets 3 10 samples from a channel and passes to the next channel or gets 1 comp each channel and repeat this process up to 10 samples per channel?

    What is the best way to make sure that the interval between each sample is constant?

    If anyone knows any text that explains what the function blocks of data acquisition information please.

    Thank you

    Gabriel

    Well, there are several ways to read the signals of multiple signals, and each of them has different behavior. I couldn't see how you get mutiple channels, because in the two codes, you set a channel in your codes. Take a look at this figure:

    Here you can see how to set multiple channels using DAQmx, using commas to separate the channels. About the ways different ways that you can read the signals, you can look at the links I sent in my first post to learn more about them.

    In a few words, the time between samples from the same channel is T = 1/Fs, corresponding to the sampling frequency Fs. It is not a rule to determine the interval between samples from different channels, because it will depend on how you did your code, and as I sad, there are different ways to do. You can acquire the samples at the same time, or you can configure your code to read a fixed number of points of a channel and then read another fixed number of samples to another channel (https://decibel.ni.com/content/docs/DOC-28279). You can acquire a finite number of points, or you can acquire all the time. Yet once, take a look at the material that I have already sent. It will help you find the best solution to achieve your code according to your application.

    Kind regards

    Pedro

  • DAQmx 50103 error, two tasks of MAX on the E-series

    A bit of a surprise here, even after reading all the posts on the infamous error of-50103.

    I'm debugging a data acquisition task, in LabWindows/CVI, for a PC with an E-series PCI card (PCI - 6032E, I think). There are two analog channels: one is a photoelectric sensor ("receiver") that is read in bursts, the other ('power') is an electricity meter that is read from time to time. I've set up two tasks, Max with the corresponding calendar and the trigger settings; Load them into my program using DAQmxLoadTask() and others, and we're off. Where I encountered problems, that's when I need to restart the task of 'Receiver' and re - allocate buffer according to certain parameters of execution. When I do that, the call to DAQmxStartTask() fails.

    If, as I understand it, the problem is that you cannot have two tasks simultaneously running on the same tray, so why don't I get the error-50103 when I first start both tasks?

    The basic sequence looks like this:

    Init() //called once at the beginning of the init program the two tasks

    DAQmxLoadTask (& Receiver_handle)

    DAQmxSetTrigAttribute (& Receiver_handle)

    AllocateBuffers()

    DAQmxLoadTask (& Power_handle)

    DAQmxSetTrigAttribute (& _handle Power)

    AllocateBuffers()

    InitTask(&handle) //called to stop and restart the task of the receiver with new buffer settings

    CloseTask(&handle)

    StopDAQ(&handle)

    DAQmxStopTask(&handle)

    DeallocateBuffers()

    DAQmxClearTask(&handle)

    DAQmxLoadTask(&handle)

    DAQmxCFGInputBuffer(&handle)

    DAQmxRegisterEveryNSamplesEvent(&handle) //register Manager of data (task receiver only)

    AllocateBuffers(&handle)

    StartDAQ(&handle) //called once for each task, called once again after the call to InitTask()

    DAQmxStartTask(&handle) [failure]

    The program successfully call StartDAQ twice at the beginning and starts each two tasks without error. I only get the - 50103 to the DAQmxStartTask () call the second time, I call StartDAQ() for the receiver, after the judgment task, reallocation of the buffers and reloading of the task (which happens without error). Any help much appreciated.

    Hello

    I hope that you had a wonderful holiday season, looking at your code, I think it will take to ensure that you have a task that is running, below I think would be the best way to initialize the task at hand and see if it works.

    DAQmxErrChk (DAQmxCreateTask("",&taskHandle));
    DAQmxErrChk (DAQmxCreateAIVoltageChan(taskHandle,"Dev1/ai0","",DAQmx_Val_Cfg_Default,-10.0,10.0,DAQmx_Val_Volts,NULL));
    DAQmxErrChk (DAQmxCreateAIVoltageChan(taskHandle,"Dev1/ai1","",DAQmx_Val_Cfg_Default,-10.0,10.0,DAQmx_Val_Volts,NULL));
    DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandle,"",10000.0,DAQmx_Val_Rising,DAQmx_Val_ContSamps,1000));

    If this does not resolve your problems I check the example finder and see if any of this code is able to help you.

    Finally, I have two examples of data strings at the same pace and if you have too many samples on a single line you can throw most of these samples.

    I hope this helps,
    Daniel

  • 2 channels of AI on a data acquisition with the range of different sensitivity

    This vi is based on the 'new project' state machine on the home screen at the start of LV.

    A time loop is parallel to the main loop of the state machine, shown in the picture.

    It works continuously until you press the Exit button.

    The problem seems to be in start this... > read >... stop start > read >... stop along the error line.

    The reason for this clumsy arrangement power is measured voltages are in two lines of different sensitivity.

    The shunt voltage is small and needs-. 2 to the range of V.2. The load voltage is greater and 09:50 V range is good.

    In the initializing state, two separate vi 'create a channel' have been used to specify the range of voltage to the physical channel. The corresponding tasks are sent via via local variables.

    DAQmx errors happen randomly, sometimes the first iteration, sometimes the 50th.

    I tried to disable one or the other start > read > stop for the shunt voltage or load.

    I tried replacing them with the DAQ assistant.

    I tried various DAQmx vi: "wait" and "accomplishment of the tasks by resource cancel selected".

    But error-50103 "specify resource is reserved" keeps popping up.

    Is it possible to create two tasks on the device even when they are not used at the same time?

    The only reason is to measure in two voltage ranges.

    Win 7 Pro 64-bit

    2014 LV database

    Data acquisition equipment: USB-6210

    Thank you.

    This has been discussed many times. Do NOT use separate tasks. You can use different ranges for different channels with a single task. Just wire the task from one channel to another channel to create task.

    You also use local variables when they are certainly not needed.

  • Acquisition of data stops at data acquisition

    Hello

    See the attached VI.  Data acquisition acquires data without problem for a few minutes, and then suddenly the event structure does nothing but the timeout.  I'm deliberately ignore the 200279 error that is generated when two triggers are too close to each other, because I want to just ignore these triggers, but perhaps which also prevents tasks at a certain time?  I also tried to start and stop the task again in the case of timeout events, but it does not help (it causes an error).  Is there a way to prevent either the DAQ card (I use the box USB-6251) of the judgment of the data collection or a better way to ignore triggers that are too close together?

    I hope that I am making some sense here :-)

    Thank you

    Jeremy

    Jeremy,

    Thanks for letting me know about the 99% CPU usage.  It is definitely the cause of your accident and can be avoided by putting a funtion waiting with maybe 10 milliseconds in your timing loop.  However, if you want to keep avoiding strict with no node blocking, you will need to restructure your VI to use the Express VI of time elapsed since the range of Timing.  You will find examples of the use of this VI in detailed at the bottom help.

    Hope this helps, have a great weekend!

  • Average data acquisition alternating window 25sec

    Hello

    I am relatively new to programming and LABVIEW and was hoping to get help.

    I am analyzing the retinal potential obtained in answer to Flash (ON and OFF) model 120 LEDS (simultaneously)

    The rate at which the LED on and OFF depends on a pulse of squares of 1 Hz and 5V amp (from the device).

    I use USB-6009 to convert analog signals.

    Data are collected for 50-100 scans (LEDs go ON and OFF), is - 25-50 s of data collection. Followed by a break (no data genuine collected) from 25 to 100 seconds, after which a new cycle/game data are collected for the next dry 25-50 and so on.   Sampling rate = 1000 Hz (1ms/point).

    My goal is to perform an average of data collected with the timestamp.  Display the waveform of flood and averaged over the waveform graph and write the data on average in an Excel with a time stamp.

    Attached is a diagram of what I expect, I need a direction to start and move forward.

    Help, please

    Thank you.

    Hi Lana89,

    Since this is a simple data acquisition task, you can go through the sample data acqusiition and move forward.

    Kind regards

    SrikrishnaNF

  • Pavilion TS 17-g099nr: PCI Data Acquisition and processing of the Signal Windows 10 x 64 controller driver

    Hi, it is impossible for the moment to install the driver for PCI Data Acquisition and Signal Processing.

    I downloaded the driver from Intel, and it did not work... I found a version of this site for windows 8.1 unupdated and it does not work.

    A little help?

    Thank you!

    Hello:

    It could be one of two different drivers.

    Try this one first, and then restart the PC.

    This package contains the Intel Chipset Installation utility. This utility allows the operating system to show the correct name for the Intel hardware that is installed in the Microsoft Windows Device Manager. This package is provided for the laptop models running a supported operating system.

    FTP://ftp.HP.com/pub/SoftPaq/sp75501-76000/sp75561.exe

    If this does not work, try this one...

    This package contains the driver which allows Intel platform dynamic and thermal firmware setting. Intel platform dynamic and thermal environment information system temperature and power use for the thermal protection of the system to work properly. This package is provided for the laptop models running a supported operating system.

    FTP://ftp.HP.com/pub/SoftPaq/sp75501-76000/sp75506.exe

Maybe you are looking for