read the multiple analog inputs at the same time

Hi all

I use USB-6001 and want to develop an application to multiple tasks in C++. I try to read several analog inputs at the same time, but got some errors. To put it simply, I copy one of the sample code to read in analog data in a channel, and then turn it into function. Then I call this function to thread with the names of different poles (for example Dev1/ai0, Dev1/ai1) and I come across this error:

"The specified source is reserved. The operation can not be specified such complete"code of State-50103

I have search the forums, this may be because I use the hardware timing in this function, and this material timing cannot be used simultaneously by multiple tasks. I may have to put all the lines, I want to read in a single task (such as Dev1 / ai0:1). This way I can read two lines at the same time. However, when I try this, I encounter another error:

Status code "buffer is too small to contain the data read" - 200299

So here is my question, what should I do if I don't want to read the multiple analog inputs at the same time? Is the thing that hard time cannot be used by several true task? If I have to read several lines to a single task, how to set the settings?


Tags: NI Hardware

Similar Questions

  • How to measure multiple analog input at the same time.

    I tried to do a VI that controls a motor with two buttons. If I press the buttons, the VI took the analog signal from the buttons and the engine is running. Each button covers the different direction - to the left and to the right.

    I need to enter the two report in the VI at the same time, but I can't. If I run the VI, VI takes only a random signal. I want to know what are the problems and how to solve them. Please help me.

    You must use a single task for both channels.  See if that helps.

  • Using the DAQ USB-6009 meter and an analog input voltage at the same time.

    Hello

    Currently, I'm reading the two channels of voltage with the USB-6009. It happens that one of the channels is the output of a digital coder, and it would be much easier to use it directly to the PFIO entry that is defined as a counter. The problem I am facing right now, it's that I can't use the DAQ Assistant to use the analog voltage to a channel and the digital channel counter at the same time. Once I put the DAQ Assistant to read the input from analogue voltage, I won't be able to add analog inputs. And as I put the DAQ Assistant to use the PFIO as a counter, I can add more entries to read analog voltage is.

    I wonder if it is possible to solve this problem using the lower level data blocks? Another solution would be to read two channels in analog input voltage and that the use of Matlab to process data resulting from it, since I was not able to do the counting to work simultaneously with the acquisition in Labview to impulses.

    Hope you guys can help out me.

    Thanks in advance.

    Using a simple wizard of DAQ is incorrect. You need one to acquire analog inputs and one for the meter.

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

  • How read datalog multiple files at the same time?

    Hello friends...

    can someone help me to show how read datalog multiple files at the same time?

    Here is the example of my case.

    I have 500 files in a folder. each file contains a waveform and its setting.

    and then I want to do a card spectral these files, because these files have been saved in the order.

    the point is to know how to read these 500 files at once? I made a program to read these files, but the program can read these files in one by one. So it is very uncomfortable to read 500 files one by one. can someone help me solve this problem? Thank you. I hope you can show me the program. Thank you again...

    Hi jojo,

    Well, in the range of functions daughter, you will find a function to list the contents of the folder. This allows to get the names of all the files datalog, and then use a loop FOR to read.

    No one is obliged to provide 500 names of files manually - that's why we use a programming language to let the computer do the stupid work

  • At the same time perform write and read

    Hello

    I use
    DAQmx NOR-USB-6259

    I have problem with parallel
    run the analog signal (for example 1000 points of writing
    by 1 second) channel Dev1/ao0 physics and at the same time read
    1000 points per second physics channel Dev1/ai0 1
    How to do this?
    I tried to use DAQmxExportSignal, but it does work well, or simply, I
    don't know how to do
    correctly maybe I should use a different
    the function?

    Best regards

    AndrzejS

    Hi Andrzej,

    Yes, it's possible, but with your device not at the same time, just with a little delay (about 1 US).

    The track is almost the same thing, you need to add 2 more channels of analog inputs to your task and use playback of multiple samples. Just check the VB Clk Acq - Int example.

    I can't help with particular code, because I'm not familiar with VB, but daqmx functions are very similar, if this change is 3 click in LabVIEW, then it must also be very easy in VB. You manage tasks, if your task contains more channels HERE you will receive samples of all channels.

    I hope this helps and let me know if I misunderstood something.

    Gabor

  • NEITHER 9207 reading current and voltage at the same time channels

    I have a cDAQ-9178 chassis USB-three cards NI 9217 RTD, three cards 9263 0 - 10V and one the output OR 9207 16 channels analog card. What I m trying with this kind of things, is to read all the analog input channels (information of transducer, temperature, pressure, etc.) and adjust my controls to process with the analog output channels.

    My problem at the moment is the following:

    When I create tasks with DAQmx VI:s, how to create a task that reads current and voltage on the 9207 channels at the same time?

    When I created a task for RTD-channels (16), a task for the outputs analog 0 - 10V (12), a task for the analog input 4-20mA (8) and a single task analog 0 - 10V input (8) I get an error-50103. I think it s because the tasks of current entry and voltagge are trying to use the same CAD at the same time and LabVIEW informs that "The specified resource is reserved. Tasks are to leave so that the analog output task starts first, then I merged all clusters of the error and the rest of the task are started by an order to current input-> input-> RTD input voltage. I get this error after the current enter task started and enter voltage task begins.

    Because I m new on the LabVIEW and stuck in that time, I wanted to try the forum to find answers. I tried to find if someone else was having the same kind of problem, but with a quick search, there was none. I m in a bit of hurry, so I apologize if West a subject with a happy for that and I missed too much according to me.

    Really, the best way to do it is just adding 8 channels of voltage at a task, then 8-channel current, somewhat like this:

    Then spread over different channels when you read later:

    It should run without error.  It always is multiplexed to sampling, but it will be much faster to create two separate tasks.  There will be between 2ms (mode high speed) and 52ms (mode high resolution) between each playback channels, but it will still be much faster than the permutation of the tasks.

  • Questions about serial port read and write at the same time

    Hi I create a user interface for the communication serial port, where there are essentially 2 front panels, where the user enters commands one and the other where the prints of UART is delivered. I thought initially using a state machine but the reading and writing may be independent sometimes and so I can't rely on States. I searched a bit on the forum and he left me even more confused. Help, please.

    (1) in a thread that sessions visa duplicated has been used for writing and reading at the same time, is it recommendable? How will this affect performance?

    (2) essentially when the vi is reading data are it must constantly view as well, however, someone said that it takes too much memory to use shift registers, so how do I go about this? If using a State in queue after the loop of reading it affects the playback loop and be sequential?

    In addition anyway is to move the cursor to the latest data from the indicator

    (3) for the control of the user input, assumes that the user has entered an order in the control and press ENTER, then writing visa is launched, but if it comes in another string and press enter then write must be called again... is - it possible? will detect the previous commands in the control of compensation?

    (4) according to my understand the expectation for the event do not monopolize resources and writing can go in parallel, am I right?

    Thank you. I have attached a very basic vi which took me to the point, but I want to make it more robust. Please help especially in the part of the user interface.

    su_a,

    (1) you can have only one session to a port. Several UART can handle full duplex so performance is not affected.  At flow rates of high data and large amounts of data, buffering and latencies of BONE can become a problem.

    (2) who told you that shift registers using too much memory? Shift registers are usually the best way to transfer data from one iteration to another. String concatenation inside a loop (registry to offset or not) causes the chain to develop and may require re-allocation of memory.  Your VI never clears the string so its cold length become very large.

    Generally, you do not have an active cursor on an indicator.  If you want to always display the most recently received characters and turn on the vertical scroll bar use a property node to keep scrolls to the bottom.  This can be annoying for users if they attempt to manually move the scroll bar and find that the program continues to move it back automatically.

    (3) if the user has changed the value in the chain of command, when he hits enter the modified value event fires.  Simply strike brace does not change the value and does not trigger the event.  Not control need to be erased, but the value that he has to change.  If you want to send the same command again, have a button send a command may be a better choice.

    (4) write is a case of the event.  It is not in parallel with anything.  The structure of the event do not monopolize resources.  The other loop will run while it waits.

    The event loop will not stop when you press the STOP button. Probably it wll take two command: change events of value after JUDGMENT before any loop stops.  Replace the Timeout event (which never expires) with a STOP: value change event and a real wire of this judgment to the Terminal endpoint.  Remove the local variable.  Make mechanical locking when released.

    Lynn

  • Read data series and detect the break in series at the same time

    I need to communicate with a serial device that sends messages back, but also sends a break, break, break, break series combo that I need to listen to. I've never worked with before series breaks but the only VI I found which seems to detect pending VISA on event VI with the series Break parameter. I'm not sure that understand how I could detect a break in the series, but also to be reading and writing messages at the same time in the meantime. Isn't this possible?

    If you use multiple loops, I think you can do.  You use 1 loop to check to see if there is data and 1 loop looking for breaks series.  Then use queues, authors of notifications or events to anyone who needs to know what you have experienced.

  • How to read 4 similar channels at the same time with the MCC

    Hello

    with the mcc libraries and a card PCi-6034 classic (by calculation of the measure), I want to read 4 analog channels at the same time. I have a "scope" with 4 channels.  How to read 4 channels at the same time with the mcc?

    MF

    Hello MF.

    Thank you for using OR support.  I guess you try to program in LabVIEW.  Where exactly did you get the MCC library of?

  • I can't have multiple files open at the same time! I need to compare the content from one to the other. How to display two files at the same time?

    I can't have multiple files open at the same time! I need to compare the content from one to the other. How to display two files at the same time?

    Hi sindres79946597,

    Open Acrobat Reader DC, navigate to the Edit-> Preferences-> General-> uncheck "Open Documents in the new tab in the same window.

    Now, reboot your system, when you open multiple PDFs that all will open in a new window so that you can easily compare.

    Kind regards
    Nicos

  • How can I open multiple homepages in Firefox? I want that all my Firefox different email accounts open at the same time. I've recently updated to Win7 and now I have to close it and to open Firefox to access another e-mail account!

    I want home pages Firefox 3 separate and distinct for each of my 3 accounts to be open at the same time.

    Questions are usually followed by a question mark. My reply has answered your question.

    Firefox does not have an email, there is no "accounts of Firefox. If you access "electronic mail" with Firefox, you can use web mail. Some web mail services do not allow direct access, they want their users to access their mail from a "portal" or "Home" and will redirect any attempt to load a web site page "internal" return to home page.

    In measure 3 loading different web e-mail accounts at the same time, if they are in the same domain it does not work on Firefox without an addon of Firefox. http://Br.mozdev.org/Multifox/

    IOW, if these three E-mail accounts with Yahoo, without this add-on you would have to connect separately for each e-mail account, log out of the first before logging in the 2nd. Then disconnect the 2nd before logging in the 3rd. Firefox is not able to have several session cookies for a simultaneous connection to the same server. This add-on provides this feature of "multiple sessions cookies".

  • How to select multiple cells at the same time?

    Hello

    How to select multiple cells at the same time? What is the keyboard shortcut?

    Thank you to.

    Flo, a french guy.

    Hold down the CMD key when you select the cells.

  • TCP Read and Write at the same time

    Hello everyone,

    I have a question about parallelism in TCP connections.

    I know that it is possible to read and write on the same connection ID.

    So, if you ReadTCP and WriteTCP block each other, if you use the same TCP connection ID?

    Or to request more precise if I run two while loops, in parallel, with one end by calling WriteTCP and the other called ReadTCP.

    one of the delay of loops (or block) will be the other if both loops call their VI TCP at the same time right?

    The system is Windows 7 and Labview 2012.

    Kind regards

    Sebastian

    They are perfectly parallel.  Just write in one and read it from the other.  There is no conflict.

    See My TCP articles for more details.

  • Writing and reading the same excel file

    Hello.

    I wanted to write a few values in the excel sheet and after doing some math here I want to read the same file.

    Can I do this? Or there is a better way to accomplish the same task.

    Kindly help.

    Thank you

    To do this you don't need a file. See the attached example, I guess it will work

Maybe you are looking for