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.

Similar Messages

  • DAQmx read progress

    I am collecting 5000 samples per channel on 16 channels using the DAQmx VI's.  I would like to have a progress bar that is updated as the data collection takes place.  I have attempted to use the "Current Read Position" property node, however it only outputs the total number of samples taken once the task is complete rather that constantly updating.  Thanks.

    Try using the DAQmx Read property Available Samples per Channel.  This will give you the right numbers.  Attached is an example (in LV8.5).  I will also attach a pdf with the block diagram in case you do not have 8.5.
    Message Edited by rpursley8 on 01-09-2008 08:00 AM
    Randall Pursley
    Attachments:
    DAQMX test.vi ‏41 KB
    DAQmx Test.pdf ‏49 KB

  • 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 - 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

  • FPGA Digital Channel Read

    I am using the PCI-7831R, and the signal is connected to Channel 2.
    Using the FPGA I/O Node to read in 12 pins.  My question is, is it a serial read or a parallel read?

    You define your signals as either a digital line (serial read/write) or a digital port (parallel read/write). This can be seen if you add FPGA I/O to your target. Here's some screenshots of both single and port signals:
    Note the "resolver" data is composed of two ports of 8 bits each whereas the BITE ENABLE lines are individual signals. You can tell if you are using digital line or port by the type, lines are shown as booleans, ports are shown as unsigned 8 bit integers.
    Message Edited by Bill@NGC on 07-20-2007 06:53 PM
    “A child of five could understand this. Send someone to fetch a child of five.”
    ― Groucho Marx
    Attachments:
    fpga io3.png ‏3 KB
    fpga io.png ‏11 KB
    fpga io2.png ‏5 KB

  • 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

  • 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

  • Which is the best way to edit this program and make it read 1 sample from each channel?

    The original program was made with Traditional NI-DAQ. I have edit it to DAQmx the best that i could. The program it's already applying the voltages that are generate in the code(Daqmx Write.vi). But i'm having problems with acquiring voltages it's giving me rare readings(Daqmx Read.vi)  i don't know if i have to make a (Daqmx Start Task.vi) for each channel in the program or if i can make it work with a single one. Notice i have not make many significant changes because this program is already running in another lab and they give to us the program so we didn't have so much problems but instead of getting the BNC-2090 they got the BNC-2090A that uses DAQmx instead of Traditional. So anyone can help?
    Solved!
    Go to Solution.
    Attachments:
    2 Lock-In, 2 V Amp, Vd Amp - 090702(MTP).vi ‏100 KB
    2 Lock-In, 2 V Amp, Vd Amp - 090702(MTP)new.vi ‏107 KB

    A BNC-2090 is just a connector block.  It has no effect on whether you need to use DAQmx or traditional DAQ.  That is determined by the DAQ card you are connecting the terminal block too.
    You might be referring to this document Differences Between the BNC-2090 and BNC-2090A Connector Blocks, but that is just saying to the change in the labels of the terminal block to accurately reflect the newer DAQ cards.
    What problems are you having with the new VI you just posted?  Are you getting an erro rmessage?  I don't know what "rare readings" mean.
    You really shoud look at some DAQmx examples in the example finder.  Some problems you are having is that your DAQ blocks are all sort of disconnected.  Generally, you should be connecting the purple wire from your create task function, throught the start, read or write, and on to the close task.  Many of your DAQ functions are just sitting out there on little islands right now.  You should also be connecting up your error wires.
    With DAQmx, you should be combining all of your analog channels in a single task.  It should look something like Dev0/AI0..AI7.  Then use an N channel 1 sample DAQmx read to get an array of the readings, which you can then use index array to break apart.
    Other things you should do is replace the stacked sequence structures with flat sequence structures.  Turn on AutoGrow for some of your structures such as the loops.  In the end, you might find you can eliminate some sequence structures.

  • 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 -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!

  • 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

Maybe you are looking for

  • Pic not showing up in Menu (Black and Gray 3 photos across)

    I created a menu and it was all okay when I went back into it to burn, I preview it first and the 3 photos across arn't showing so I droped them in again and it's still not working. What am I doing wrong or what did I do to make them not show. Can an

  • How to create a spool requset for 'z program'.

    Hi, Could anybody please tell me how to generate a spool request for a Z program. and how to check the spool request. Regards sathish

  • Questions about licenses - How to get them back?

    Hey Guys! For maybe a year ago I bought Logic Pro 9 in App Store. And if I got it right, I have 5 licenses - right? So I installed it on my partners Mac, my iMac, and my two MacBooks. (That gives me one licens back). If I later decides to sell one of

  • Picking list determination

    hi, we're using WM which needs to print picking list for picking(TO), i would like to know how the picking list is determined, i mean the logic setup for picking list, where is the path for config in the system. i knew that if we are using by Tcode t

  • Chart dataTipFunction and loading data via HTTPService

    Hi everyone, I have a problem and I hope someone is able to give me a hint. I am using a chart with data points. At the moment I am using a datatipFunction in order to give each point a "tooltip". Now I need the ability to load some data via httpserv