Daqmx read

Hai,
          I want to read a pwm signal and calculate its frequency and duty cycle using DAQmx in labview. Can you please suggest the block diagram of how to implement this functionality. Please do the needful. Thanks in advance

Here are some links you should look at:
http://digital.ni.com/public.nsf/allkb/294E67623752656686256DB800508989
this one has an example code with DAQmx:
https://decibel.ni.com/content/docs/DOC-17537
another one with examples:
http://www.ni.com/white-paper/2991/en/
https://decibel.ni.com/content/docs/DOC-30034
Discussion where a problem was found:
http://forums.ni.com/t5/Counter-Timer/NI-DAQmx-M-Series-Pulse-Width-Modulation-PWM-not-working-with/...
https://decibel.ni.com/content/docs/DOC-13798

Similar Messages

  • How to run two DAQmx Read (Analog) at the same time?

    I would like to measure a voltage and a current,
    but the two cannot be conbined in one task.
    Therefore, I had to use two DAQmx Read in the same program. But it did not run.

    Multiple channel types can be combined in a single DAQmx Read. One way is to use multiple DAQ Create Channel fucntions. Look at the posting here and the second example at the link in the answer.

  • How does the DAQmx read.vi work in producer/consumer mode

    Dear all,
    I have one question: how does the DAQmx read.vi work in producer/consumer mode ? 
    I mean if i set the acquisition samples quantity is 5000,(see the enclosed picture), how does the DAQmx read.vi acquire the samples ?
    5000 samples one time ?
    And how does the write. vi work ? Also 5000 samples one time ?
    Look forward to your reply.
    Thank you.
    Attachments:
    producer consumer mode.png ‏28 KB

    It will read 5000 samples per channel.
    The Write Measurement File just writes whatever you give it.  It you send it 5000 data points, it will write the 5000 data points.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Why is the DAQmx Read VI so slow?

    Hello everybody.
    I'm using Labview 8.5.1. and NI DAQmx 8.6 and I'm wondering what the DAQmx Read VI is actually doing.
    What I want to measure is a 1kHz signal. To do this, I'm using a VI similar to the attached one (a pulsed 1kHz signal serves as trigger and as sample clock).
    The time the DAQmx Read VI needs to perform is 250ms longer than the acquisition time you would expect (e.g. instead 100ms to measure 100 samples at 1kHz the time is usually around 350ms, for 1000 samples it is ~1250 ms). The time does not depend on the number of channels in the task.
    So my question is what actually happens when the DAQmx Read VI is called. What I would like it to do is: Wait for the next trigger signal, then acquire the specified number of samples, then read the samples from the buffers and return them. Is there any way to force this behaviour?
    Thanks a lot for your answers, I highly appreciate any help!
    Solved!
    Go to Solution.
    Attachments:
    daqmxAcquisitionTime.PNG ‏20 KB

    Rene,
    For your application and hardware, you should be using DAQmx Control Task.vi to commit your task before your while loop.  Inside the loop, then you'd start/read/stop the task.  DAQmx uses a state machine to control task configuration and run time.  As written, when you cal DAQmx Read, DAQmx will see that you have a task which has never been configured.  As such, it will look at all the settings you make on the task, verify their correctness, reserve all resources necessary, write the configuration to hardware, then start your task.  Once the data specified has been read, it will unwind this state machine to put the task back in an unconfigured state.  As such, every time you call Read, DAQmx if going through all of it's state transitions.  If you were to commit your task before the loop, DAQmx would not re-verify your settings or need to re-program hardware each time through your loop.  That being said, there will still be some addition time each iteration of the loop where you will need to stop and restart your task, and during this time you could miss a trigger.
    If it is truly not acceptable for you to miss a trigger, you might consider moving to a design in which you continuously read data, and then use software triggering to  keep track of the relevant sections of data.  One other alternative would be to look at the X Series line of DAQ devices, as these devices support retriggering in hardware (ie... They can retrigger without you needing to stop and restart your task).
    Hope that helps,
    Dan

  • Error -200429 DAQmx read (counter u32 1ch 1samp).vi -append- Edge count in for loop

    I am receiving error -200429 DAQmx read (counter u32 1ch 1 samp).vi <append>. This is occuring on the second loop of a for loop.
    I have a sequence inside the for loop that is using four DAQmx assistant vi's for edge count at various times in the sequence. All four of these count fine the first time through but at the beginning of the second loop the first edge count receives this error and does not count.
    Any ideas?

    The code you have supplied is similar to the converted subvi but this code will give an empty task error on the DAQmx Create Channel vi.
    Notice on the Daqmx create task vi that there is nothing wired to the "Task to copy" or the "Global virtual channels" connectors - I believe this is why the task is empty when sent to the Daqmx create channel vi.
    The code we are currently using is a modification of a previous code used before a recent upgrade. It may be better in your/NI eyes to re-write this into a State machine but time constraints and resources do not allow that at this time - All other parts of the current program work except for the counter on the second iteration. Would rather not reinvent the wheel at this point. 
    If the task is being cleared was the issue then the other three should also not execute. The issue appears to be the "First Call"
    I have attached a zip file of the complete program as it is now written to give you a better idea of the whole picture.
    Attachments:
    Test Machine current code.zip ‏657 KB

  • USB6356 daqmx read.vi takes too much memory

    I am using USB 6356 for data acquisition, when I took data, the DAQmx read.vi took more and more PC memory. Until certain point, show "there is no enough memory to complete".  I set 2Ms/channel and 1M Hz rate, I know it is very big. But it takes daat for 6-7 times without problem. My PC has 3 G memory.
    It seems that DAQmx read store more and more data in buffer. I attach my vi here, please check it what mistake I did here or how to improve it.
    Thanks Liming
    Solved!
    Go to Solution.
    Attachments:
    usb6356_memory_issue.vi ‏2797 KB

    Hi detech,
    Your VI uses a waveform chart. This type of display keeps a history of your previous waveforms, and each time you write to it new data is appended to the end of the history.
    So in the first iteration of the loop, your graph is storing and displaying 2 million points-per-channel. In the next iteration, it tries to store and display 4 million points, then 6 million, and it will continue in this fashion until you run out of memory.
    Aside from the memory usage, trying to parse a 2-million point or larger array and graph it is very processor intensive, and this will only get worse each iteration of the loop. I suspect your system is also getting slower and slower as you run the VI.
    You can use a waveform graph in place of the waveform chart, which will not keep a history of your previous display, and resolve your memory issues.
    However, it sounds like you need some amount of logging for your application. Can you describe what your trying to do with the data you acquire, and also post what version of DAQmx you have?
    There are several ways built into the DAQmx API and LabVIEW to deal with large amounts of data, and I'm sure we can find one that will work well for you.
    William Earle
    National Instruments R & D | Staff Software Engineer | DAQ Software

  • Error code -200088, accessing DAQmx read function in fncB from fnc A

    Hi,
    I am using NIDAQ 6229, and C code.
    My c code is as follows:
    #define DAQmxErrChk(functionCall) { if( DAQmxFailed(error=(functionCall)) ) { goto Error; } }
    int main()
      TaskHandle aiTaskHandle;
    // and the variables whatever used in the API's declaration below done here and initialised
      DAQmxStartTask (aiTaskHandle);
      DAQmxErrChk (DAQmxCreateTask("AI Task",&aiTaskHandle));
      DAQmxErrChk (DAQmxCreateAIVoltageChan(aiTaskHandle,AIChannelList,AINameList,DAQmx_Val_RSE,0.0,10.0,DAQmx_Val_Volts,NULL)); 
      DAQmxCfgSampClkTiming(aiTaskHandle,"OnboardClock",AIRate,DAQmx_Val_Rising,DAQmx_Val_ContSamps,AISamplesPerChannelAcq);
      while(1)
                fncB( );
    fncB(  )
                DAQmxErrChk (DAQmxReadAnalogF64  
                  (AITaskHandle,DAQmx_Val_Auto,timeOut,DAQmx_Val_GroupByScanNumber,AIReadArray,AIarraySizeInSamps,&AISampsPerChanRead,NULL));
    This Code builds without errors and runs. But the problem is with calling the fncB( ) where the DAQmx read for aiTaskHandle is executing.
    The DAQ read works fine for one time, but in the second call of fncB it gives error " task specified is invalid or does not exist" with error return code: -200088.
    why for the second call , the task specified becoming unknown is not yet all clear.
    the ni error codes document doesnot list this error code yet all.
    i have tried in declaring aiTaskHandle variable global, then in the first time of calling fncB it gives the error as mentioned above.In my application i cant use DAQRead in the same function where i declared the taskHandle , so i have to call it from the function.
    Does some body help in calling the DAQread from another function, and why this task is becoming invalid for the second call,.
    Thanks ,
    vishnu
    Message Edited by gkvishnu on 10-12-2005 08:10 AM

    I found where does my error come from.
    I configure my task from a other function and call this callback to start acquisition (get partly from NI examples)
    I get the error on the Start_AI_Clk(taskAIClk); call.
    int CVICALLBACK AI_TrigStartCallback(int panel, int control, int event, void *callbackData, int eventData1, int eventData2)
        int32       error=0;
         char        Chaine[500],Chaine1[500],ChaineFormateur[500];
        int32       numRead;
        float64     *data=NULL,*dataMoy=NULL;
        int         i,j,Checked;
        double        LocValeurLue,TempsDebut,TempsTotal,TempsEnCours;
        long int     NbMesTotale = 0;
        FILE         *TempFile;
        if( event==EVENT_COMMIT ) {
            if( (data=malloc(NbMes*NbChanAIClk*sizeof(float64)))==NULL ) {
                MessagePopup("Error","Not enough memory");
                goto Error;
            TempsDebut = Timer();
            TempsTotal = TempsDebut;
            TempFile = fopen("TempoResult.txt","w");    
            Start_AI_Clk(taskAIClk);
            ProcessDrawEvents();
            gRunningTrig = 1;
            while( gRunningTrig )
                DAQmxErrChk
    (Read_AI_Clk(taskAIClk,NbMes,data,NbMes*NbChanAIClk,&numRead));
                ProcessSystemEvents();
                 /*data treatment*/
            TempsTotal = Timer() - TempsTotal;
            fprintf(TempFile,"Temps total:%.3f - Nb Mes totales : %d",TempsTotal,NbMesTotale);
            fclose(TempFile);
    Error:
        if( DAQmxFailed(error) )
            TraitErreurCarteDAQmx("Lecture AI horloge externe",error);
        if( taskAIClk!=0 ) {
            Stop_AI_Clk(taskAIClk);
        if( data )
            free(data);
        return 0;
    What happen is when I click on my start button, my function is executed
    once before a EVENT_COMMIT came, so it jumps directly to the Error part,
    then as the taskHandle is not null, it stop the task
     if( taskAIClk!=0 ) {
            Stop_AI_Clk(taskAIClk);
    Then it executes the if(event==EVENT_COMMIT) part and as the task has been stopped, it give the -200088 error code.
    To correct this, I change the Error treatment like this:
    if( DAQmxFailed(error) )
        TraitErreurCarteDAQmx("Lecture AI horloge externe",error);
        Stop_AI_Clk(taskAIClk);
    Yop!
    DanY

  • How to run two DAQmx Read (Counter in + Digital in) simultaneously?

    Hello to all, i have following issue:
    I want to acquire a digital (UART like) bus signal. For this purpose i use a DAQmx Card (PXI 6070e). I need precise time information about time lenght of 0 and 1, so i use a counter. The counter is adjust to CI Semi Period(continuous samples) -> on the edge change i'll get a new measured time value. It works perfectly, but i newer know what kind of state (0 or 1) actually belongs to current value. Of course they changing with each edge, but i need to know that exactly. So i should take a digital input which watching the current state. Unfortunately i can not synchronise two DAQmx-reads.
    Finaly i should get two values:
    time value(counter) and his state(digital in
    ) to work with them. How can i do this?
    I use LabView 7.0

    [SRQ 211371]
    This is not a trivial taks but here is one way to do what you explained with a PXI-6070E and some external circuitry:
    1. Use buffered semi period measurement to measure the width of your pulses.(Meas Buffered Semi-Period-Continuous.vi)
    2. Use a buffered continuous analog data acquisition with external scanclock (e. g. Cont Acq&Graph Voltage-Ext Clk.vi). Maybe you should use a triggered example to start the acquisition at a defined time.
    Now you could connect your signal to the ScanClock input (PFI7) of the 6070E but then you only would acquire only a sample at either the rising or the falling edge. As you need a sample at both edges you need some external circuitry that generates a short positive TTL pulse at each edge (rising and fa
    lling).
    Sorry that I can't provide a solution for this circuitry but I'm pretty sure something like this should be available as a low cost IC.
    You may want to allow your signal some settling time after the scanclock pulse has occurred. In this case simply acquire data on two AI channels. The first channel is only a dummy channel. Connect your signal to the second channel. The delay can be adjusted with the interchannel delay.
    If anybody knows a good solution for the external circuitry or if anybody has a better approach please post it here.
    Best regards,
    Jochen Klier
    NI-Germany

  • DAQmx: Numerical indicators go blank intermittently using DAQmx Read

    Hello everyone,
    I was wondering if anyone else has ever fought this issue and won.  I have a loop (I will attempt to attach an image of the block diagram) which performs a DAQmx Read operation.  The loop employs a 200 millisecond wait.  The loop scales the data, sends all of the values to little indicators in an array, picks out a few critical values to display on duplicate large indicators, and optionally logs the data by streaming it to disk.  The task will usually (99.9% of the time) be run at 100Hz.  So, I was figuring I could do a "Read All", since at 200 ms of wait time due to the millisecond multiple wait function, I should always have around 20 points to read in the buffer the next time around.  This would allow me to have very current readings in my displays.  I could do a partial read, but then I figure I would have a lag between the displayed values and the reality of what's going on in the test.  Having current readings, as current as can be, is highly desirable for this application.
    I figured everything was good with what I was doing, especially when I tested it with a simulated device (I know a simulated device behaves much differently than a real device, especially at start up).  Everything seemed to work well.  When I go to the real hardware, though, I intermittently get blank indicators.  Actually, it is more like intermittent numbers in my indicators.  Most of the time, the DAQmx Read operation returns a null, empty array (no data available in the buffer).  I must be missing something, because I figured that a 200 ms wait would allow another 20 samples to be collected.
    If someone could please just ease my conscience and let me know that I haven't done something very fundamentally wrong in this code, even if you couldn't help me with a solution, I would very much appreciate it.  I feel that this code should work, keeping data in the indicators at all times, and don't know why it doesn't work.  If you could offer me the solution, even if it is to point out that I did something very wrong, I would much appreciate it.
    I am just writing this code, and still have some icons to make, so the sub VI's still have the default icons.  Sorry about that.  Basically all those do is get array subsets, or scale data, or write data to the data files.  If you need to ask questions about the code, I can understand.  I am not the greatest yet at writing self documenting code yet.  And if you need to know what that event structure does, it watches the two boolean button controls to determine what state in the state machine to go to next, and the time out case of the event structure highlights a data value if it goes out of bounds.
    Sorry if I am too wordy.  I have been accused of that before.  I just notice a lot of "Help!  DAQ doesn't work.  How do I fix?" posts, and I don't see how I or anyone else could help that person at all.
    I am using LV8.2, with DAQmx 8.3.1, on Windows XP, 1GB of RAM, and a fairly healthy Duo core processor.  I have a workaround where I throttle back the read operation, only reading 55% of the available samples, as reported by a DAQmx Read property node (the highest percentage I found that prevents the indicators from going blank).  This introduces a small lag between the real world and the data on display, however.  Also, it seems like a processor dependent solution.  I would have to tweak this percentage for every machine I run this on.
    If I have left anything important out, please let me know, and I will do my best to clarify, and thank to anyone who reads this, and a big thank you to anyone who takes the time to reply.  Again, I would be real happy with a "That code looks good to me, and your thinking is correct", if that indeed is the case.
    Thanks.
    Attachments:
    Log Monitor Block.JPG ‏292 KB

    Yeah, as you and Erik said, just specifying (Sample Rate / 5) as the '# to read' could do the trick.  Then you can ditch the 'Wait (msec multiple)' function.  I don't think I'd recommend the -1 = infinite timeout though.  I'm pretty leery of stuff that can lead to an infinite wait or an infinite loop.  Even a 1 sec timeout should easily be way more than enough.  Note however that this method depends on all your processing code executing in under 200 msec on average.  Otherwise, your reads will fall behind and you'll eventually get a DAQ buffer overflow error.  My earlier suggestion to first query for # available samples and then read the MAX of (# available, SampleRate/5) will prevent cumulative fall-behind effects.
    There's too many unknowns to speculate with any confidence on exactly why the software timing method didn't work.   I can point out some additional things that bear greater scrutiny though.
    1. You've got some sort of function dealing with file streaming that takes a path input and produces a path output.  This probably means that every loop iteration you're using the path to open a file, write data, and close the file again.  This actually may consume more than 200 msec, at least some of the time.  Because this runs in parallel with the msec wait function, something like the following could be happening:
    A. Iteration 1 proceeds as expected.  The DAQ read collects 20 samples, the file write consumes only 100 msec, and the wait msec function ends after 160 msec in order to end on a 200 msec multiple.  The wait function took longest, so your whole loop ends on a 200 msec multiple.
    B. On iteration 2, the wait msec function ends after 200 msec on the next 200 msec multiple.  The DAQ read collects another 20 samples (because it's been pretty much exactly 200 msec since the previous loop iteration started) right away.  However, Windows was busy messing with the file cache so this time your file write consumes 375 msec.  The file function took longest so your whole loop ends 175 msec into the next 200 msec multiple.
    C. On iteration 3, the wait msec function ends after 25 msec on the next 200 msec multiple.  The DAQ read collects 37 samples that have come in since the prior call 375 msec ago.  The file function consumes only 50 msec this time, ending the loop 25 msec into the next 200 msec multiple.
    D. On iteration 4, the wait msec function ends after 175 msec at the next 200 msec multiple.  The DAQ read collects the 5 samples that have come in since the prior call 50 msec ago.  Uh oh, not enough samples...
    One possible fix is to open the file outside the loop and leave it open until after the loop is done.  Opening and closing files has quite a lot of overhead.  Inside the loop, you'd be passing around the file refnum.  Doing this one thing alone might also be a way to fix your timing problem.  Along similar lines, you could write the data to a queue and then do your file writes in an independent loop that reads the data out of the queue.  You can search here for "producer consumer" for more info.
    -Kevin P.

  • Compare two DAQmx Read modes

    For a continuous DAQmx acquisition, generally a start VI is put before a loop structure to request DAQ board to begin  continuously  reading data into buffer,  and  within loop  a DAQmx read VI is used to  continuously  retrieve data from buffer.
    My question is, for the DAQmx Read VI, is there any performance difference between  'Nchanel N Samples'  and 'NChannel  1 Sample'?  My understanding is, the former  read all data  available in  buffer,  so maybe we can use larger value for  waiting until ***ms function, and for the latter, since only one data is read in each loop, we need to use smaller waiting value, to catch up with the board acquisition speed, therefore meaning the loop structure need to be executed much faster.
    For my application, read only one data in each loop is easier for teatment, but I am concerning whether more frequent loop execution may cause decrease of performance. Any suggestion?
    Thanks.
    -Dejun

    I don't agree with you, Dennis, but maybe I am wrong
    Even though I use '1Sample' within a loop, there is still a hardware timing Vi before the loop, so the timestamp of each data point should still be determined from hardware timing, this is my understanding. The difference between '1Sample' and 'NSample' is just how many data are read from buffer in each loop execution. As to the timestamps of data in the buffer, they are already determined by the hardware timing, and therefore should be independent of how they are read in loop structure (1Sample or NSample).
    Message Edited by Dejun on 08-30-2007 05:16 PM

  • Error -200279 at DAQmx read

    Hi i am fairly new to daq in labview,
    i have code which accepts data from 2 devices a PCI 4351 connected to a TBX 68T and PC1 6111S card connected to a SCB68 block. i have uploaded the code.
    when the code is running and then when i press the stop button on the front panel, i get an error of -200279 which is something to do with the daqmx read. I have looked into some other problems that some have faced on this error in this forum, and hence i have tried to increase the rate whilst keeping the number of samples the same but this has done nothing and the same error appears.
    any suggestions will be greatful!
    thanks
    Notay
    Attachments:
    Copy of NI 435x Thermocouple (LEE).vi ‏124 KB

    Well the main problem is you have two different mechanisms to control the speed of your while-loop. First in the upper right hand side of the loop there's a wait until next (100) ms. The second timing method is the read 5 samples in a 1000 Hz stream, this only allows for 20 ms wait time.
    AFter a while your buffer will be full (by the way you don't need to specify the number of samples per channel) and the AI read will generate an error.
    Make sure you end the while loop as soon as the error is generated you don't check inside the while loop which is  a bad thing.
    To avoid this you have to decide how to time your while loop.
    I would set the number of channels to read to -1 (be aware you get 100 samples from the AI read)
    Also replace the 'wait until next ms' with a 'wait ms'
    And check for errors inside the whil e loop
    Ton
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

  • Daqmx read.vi timestamp incorrect problem (storing the timestamp from start task)

    Hello,
    I have a state machine with 1st state: configure DAQ where i have [daqmx create channel.vi --> daqmx timing sample clock--> DAQmx start trigger--> daqmx start trigger] connected in order
    sample clock in continuous mode, 10000 samples to read and sample rate 1000 Hz ,
    start trigger has rising edge selected with a dev1/PFI0 from a daq board.
    next state of SM is read channels which has daqmx read.vi set to 1d waveform  Nchan Nsamp.
    and the program first configures and goes to read channels state and is just waiting for the true value on PFI0,
    but the time stamp is not updated to current time/ when daqmx read starts instead it is getting the initial t0 from the time when it was in configure DAQ state of my SM in other words it stores the starting time when strart task.vi was run and then updates from then on.
    so in effect i am not getting the exact time stamp values while i am running the vi.
    i tried to build waveform by inputting the actual current time but the chart doesnot scroll and shows only few values each reading, when i tried to input the t0 from the waveform given out by read daqmx. vi, it then behaves normally..
    option #1 from this link says
    http://forums.ni.com/ni/board/message?board.id=250&thread.id=47648&view=by_date_ascending&page=2
    Try and do exactly what the driver does.  This
    will require you to do exactly what you are doing in the posted
    example.  Call the current system time immediately prior to calling the
    DAQmx Read and subtract dt * x where x is the number of samples already
    acquired.  This will require you to know exactly how many samples have
    been acquired.  This can be found by calling the Total Samples Per
    Channel Acquired property immediately prior to the DAQmx Read.  This
    introduces some points of innaccuracy.  For example, you're system time
    is already innaccurate to some amount.  In addition, it takes some time
    between calling system time, calling the total samples acquired, and
    calling the DAQmx read.  If 2 samples are acquired between calling the
    system time and total samples acquired, you could be off by a few
    samples.  For slower clock rates, you will have more accuracy. 
    but there are no samples that are acquired until the rising edge, so the number of samples is always zero before the read operation
    http://digital.ni.com/public.nsf/allkb/5D42CCB17A70A06686256DBA007C5EEA 
    this link says that
    and the number of samples in my waveform is constantly changing around 20-40, so i cannot really input the current time to build the waveform, thats what i can figure out for now..
    can somebody tell me why this is happening or is there any fix around this, how to get the current time into my daqmx read.viso it displays the currect time on my waveform chart
    Thanks,

    thanks,
    im using LV 8.6, daqmx driver 8.9.5.
    yes the program u posted get the currect time. but see attached program thats what i have in my program exactly
    if you took out the time to using the get waveform components using the waveform  from daqmx read. i still have the timestamp as the application start time. plz see attached code 8.2v and FP
    the waveform time x axis is not current, it is starting from the application start time.
    PS: samples to read = 10,000 and sample rate = 1000
    plz help..
    Attachments:
    daqmx read problemp.png ‏8 KB
    daqmx read problem.vi ‏36 KB

  • Is DAQmx Read limited to 9 digital channels?

    I'm trying to read multiple digital channels with DAQmx Read (Digital 1D Wfm NChan NSamp). The output the DAQmx Read vi is a 1D array of digital waveforms. If I put that output through Array to Cluster the resulting cluster seems to be limited to 9 elements, data[0] through data[8]. Is the DAQmx Read output limited to 9 digital waveforms? I'm using Labview 2009.
    Solved!
    Go to Solution.

    Converting an array to a cluster to use unbundle to break out the elements of the array is a hack.
    You should be using Index Array to get the elements.  You can resize that function so that you can have additional outputs.  You won't even have to wire up any constants for the indices usually.  The top element will be element 0, the next element 1, element 2, and so on down to the bottom of the function.

  • Change the precision of waveform data or daqmx read

    Hi all,
    I am currently using daqmx read and writing the data to a tdms fiile.  I would like to change the precision of the data if possible.
    Any advice?
    Thanks,
    Matt

    matt198717 wrote:
    James,
    I did however have another question.  If i log data to a table indicator on my front panel, using a shift register to fill the table every data point, will this eventually become a burden on the CPU, and if so whats the largest table i should have on my front panel?
    Thanks,
    Matt
    Just saw that you asked another question. Yeah, your table will get bigger and bigger and is what we like to call a "memory leak". You can go pretty big and be fine, but it's really just a play-it-by-ear type of thing. Think about how your end user is going to need to see the data. If they onlyy need the last hour of data on the table, then cut it off at an hour of history. If they need the last day, maybe it can handle it, but you might want to look in to limiting what's displayed or something like that.

  • Clearing daqmx read value

    Hello,
    When doing a single sample counter read using DAQmx in a while loop, is there any way to reset the data output on the DAQmx read task? For instance, say the value is 200, is there any way I can keep the task open and running and reset it to read zero?
    Thanks,
    David Joseph
    Message Edited by KY Wildcat on 11-16-2007 10:57 AM

    Hi KY
    There isn't a property or method in DAQmx for setting or resetting the count value when a task is running. You need to Stop and Start the task again. Otherwise, you can
    create your counter in software. If you wire the counter output to an indicator, you can then create a local variable and create the logic that will
    programmatically reset its value, e.g. when it exceeds 200.
    http://digital.ni.com/public.nsf/allkb/65E3DBC715998C3286256E900075B7F8
    I hope that helped,
    KostasB
    NI Applications Engineer

  • DAQmx - Read AI digital values

    Hi!
    Simple question: Is it possible to read directly the discrete values from an analog input channel?
    The result of a "normal" DAQ AI aquisition are DBL samples. In fact that the card converts the input voltage with an ADC into a digital value its waste of memory to use DBL for lets say a 12bit conversion. I use the following hardware, but this should be possible for every card:
    - NI PCI-6110
    - NI PCI-6711
    Best regrads,
    Michael
    Solved!
    Go to Solution.

    Ok found it in the VI "DAQmx Read (Analog 2D U16 NChan NSamp).vi". Seems to be that nobody uses this... i never saw a LabVIEW example with such a simple way to read out the REAL AI data.
    Best regards,
    Michael

Maybe you are looking for