Editing channels in a task using DAQmx in Labview

Dear All
A few days back while I was trying to build an application to dynamically change my tasks in Labview ,I have encountered the following problems
1)MAX is allowing me to configure multiple channels onto the same physical analog input channels.(Which later i found was a bug in MAX)
2)At times when I try to read the "Channel names configured from the Tasks that have been created , I get the following error
Task is either invalid or does not exists"
3)Also I am trying to edit the channel properties such as range and scale values thru Labview but I am not getting any function to edit channels.There is only one function called "Create virtual channel"
Can somebody help me?
Thansk and regards
Pooja Malhotra

Pooja,
1.) The ability to create, what I assume is multiple global channels, all referencing the same physical channel, is not a bug.
2.) Are you trying to read the name of a task created in MAX or in
LabVIEW? If you are reading a MAX task, this error could occur if the
device is not present. If you are reading a LabVIEW task, this error
could occur if the task has been cleared.
3.) Prasad is correct. All of these attributes are available with the various DAQmx property nodes.
Does this answer your question?
Ryan Verret
Product Marketing Engineer
Signal Generators
National Instruments

Similar Messages

  • Simultaneous tasks using DAQmx functions

    Hi all,
     Is there any example of DAQmx PCI-6251 on Labwindows in which Multithreading is used.
    Basically i want to acquire and generate Analog signals from PCI-6251 by using Multithreading.
    In which one Thread is for Acquiring the analog signals and the other thread is for generating
    the analog signals after performing some calculations on the samples of the Acquired Signals.
    So it means i dont want to Acquire and Generate analog signals Simultaneously but there must be a
    "Little Delay" between the two Threads.
    Any help on this topic will be Greatly appreciated.
    Regards    

    Actually, this is entirely possible.  The primary difficulty is sharing data between your two threads.  The easiest way to accomplish this in LabWindows/CVI is with a thread safe queue.
    I admittedly don't write much DAQ code, so it likely won't meet your specific needs, but I've attached a simple example of doing what you've asked about.  I create two threads, one for reading and one for writing.  Each thread creates a task, and then loops while reading or writing until told to stop.  They share data through a thread safe queue.
    Let me know if you have any questions regarding the sample -
    NickB
    National Instruments
    Attachments:
    DAQMTProcessing.zip ‏7 KB

  • How to make a good UI for channel selection using DAQmx

    A lot of my Labview programming was with earlier verisons of labview (pre Labview 7), and there are a ton of new features that I'm trying to digest (currently using Labview 8.2).
    My question is (in general terms), how are people programming their UI for selecting channels and such when using DAQmx hardware?  What I have in mind is a compacDAQ system with a number of modules.  The user would be able to pick and choose which channels to monitor.  Using MAX as part of that process seems counter intuative, and somewhat static (yeah I know you can change it there, but it feels more like something you would use for something that really doesn't change much).  I'd like all the UI to be within the VI.
    Are programmers using the create task VIs for that or something else?
    Thanks in advance.
    Solved!
    Go to Solution.

    I wholeheartedly second the motion to keep MAX out of the picture as far as users are concerned.
    Setting up UI's for channel selection is a breeze in DAQmx when you create channels on the block diagram. The control you create off the Channels input will populate itself with the inputs that it knows are capable of performing the desired task...
    <<< My configuration knows that my Module 5 is capable of doing Analog Input.
    So... Just create a panel that waits for the user to select the proper channel. I also run a quick check of the user's selection before creating / starting the task. For example, if they choose ai30 or higher, and I know that the system isn't wired for those inputs, I'll not allow that selection. Also check for using two of the same input, etc.
    Richard

  • Is it possible to create a list of NI-DAQmx tasks used in a VI in LV7.1?

    Hello,
    I was wondering if there is a built in function for Labview 7.1 that would allow me to generate a list of DAQmx tasks or global channels that are being used in the VI.
    Thanks,
    Steve

    Welcome to the Discussion Forums,
    Steve!
    Since I’m a visual person, I wanted
    to make it clear where these properties are found by posting a picture.
    I also wanted to clarify and say
    that these properties show the global channels and tasks saved on your system.
    They do not indicate which are used by a specific VI. This is because global
    channels are not bound to any particular VI. Any indicator you could include in
    your VI would just return the names that are being assigned as inputs. So the
    best way to know what’s being used in your VI is to look at what the inputs
    are.
    I hope this helps. If this isn’t
    exactly what you’re looking for, will you please post again and clarify your
    application?
    Message Edited by Mark E on 11-07-2007 09:29 AM
    Mark E.
    Precision DC Product Support Engineer
    National Instruments
    Digital Multimeters (DMMs) and LCR Meters
    Programmable Power Supplies and Source Measure Units
    Attachments:
    System_node2.JPG ‏106 KB

  • How to make a virtual channel in MAX using DAQmx ?

    I want to measure the CJC temperature on the TBX 1328 ( attached to SCXI 1121). I want to create a virtual channel in MAX using DAQmx. I have right clicked on DAQmx but there is no option for virtual channel. Ther is the option of 'Traditional virtual channel' which i dont want.
    I used the VI to make the virtual channel but i want to knowhow to doit inMAX.
    thanks

    Here are 2 ways that you can create a DAQmx channel that appears in MAX.
    1) In MAX, right click on "Data Neighborhood" and select "Create New...". Then click "NI-DAQmx Global Channel" (or "NI-DAQmx Task" -- a task contains the channel(s) and triggering/timing information) and click "Next". This launches the DAQ Assistant that will guide you in creating the channel or task.
    2) In LV, place a NI-DAQmx Global Channel control on your panel or constant on your diagram. Right click on the control/constant and select "New Channel(DAQ Assistant)..." (Note: You can do the same from the NI-DAQmx Task control/constant to create a NI-DAQmx Task.)
    Deborah

  • DAQmx multichann​el read error. DAQmx believes there are multiple channels in my task.

    Hello,
    I recieve the appended error message when attempting to use DAQmx Read in my VI.  LabVIEW is telling me that I am attempting to read a single channel when my task is configured for multiple channels.  However, as you can see in the task configuration pane, that is not the case!  If I attempt to use DAQmx Read to generate a waveform with multiple channels, the VI executes without error but I do not want a 1D waveform array..  Any tips?
    Regards,
    Steve
    Solved!
    Go to Solution.
    Attachments:
    multi_chan_errr.JPG ‏42 KB
    channel_Vin.JPG ‏108 KB

    This is exactly why I ALLWAYS hide my DAQ Tasks inside a "Resource Module" 
    As I use the term a "Resource Module" is a special case Action Engine tha exposes only that subset of functionality that a specific project needs to take on a given resource external to LabVIEW.  And, it provides a single point of entry to access that resource by keeping private data private.  Had you used the technique here you would have had one vi to look at.  and, there likely would have been no "Reconfigure to add channel" method available to cause trouble.
    Jeff

  • Two Counter channels in one task ID with DAQmx?

    I am writing a program which will control the movement of a gimble on the X and Y axis with servo motors while recieving
    position feed back from two encoders on those axis. I am using a 6251M series card's AO to control the movement
    of the gimble, while running the encoders into a 6602 for position. When setting up my task ID in MAX I noticed I could add
    both ctr0 and ctr1 to the task ID, but  when I tried read the counters with that task I got an error in Labview and with the
    test function in MAX  saying I need to use a multichannel read. I can not find a multichannel read under the counter
    section of my DAQmx read, and was wondering if this is even possible. I am used to programming with Traditional DAQ
    and know you have to keep separate counter task ID's, but having bought an M series card and having to use DAQmx I
    was wanting to know if I could combine them.
    Thanks

    You can have multiple channels in a single task, but those channels all
    have to be of the same type.  You can have analog inputs together
    with other analog inputs, but cannot combine digital inputs/outputs,
    analog outputs or counter tasks with that analog input task.
    Once you pair only like tasks together then you shouldn't run into any more issues like this.
    Best of luck,
    Otis
    Training and Certification
    Product Support Engineer
    National Instruments

  • How do I get a list of configured channel using DAQmx

    I would like to know how to read the channels in a task list or the global channels that are setup in MAX. I use to be able to do it in DAQ using the read channel VI. I can't find any equivalent in DAQmx. My new system works only with DAQmx. My program allows the operator to select from the channels configured in MAX.

    Hi Benegin,
    This can be found under the DAQmx System property node. I have attatched a picture to help you find it.
    -Sal
    Attachments:
    system_property_node.JPG ‏359 KB

  • Use virtual channel name as input to DAQmx Write? LV8 and DAQmx

    I've created a task for digital output that contains 8 named channels using the DAQmx Create Channel VI in Labview. Is it possible to use the channel name as an input to the DAQmx Write VI to reference the desired channel? I tried wiring a string with the channel name to the "task/channels in" input but I get a -200428 error that says the Value passed to the Task/Channels In control is invalid.
    The help "name to assign" input for the DAQmx Create Channel VI says
       If you use this input to provide your own names for the virtual channels, you must use the names when you refer to these channels
       in other NI-DAQmx VIs and Property Nodes
    OK, so how do you use the name assigned in other VIs?
    George

    George,
    I think that there may be some confusion here about the difference between local and global virtual channels.  First of all, please take a look at the following knowledge base:
    Physical Channels, Virtual Channels, and Tasks in NI-DAQmx
    As discussed in this KB, local global channels are created inside a task, and they only apply to that task.  In the help file for the DAQmx Write VI, the "task/channels in" description says "if you provide a list of virtual channels, NI-DAQmx creates a task automatically."  When you wire a string to this input, a new task is being created, and unless the channel name that you wire in is a global virtual channel (listed in MAX), you will get the error 200428 that you mentioned.  This is because that virtual channel that you are specifying is local to another task and is not associated with this new task. 
    One solution to this issue is to use the DAQmx Save Global Channel VI to save your local virtual channel as a global virtual channel before calling DAQmx Write.  Once this is done, you can then wire the same string constant to the "task/channels in" input of DAQmx Write or other DAQmx VI's. 
    The help text is still correct, but is only applicable in certain situations.  For example, if you create and name an analog input local virtual channel with DAQmx Create Channel, you could then use this channel name as the source input to a DAQmx Trigger VI configured for an analog edge start trigger.  You could also use that channel name as the input to the "ActiveChans" DAQmx Channel Property, which would enable you to modify the properties of that particular channel. 
    Hopefully this information is helpful to you.

  • How can I get properties of global virtual channels using DAQmx?

    I'm using DAQmx with VB6. In my app, I would like to be able to present the user with a list of available predefined channels to select from. I can use DAQmxGetSysGlobalChans to get a list of the channels, but I need a way to sort out which of these channels are defined as inputs, and which are outputs. It would also be nice to be able to query other properties of the virtual channel (for example, the device and physical channel being used). These all seem very simple things, but I haven't found anything like this in the documentation so far.
    Thanks.

    Try using  DAQmxGetChanType(TaskHandle taskHandle, const char channel[ ], int32 *data)DAQmxGetChanType(TaskHandle taskHandle, const char channel[ ], int32 *data).  This will return one of the following types:
    DAQmx_Val_AI
    10100
    Analog input channel.
    DAQmx_Val_AO
    10102
    Analog output channel.
    DAQmx_Val_DI
    10151
    Digital input channel.
    DAQmx_Val_DO
    10153
    Digital output channel.
    DAQmx_Val_CI
    10131
    Counter input channel.
    DAQmx_Val_CO
    10132
    Counter output channel.
    Let me know if this works. 
    Regards,
    L. Allen

  • How can I quickly sample data from 200 channels using DAQmx?

    Hello,
    I am trying to sample thermocouple data using a SCXI 1000 chassis with two SCXI 1100 modules and one SCXI 1102B, all of which have a 1300 isothermal terminal block. The computer I am using has a PCI-6052E DAQ card and 1 GB of RAM. I will eventually need to upgrade to a SCXI 1001 chassis with enough modules to collect about 175-200 different signals. The problem is I am testing with just the 96 channels I have available and the program runs super slow, with the maximum sample rate only .026 Hz. Currently I have all the channels being read by one DAQmx VI. I've looked through the example programs and tutorials, but nothing there deals with large numbers of channels. Is there a way to improve the sample rate to around 1 Hz with so many channels?
    Thanks in advance

    Check the filter configuration for your SCXI-1100.  The product page says that if you set the filter for 4Hz, you'll only get 3 Samples/second.  The slowest module in the chassis determines the sample rate.  If one of your modules is configured that way, you'll get a maximum rate of approximately 3 hz / 96 channels = 0.031 hz/channel, which is pretty close to what you've reported.  The filter is set by a jumper on the module, see the manual under "filter selection."
    You might want to look at "Determining Maximum Scan Rate for Multiple SCXI Modules" as well.

  • How to configure physical channel using DAQmx block(remote PXI6733)

    I am trying to run the example in labview that use DAQmx. But I find I can't find the physical channel by browser or using DAQ assisstant. It reports "No supported device found". My PXI6733 is on a controller and communicate with host computer by TCP/IP. Could I use DAQmx in such environment? What I should do to find the physical channel?

    Braver,
    The NI 6733 is not yet support by NI-DAQmx. Thus, you will need to use Traditional NI-DAQ to program this device until this support is added. I would suggest that you examine the following Traditional NI-DAQ examples:
    Examples >> Hardware Input and Output >> Traditional DAQ >> Analog Output
    Good luck with your application.
    Spencer S.

  • Displaying multiple analog input channels using DAQmx READ commands.

    I am using a NI USB-6009 module in a hydraulic load test stand.  I want to read multiple analog voltage inputs and display them on my front panel.  Using DAQmx commands or DAQ assistant, LabVIEW will only let you have one READ command for the analog inputs.  Can someone point me to an example or give me some ideas on being able to display at least 3 analog inputs?  Thanks.

    With the DAQ Assistant, when you get a list of 'Supported Physical Channels', look at the bottom of the window. It says "<Ctrl> or <Shift> click to select multiple channels. When you use the DAQmx Create Channel and have a physcial channel control/constant, click the little arrow on the right side of the control/constant, select browse and use the same <Ctrl> or <Shift> click technique. If you want to enter the channels manually, the format is Dev1/ai0:2 for consecutive or Dev1/ai0,Dev1ai3 non-consecutive channels.

  • Labview 8.5 Linux, I can't use DAQmx Base constants

    I'm trying to move an application from Windows to Linux, I'm running RH5 Workstation with LV 8.5 and the newest NI-DAQmx Base installed. I've created tasks using the NI DAQmx Base Task Configuration utility.
    However, when I create a Task constant in my block diagram, I cannot select any tasks with it, the arrow down-button is just greyed out. The same goes for the other I/O-constants (Physical Channel constant and Device constant). I've tried typing the task name, but the program just exits with an error.
    It seems as though LabView doesn't know where to get information about devices and defined tasks, do I need to do anything to tell LV where to look?
    A mysterious thing though, is that I've tried running a sample program, which makes use of one of the predefined tasks and that seemed to work (at least it did not exit with an error). Even more mysterious: When I tried to run the same sample now, it tells me that it can't be opened since I'm running LV 8.2.1, even though I'm running LV 8.5.
    Any ideas of what to do? Would it be meaningful to uninstall DAQmx Base and install DAQmx instead (i chose DAQmx Base since the last DAQmx-version was from 2005 or so).
    Thank you in advance.
    Message Edited by gronfelt on 03-13-2008 04:10 AM

    Hi,
    I recommend you to download the latest DAQmx driver 8.7.1 found here.
    Thank you
    Pelle S
    District Sales Manager
    National Instruments Sweden

  • How to write to one channel of a task with multiple channels? (plus other things...)

    So I have a USB-6009 DAQ.  It has 12 digital output lines.  I want one channel that is "Dev0\line0:10" which represents an address bus in my application.  And a second channel "Dev0\line11" which represents a program enable line in my application.
    I have tried creating two different tasks and adding one channel to one task and the other channel to the other task.  The only task that worked was the task with "Dev0\line0:10".  It was always the task containing that channel, regardless of the order of creation.  So then I moved on to a different method.  (I read somewhere that I should only create one task of each type.  like only 1 DO task only 1 AO task etc...  However I am also using the two analog ouputs to and have a task for each AO and they work just fine.)
    I tried add both channels to one task.  But when I needed to control only the address bus, I had to have some information for the other channel as well.  This was a little trying, but I could configure it that way.  But it turned out to be easier for me to just make one channel with all the lines and OR in the data for line11 with each write.
    I just wondered if it was possible to write to one particular channel of a task and not the other channel?  That would really be the ideal solution for me.  especially if I could write multiple samples to the one channel while I left the other channel alone.  Which brings up another complaint... Why does WriteMultiSamplePort only work if I use a DigitalMultiChannelWriter, and not if I use a DigitalSingleChannel writer even though my task only has one channel (and by the way I set up the channel as one channel for all lines)?  A perplexing issue to be sure.
    And no I can't just load all my samples into an array and write them all at once because I also have to manipulate the two analog outputs in between the various digital writes.
    I am using NI DAQmx 7.5 and C#.  I am trying to use the DAQ to program a digital switch, which has proven to be a real challenge.  In push-pull mode there is too much ringing for the switches programming port to tolerate.  But the switches interface is LVTTL, so I needed the 3.3V.  When I changed to open-collector I had to use voltage dividers to drop down to 3.3V.  But the rise time using open-collector is too slow for me the program the switch in serial mode, so I had to change to parallel.  The switch has an 11 bit multi-plexed ADDR/DATA bus.  So the DAQ I had chosen to use which had plenty of lines for the serial programming, now is strained to it's absolute limits by the parrallel interface.   ARGH.  The only output I am not currently using is the counter, and I'm going to need it if I ever want to read back from the switch.  But first I have to seperate the ADDR/DATA bus from the CS line on the DIO lines of the DAQ.  And I don't know for sure what I'm going to do about the voltage level translation when I have to go bi-directional.  Maybe I can filter out the ringing in push-pull mode?  Any thoughts on that?

    Hi Saikey,
    In most cases, you are exactly right: you can only use one task for one type of operation (i.e. only one analog input task in the same program). With the USB 6009, you can have multiple digital output tasks running at the same time. I was able to run a digital output program with two different digital output tasks configured for a USB-6009.
    However, you stated that it would be better if you had everything in a single task for your application and write data to only some of the channels. The easiest way to do this is to modify your array of output data so that only the data to that one channel is changing. So, for example, if you keep writing a 0 to the channels that do not need new data nothing will change.
    If you have to change your analog outputs during this program, you could create an event structure that would stop and restart the analog output tasks without changing the digital output data. I hope that you find this information helpful.
    Regards,
    Hal L.

Maybe you are looking for

  • Creative mediasource player - track order prob

    I imported a lot of?albums I downloaded from Napster on to the creative mediasource player on my pc. when i try to play albums via this player on my pc the tracks are all out of order (eg track3, track , track2 etc) and I cannot work out how to get t

  • Can't end call and 3.0 question!!

    Hi everyone. Does someone have trouble ending a call when you take maybe over 3 minutes long. I only get a black screen and can't do anything with it and after a few seconds it "reacts" again!! Usually happens when it is an incoming call, but has hap

  • The " FONT NAME " Font is not available.

    Hi, New here but this issue is grinding my gears. Is there an easy way to finding out which Paragraph Tags are missing these fonts? Plan is to update the tags and import tags to other document to resolve the same issue. Any help is appreciated Greatl

  • Defination of Classic and Extended Withholding Tax

    Hi Gurus, Can anyone please explain the defination and exact use of Classic and Extended Withholding Tax difference. Thanks in advance. Regards, Dev Mahendra

  • Safari crash after updating

    Safari won't startup anymore after software updater crashed in the middle of updating safari to 1.3.2 How can I reinstall Safari. It's not available on the original macmini startup disk neither on the Panther installation discs. Please help, before I