Creating two channels with two "daqmx create channel.vi"

Hey guys,
I'm perform some piezo measurements and my program has one channel for the input (signal that excites the piezo) and one channel por the output (piezo's response).
Since the amplitude of the piezo's reponse varies a lot, my program adjusts the range of the acquisition changing the "minimum value" and "maximum value" properties in the " daqmx create channel.vi". Such an adjustment makes no sense in the input channel once the excitation has constant amplitude.
That is why I need to use two "create channel.vi". I could create the two channels with a single VI but if I did so, I would not be able to adjust the "maximum/minumum value" of only one of them.
The problem is: Labview always returns the error 50103: The specified resource is reserved.
Below, we have a screenshot of this part.
I tried also to add one "daqmx timing.vi" and one "start task.vi" for each of the "create channel.vi" and synchronize everything via error cluster but it returned the same problem.
The program itself is also attached but I don't think it will be useful.
Please, help me guys!
Regards,
Lucas
Attachments:
two create channels.JPG ‏108 KB
consertando burrada.vi ‏330 KB

Try it like this:
EDIT:  OOP, I got the Mins and Maxs reversed.
Using LabVIEW: 7.1.1, 8.5.1 & 2013

Similar Messages

  • Using two daqmx create channel to acquire signals in random

    Hi
    I am trying to acquire signals from PXI 4472 with two DAQmx create channels. The channel selection is random. For eg. first create channel i have ch. 0, 2, 4, and 6 and the other create channel is Ch. 1,3,5 and 7. This I can do, but the problem is that I need to write the acquired data in seperate files for each channels and that too in sequential order. How can I do that. I know i need to use the loop but how will I will select the channels from two different task.
    Thanx in advance
    Nitin

    Ok, here was my idea, I am not sure if it will work for you or not after looking at your VI. 
    You can use some of your subVIS that you made to make the path different for each file.  But what I had in mind for the channels was what I did in the vi i attached.  You can just repeat the process for each of the channels and you would know that they were saved correctly.  You could also feed in the iteration number of the main VI while loop to have the binary files change sequentially (ie, data1, data2, etc).
    Again, this may not be a route you want to take, you may have other ideas. 
    Ill try to work on it some more later, but I have to get back to work for now
    Kenny
    Kenny
    Attachments:
    pxi subvi idea.vi ‏31 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 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

  • How to use two DAQmx assistant ?

         I am using 2 DAQmx assistant objectsfor acquiring 2 distinct different signal.when i run it, it is showing following error.
                          ERROR 50103 occured at DAQmx control task.vi:8
                          POSSIBLE REASON : The specified resource is reserved.The operation could not be completed as specified.
        Pls. tell me how can i clear it.
                                     THANK YOU !

    Any chance you could attach your LabVIEW code for us to see? It helps to visualise your issue.
    You may be running the two DAQmx assitants in parallel, and thus they will be trying to access the same resource simultaneously. They probably need to be ran sequentially. To ensure this, try wiring the error out of the first assistant into the error in of the second assistant.
    Thoric (CLA, CLED, CTD and LabVIEW Champion)

  • I can Simulate SC-2345 with NI-DAQmx, but can't simulate input values per channe

    Hi,
    I  can simulate the device sc-2345 with NI-DAQmx but I can not simulate any value for an individual analog input. I can't assign (simulate) a value or waveform to any individual input associated physically with modules SC-AI03 and SC-AI04. 
    Thank you for your help. 
    Mensaje editado por AndresJS

    Hello,
    Can you please be more specific in your doubt? Do you want simulate inputs?
    Regards
    Luciano Borges
    National Instruments Brazil
    Message Edited by Lucianogob on 09-02-2008 03:21 PM
    Luciano Borges
    R&D Engineer
    Pirelli Brazil

  • Examples for good programming practice with multiple DAQmx tasks

    I'm writing a program to continuously log data from 8 counters, 8 encoders, and 8 voltages. The proof of concept VI with a single counter was simple and elegant, but scaling up to all signals resulted in a wiring mess. I've been working through the Labview Core courses, and am currently on Core 3. I still haven't come across a discussion on how to work with multiple DAQmx tasks without making a mess of the block diagram. Can anyone point me in the right direction?
    Also, say I have a state machine that has a configure, idle, and logging states. I need to set the initial values of the encoders during configuration, and keep up with their changes while in the idle state so I have appropriate starting values when entering the logging state. Can anyone point to an example that shows how this might be accomplished?
    Thanks

    I'm very familiar with AE's/Functional Globals - but I have struggled in the past with handling multiple DAQmx tasks - particularly when you're using multiple devices and using different types of measurements which require seperate tasks/handling (e.g. such as thermocouples which require extra compensation).
    I'm not even sure I know whare the requirements are for needing multiple tasks - I know you can need multiple tasks for a single device if the type of measurement is different but can you share an Analogue Input task amongst multiple devices?
    I think in hindsight (and without too much thought now) it looks like a good case for Object Oriented LabVIEW - with a base DAQmx class (initialise, configure, start, acquire, stop, close etc.) and then child classes for each type of measurement (with one task associated with each - and private data unique to that specific class). You then hold an array of objects (one for each task) and iterate through each one with dynamic despatch to get the data.
    I don't know your particular experience level of using LabVIEW (and as such, OO may not be appropriate) - but as a wider discussion of 'best practice' it seems like an appropriate method I would use going forward.
    Certified LabVIEW Architect, Certified TestStand Developer
    NI Days (and A&DF): 2010, 2011, 2013, 2014
    NI Week: 2012, 2014
    Knowledgeable in all things Giant Tetris and WebSockets

  • Two DAQMX tasks at the same time

    Hello!
    In my program there are two tasks, which should run at the same time. The problem is, if i start my program the failure 50103 occurs. It says, that the resource is reserved.
    I haved searched on the ni site for this failure, but the descriptions haven*t solved my problem.
    Could somebody help me??
    TNKS
    peter
    Labview 7.1 on Windows 2000
    Attachments:
    Messung.vi ‏333 KB

    hi!
    in the automation explorer i defined a task with both channels. the DAQMX-read.vi generates only one dataline and how can i detect the two separate signals??
    i thought, if i have a task with two channels, the Daqmx-read.vi would generate an array ( two channels --> two datalines ???
    best regards
    peter
    Labview 7.1 on Windows 2000

  • 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

  • How can I output several simultaneo​us buffered waveforms with NI-DAQmx

    I am using a PCI 6229 card and NI-DAQmq in LabWindows CVI 7.1. I can not figure out how
    to implement waveform generation in four channels simultaneously. This has to be buffered wavefrom
    generation with internal clock timing.
    Are there any simple examples done without using the daq assistant that I can see to learn how to use the
    NI-DAQmx functions?.
    I need to write a number of periods on four waveforms, while I count digital pulses.
    Many thanks,
    Fundadero.

    Alan,
    Thank you for your help. I did look at that example and played with the number of analog outputs.
    But It was not clear how to modify this example in order to perform buffered analog output
    with updates corresponding to one of the internal clocks. I will output two sinchronous analog waveforms
    and use the other two analog outputs to update their voltage on demand to control y and z positions.
    The two synchronous waveforms, are AO_0 : a voltage staircase, 256 steps increasing from V1 to V2, 2ms duration steps , followed by 256 steps decreasing back from V2 to V1 (controls the x axis position). The second waveform, is a sequence of 256/n smaller staircases, with step durations of n*2ms, spanning a voltage range from 0.0 to 1.0 volts.
    It turns out that I could do this in the traditional NIDAQ but I am struggling to migrate it to the NI-DAQmx platform, and I could not resolve this with the example that you suggested.
    Do you have any more suggestions after I described what I am trying to do?
    I will very much appreciate it.
    Many thanks
    Fundadero

  • How to setup SCXI1127 in scanner mode with NI-DAQmx

    Hi,
    I have 2 1127 mux cards in my SCXI frame and a digitizer/DVM in my PC. I am planning to perform a scan on selected channels across both cards using synchronous scanning ( I cannot get handshaking to work ). I found some examples but they are all using initialization string that looks like this: "SCXIn::i,j:CANNER", but that only works with NI-DAQ legacy not NI-DAQmx where my instrument is just called SC1. I do not know how to set it up with NI-DAQ legacy, it will not give me that option ( using NI-MAX I can setup SCXI-1000 but not PCI-4070 ). Also I do not know how to initialize the NI-SWITCH driver so I have it as one instrument with one instrument handle. I am using NI-DMM, NI-SWITCH 3.0, NI-DAQmx 8.0 and MS Visual C++ Express.
    Thank you,
    Jerry.

    Jerry,
    This is Travis over at NI.
    There are example programs for doing synchronous scanning that ship
    with the NI-SWITCH driver.  You can access them at
    Start>>Programs>>National
    Instruments>>NI-SWITCH>>Examples>>C.  Choose
    "niSwitchDMMSwitchSynchronousScanning."  Your resource name will
    be the same as the your resource name in DAQmx.  Please direct any
    further questions to Minh.
    Thanks, Jerry.  Have a great day!
    Travis

  • Cannot build Installer with NI-DAQmx Configurat​ion Support 9.6.1

    Running labview 2011 SP1 f2
    All SW/Device Drivers are up to date. error code -21, see attached for more details.
    Things tried:
    Updated just about all NI software
    repaired Labview, device drivers, OPC and DSC as individuals.
    Running out of options, its something specific to my machiene, other developers can build this given the same setup.
    Ideas?
    Certified LabVIEW Architect
    Attachments:
    NI Build Error.docx ‏79 KB

    -          The following are possible reasons and solutions for this error: 
    #1. Installer specifications file is corrupted.  For example, an old version of an installer specifications file could have been copied into the project. 
    -Go to Tools>>Advanced>>Mass Compile and mass compile the directory where the error is located.  Mass compiling is necessary for VI compatibility with a particular version of LabVIEW.  If this does not work then delete the saved installer settings from the project window and create a new one with the same settings.  
    #2. Additional installer components have been overwritten 
    -Referring to the knowledge base Why do I get a Missing Distribution Error when trying to build an installer from LV 8.0, an installer build always refers to the original installer source.  For example, if you are using the NI-DAQmx driver (with additional component MAX 4.0) and later install Measurement Studio (With additional component MAX 4.1) this will cause an error because the installer is still referring to MAX 4.0.  Point the installer to the original content on the driver-cd or the hard drive.   
    #3. Installing drivers before you installed LabVIEW or Updating your drivers 
    -The same driver and LabVIEW version, which the VI was written in, must be used to build a functioning installer.  If an upgrade has occurred then make sure to include updated versions of the run time engine and driver.  The driver and LabVIEW versions can be upgraded , in which case you can include the updated version of the driver and run time engine when you try to include additional installers.  Make sure that the driver is properly installed for the specified version of LabVIEW in order to upgrade code for new drivers and software.  Make a back up of your current project for reference.  Open the project in the specified version of LabVIEW and go to Tools>>Advanced>>Mass Compile and mass compile your code

  • Simple single point analog output with NI-DAQmx in VC++ 6.0

    Specs: NI-DAQmx 7, VisualStudio C++ 6.0,  PCI-6722,8channel AO
    We have a very simple application: set a voltage (actually 6 different channels) and keep until we want it changed again, perform the change very quickly in response to an image capturing algorithm. So I don't need any waveforms or buffering.
    In this forum post http://forums.ni.com/ni/board/message?board.id=231&message.id=3283&query.id=18094 you talk about an AOOnePoint example, but I get an error that the NI-DAQ driver does not support my device.
    I may need to use NI-DAQmx, but how? I have a working sample, but it seems a bit slow and certainly overkill of this simple application:
    // Link with \DAQmx ANSI C Dev\lib\msvc\NIDAQmx.lib
    #include "NIDAQmx.h"
    void SetVoltage( double voltage )
        DAQmxErrChk (DAQmxCreateTask("",&taskHandleAnalog));
      DAQmxErrChk (DAQmxCreateAOVoltageChan(taskHandleAnalog,sChannel,"",m_MinVoltage,m_MaxVoltage,DAQmx_Val_Volts,NULL));
    DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandleAnalog,"",Freq,DAQmx_Val_Rising,DAQmx_Val_ContSamps,NUMBER_OF_AO_SAAMPLES));
    DAQmxErrChk (DAQmxWriteAnalogF64(taskHandleAnalog,NUMBER_OF_AO_SAAMPLES,0,1.0,DAQmx_Val_GroupByChannel,data,&written,NULL));
    DAQmxErrChk (DAQmxStartTask(taskHandleAnalog));

    Sorry about this multi posting, I don't know how to delete it

  • How do I use a counter for time measurement with NI-DAQmx and C++?

    Hi,
    I need my C++ program to read time (number of elapsed ticks) using the counter on PCI-6229. I had this written and working for the non-MX driver, and now I need to re-write it for NI-DAQmx.
    Here are the steps that I want to accomplish:
    1. Route the 80MHz timebase to the input of "Dev1/ctr0"
    2. Start the counter and let it count the ticks.
    3. After a while, read the number of ticks from the counter.
    Here is how I am trying to do it now (without success):
               DAQmxCreateTask ( "" , &taskHandle ) ;
               DAQmxCreateCICountEdgesChan ( taskHandle , "Dev1/ctr0" , "" , DAQmx_Val_Rising, 0 , DAQmx_Val_CountUp ) ;
               DAQmxConnectTerms ( "/Dev1/80MHzTimebase" ,  "/Dev1/Ctr0Source" , DAQmx_Val_DoNotInvertPolarity ) ;
               DAQmxStartTask ( taskHandle ) ;
               then DAQmxReadCounterScalarU32 ( taskHandle , 0.25 , &curCount , NULL ) ;
               and DAQmxClearTask ( taskHandle ) ;
    No errors are generated, but I do not see the tick count being incremented when I repeatedly read the counter.
    Advice will be greatly appreciated!!

    Hi Peter,
    Welcome to the forums!   I just want to make sure I understand what you are trying to do.  You would like to count the rising edges of the 80 MHz clock using DAQmx in C++.  In order to route the timebase to the counter, you need to use the signal name (PFI8) instead of the counter (Ctr0Source) for the counter source input.  This name is found in Measurement Automation Explorer (MAX) by right-clicking on the device and choosing “Device Pinouts.”  This will physically put the 80 MHz clock on the PFI8 line, so make sure you reset the device or disconnect the terminals after you are done. 
    That being said, may I ask what you are trying to do by reading the number of elapsed ticks?  If you are trying to monitor a hardware timed pulse, it would be better to count the frequency or period of that pulse.  This would provide better accuracy, because you are not relying on how fast DAQmx Read can poll the hardware.  If you are simply looking for a software based timer, I would recommend taking a look at this MSDN forum post. 
    Using the GetTickCount function instead will free up your counter and provide comparable accuracy to counting the edges of the timebase.
    I hope that helps you out, let me know if you have any further questions about this. Good luck with your project.
    Rod T.

  • Data acquisition problem with NI-DAQmx 9205 and SignalExpress

    Hi everyone,
    I am using a NI-DAQmx 9205 connected via ethernet to my computer and Labview SignalExpress running to acquire data. I am working with EMG and I use an amplifier system from GrassTechnologies (http://www.grasstechnologies.com/products/ampsystems/ampsystems.html). The way it works is the electrodes are plugged on the amplifier system and the amplifier is plugged to the NI-DAQmx 9205.
    I don't know how to setup the system to be able to read properly the emg signal on SignalExpress.
    Does anyone know how to use it?
    Thank you for youe help
    John

    Hi John,
    If I were an Applications Engineer I'd probably be able to figure this out on my own but would you mind elaborating on your hardware setup a little? You mention plugging into a "NI-DAQmx 9205", however the NI-DAQmx is the data acquisition 'driver', the [NI]9205 is an Analog Input Voltage module. Do you mean to be plugging into a Compact DAQ or cRIO?
    Also, I'm not familiar with EMG readings or the amplifiers/electrodes you're working with.
    What is the signal type going into the amplifier from the electrodes, and what is the signal type and range (amplitude) of the signal coming out of the amplifier; AC, DC? I'm assume it's all voltage?
    Straight voltages are pretty easy to work with provided you can scale it to usable units.
    Lets get your hardware and signal types figured out then we'll be able to tell Signal Express how to handle those signals.  
    SCXI- 1000 Chassis w/ 1346 adapter
    PCI 6281 DAQ card
    SCXI- 1520 Bridge Board w/ 1314 Terminal Block (x2)
    SCXI- 1180 Feedthrough Panel w/ 1302 Block
    Signal Express 2014.
    Win7 Enterprise

Maybe you are looking for