Querying DAQmx channel types in LabVIEW

I want to have my LabVIEW application look through all the DAQmx tasks
defined on the computer and display to the user a list of only analog
input tasks.  I tried to do this by:
Use the DAQmx System property node to retrieve a list of all tasks.
For each tasks, use the DAQmx Task property node to retrieve a list of all channels.
For each channel, use the DAQmx Channel property node to query its ChanType.
If all ChanTypes turn out to be Analog Input, then I admit the task into the list.
The problem is that I have tasks that I know are analog output tasks,
but the DAQmx Channel property node still return "Analog Input" as
their ChanType.  Am I seeing things, or is this a bona fide
problem?  Is there a better way to get a list of the tasks I'm
interested in?

Hello,
That is strange.  I built a VI which queries the DAQmx Task Types like you describe, and it works correctly for me.  If all channels in a task are analog input (by the way, this is a little redundant as all channels in a task must be of the same type), then the task name is passed to an array.  Otherwise, an empty constant is passed.
Try running the attached VI and see if it works correctly for you.
Regards,
Sean C.
Attachments:
QueryTaskType.vi ‏34 KB

Similar Messages

  • How to Programmatically Set Scale on DAQmx Channel? Possible LabView Bug?

    Hi folks.  I have researched this question here on the forums and think I know what I need to do, but it doesn't work.
    What I'm Trying to Do
    I am creating a DAQmx Analog Out task that will write to a dozen channels.  I would like to set the scale on each of those channels to one of a handful of custom scales that I've already defined in my project.  From reading various posts on this forum, it sounds like I want to pull each channel out of the task using the DAQmx Task property node, then set each scale by writing to the AO.CustomScaleName property within the DAQmx Channel property node.  See the attached screenshots and VI file.
    The Problem
    I keep getting error 200378 "Custom scale specified does not exist".  The custom scale definitely exists in the project, but the VI won't recognize it.  It sounds similar to the bug described in this thread:  http://forums.ni.com/t5/LabVIEW/Why-do-I-receive-Error-200378-quot-Custom-scale-specified-does/td-p/...  However, I've tried the various workarounds mentioned in that thread (opening VI outside of project, then from within project, etc) and I don't get any different results.  I'm running LV 8.6.1
    Questions
    Does this VI work for anyone else once you've defined a custom scale with the same name as the one in the VI?
    Am I doing something obviously wrong?
    Is there a better way to do this?
    Thanks for any advice, it is much appreciated.  I've attached screenshots of both the VI and the Project window showing the custom scale exists, and I've attached the VI itself.
    Attachments:
    custom_scale_screenshot.JPG ‏38 KB
    project_explorer.JPG ‏68 KB
    daqmx_task_property_nodes.vi ‏64 KB

    This workaround isn't exactly what you are trying to do, but I have made a set of VI's that will let you open up the DAQmx Assistants from LabVIEW code programmatically.
    Programmatically Call NI DAQmx Assistants
    You can call the VI to edit a channel and manually reassign the scale if you want to avoid going straight to MAX.

  • DAQmx Error: Non-buffered hardware-timed operations are not supported for this d evice and Channel Type.

    Hello,
    I am new to NI and to data acuasition cards in general. I am trying to put an application togather that would play large audio file using NI9263.
    And i am getting the following error.
    DAQmx Error: Non-buffered hardware-timed operations are not supported for this device and Channel Type.
    Status Code: -201025
    Does my hardware support buffering ?
    can i use the EveryNSamplesCallbackAO function ?
    Any sample code, will be helpful at this time. Thanks.

    Hi yma200,
    Are you using a USB 9263?  If so, this might be of help:
    http://digital.ni.com/public.nsf/allkb/EC1968728E660B288625780700570D06?OpenDocument
    If it doesn't help, can you please post the code that you have that is causing your error?
    Regards,
    Bogdan Buricea
    Applications Engineer
    National Instruments

  • Accessing DAQmx channel information without DAQmx device attached to system.

    I am currently writing a LabView VI that makes use of a PXI-6229 card on a seperate chassis. The chassis is connected to a seperate computer from the one that I am using to develope the program. My problem is that I need to be able to obtain the DAQmx channel settings for various global channels, but since I don't have the DAQmx card attached to the system, I can't create global channels, and I can't set the channel nodes to return the data I need. In example, I need to be able to retrieve the Max and Min values for a voltage channel, but the channel properties node only lets me access/see the properties Active Channel, Channel Type, Physical Channel Name, and Description. Is there anyway to define a simulated channel for purposes of programming without the DAQmx card being there?
    I'm trying to avoid defining the channels at run time by using globals, but if I need to, I can define them via config file and pull the settings off that as well.
    Jon D
    Certified LabVIEW Developer.

    It is possible to have a DAQmx global channel in MAX without having the DAQ Device in that system. You will need to create the global channel in MAX on the system that does have the DAQ Device. Then select File>>Export in MAX on that system to create a .nce configuration file for MAX. You can then load that file into MAX on your development system by selecting File>>Import. That will import your global channels into MAX on your development system. However, they will show up in MAX with a red X next to them indicating that the device is not present.
    -Alan A.

  • DAQmx Channel Identification

    Hi there,
    I have a problem in using DAQmx channel property node ---> Channel
    Type. many times this property node is giving error code -200088. Once
    this error happend, labview needs to restart. but the probability of
    working of this property node is 25%. I 'm clueless. I'm using this
    property to identify the global channel types whether it is Analog
    Input/ Analog output/ DI/O.
    Any one suggest the reason behind this error.
    Thanks in advance
    Vijayasiva

    Vijayasiva,
    What is it that you have wired to the "task" input of the property node? The error you are getting indicates that this task is not valid. Is it a task you define in MAX? Is it a task you create in LabVIEW? Could you possibly be clearing this task before the property node executes? It may help to post your code.
    Hope this helps,
    Ryan Verret
    Product Marketing Engineer
    Signal Generators
    National Instruments

  • Change a DAQmx channel property for a single channel from a channel group

    Hi,
    I'm doing some digital output, and I'd like to tristate certain lines in each port. However, I'm having difficulty figuring out how to specify which individual lines to tristate. I input a port and a line range, e.g. PXI-6533/port0/line0:7, specify to use one channel for each line in the DAQmx Create Virtual Channel VI, retrieve the channels from the DAQmx Task Property, and try to operate on the individual channels that way.  However, this results in the following error:
    Error -200428 occurred at Property Node DAQmx Channel (arg 1) in tristate_test.vi
    Possible reason(s):
    Measurements: Value passed to the Task/Channels In control is invalid.
    The value must refer to a valid task or valid virtual channels.
    Task Name: PXI-6533/port0/line0
    The NI knowledge base article that deals with this error code talks about creating a task with the DAQ assistant, or ensuring that a task has been created. However, I'm not using the DAQ assistant, as my I/O is pretty complicated; I'm just using a bunch of virtual channels. 
    Is there a way to specify individual channels to changethe properties of without having to create additional virtual channels? I have 48 digital channels I plan to use, so the less virtual channels I have to create the better. 
    Please reference the attached VI, which demonstrates the problem I am facing. 
    Thanks for any assistance. 
    Attachments:
    tristate_test.vi ‏11 KB

    You can only software-time tristate for the 6533/6534. Have a look at the attached example.
    Adnan Zafar
    Certified LabVIEW Architect
    Coleman Technologies
    Attachments:
    tristate6533.vi ‏58 KB

  • Several DAQmx Channels with Start and Clear Task VI's

    Hi,
    I'm trying to read in several DAQmx channels in a while loop. When I just place the channels within the while loop and connect them directly to the read VI's, everything is fine. But I read in the help, that this will slow down my system, because it's opening and closing the task each cycle. So I used Start Task and Clear Task VI's to open and clear them before and after the loop. But now it's only reading one of my channels in, although I wired all of them in exactly the same manner. Anyone has an idea, what I did wrong?
    Thanks,
    Miclas
    Attachments:
    Save&Stop DAQ.JPG ‏87 KB

    You would have seen the error if you had wired up and error indicator.
    You cannot run multiple tasks of the same type (i.e. an analog input) at the same time. What you read about stopping and closing tasks is correct but it was the only way your program could work. What you don't realize is that you can have multiple channels with a single task. If you used a physical channel constant, it would be something like 'dev1/ai0:2' if you had consecutive channels or 'dev1/ai0, dev1/ai2' for non-consecutive. Global channels are done in a similar fashion. You would have 'FSR1, FSR2, Knee Angle', etc.

  • Unknown channel type: JDBC

    dear everyone:
    my Scenario is  HTTP-XI-JDBC synchronous select
    Database: oracle Version: 10.2.0.2.0
    JDBC Adapter communication channel configuration as follow list:
    jdbc driver: oracle.jdbc.driver.OracleDriver
    connection: jdbc:oracle:thin:@192.168.0.180:1521:dstest
    we have configure jdbc driver and test by notes 1085539, the test result is ok.
    when we implement this scenario, i meet some error information as
    follow list:
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!-- Call Adapter
    -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30"
    xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"
    SOAP:mustUnderstand="1">
    <SAP:Category>XIAdapterFramework</SAP:Category>
    <SAP:Code area="MESSAGE">GENERAL</SAP:Code>
    <SAP:P1 />
    <SAP:P2 />
    <SAP:P3 />
    <SAP:P4 />
    <SAP:AdditionalText>com.sap.aii.af.ra.ms.api.DeliveryException</SAP:AdditionalText>
    <SAP:ApplicationFaultMessage namespace="" />
    <SAP:Stack />
    <SAP:Retry>M</SAP:Retry>
    </SAP:Error>
    when i change trace_level to 3, i get detail error information:
    Unknown channel type: JDBC
    please give me some advise

    Hi,
    If This is errored out along with below message also,
    "'Transport protocol not supported in adapter XI' " then there is problem as the 'Transport protocol' in Adapter is usually 'JDBC 2.0' and not just 'JDBC'. Which SP are you on? Also, please check the JDBC Query string.
    Thanks
    Swarup

  • How do I Delete DAQmx Channels

    I am pretty much a novice to LabVIEW, and many of you may see this as a very easy question, but how do i remove DAQmx channels (If this is the correct term, or is it tasks?).
    I have been playing about, and seem to have a few redundant channels and wish to remove them. I have been looking for a while now and can't seem to find it anywhere.
    Solved!
    Go to Solution.
    Attachments:
    Removing DAQ Channels.jpg ‏74 KB

    You need to open DaqMX by clicking:
    Once DaxMX is open you need to open the channels area:
    THen you need to right click on the channel or task that you want to delete and select the delete function.
    Tim
    Johnson Controls
    Holland Michigan

  • Network bound variable on daqmx channels

    Hi all,
    I have a VI that runs fine reading data through Daqmx.
    I also have a 2nd vi running on another pc that has network shared variables bound to some digital in daqmx channels on the 1st PC.
    The problem is if i run this at the same time as my 1st vi,my 1st vi no longer processes the digital inputs (i.e.i switch to on and off and nothing happens), do i need to create network shared variables that i populate from the daqmx ones on the first pc and read those across?, im just wondering if its because you cant read the daqmx channels through the daqmx vis and also try to read them through network bound variables?
    hope that makes sense
    Mike

    Duplicate post.
    Adnan Zafar
    Certified LabVIEW Architect
    Coleman Technologies

  • Querying the data type of objects in an Array?

    I'm able to determine that an argument is an Array using the following query:
    SELECT DATA_TYPE
    FROM all_arguments
    WHERE OBJECT_NAME = 'MY_PROCEDURE' AND ARGUMENT_NAME = 'MY_ARRAY_PARAM'
    DATA_TYPE will be 'PL/SQL TABLE' if the argument/parameter is an array.
    My question is: Is there a way to query what the type of the objects in the array should be? Like NVARCHAR2, VARCHAR2, RAW, DECIMAL, etc.
    Any help is very appreciated!

    I guess the part I'm having trouble with is when the
    Array is defined in a package because the type
    doesn't get listed in "all_coll_types". well, the workaround here would be - the parsing of PACKAGE text - and finding your needed type of array:
    SQL> create or replace package TEST_PACK as
      2          TYPE test_type is table of varchar2(100);
      3   end test_pack;
      4  /
    Package created
    SQL>
    SQL> create or replace package body TEST_PACK as
      2    vc_array test_type;
      3    begin
      4     null;
      5    end;
      6  /
    Package body created
    SQL>
    SQL> select * from user_source t
      2   where name = 'TEST_PACK'
      3  /
    NAME                           TYPE               LINE TEXT
    TEST_PACK                      PACKAGE               1 package TEST_PACK as
    TEST_PACK                      PACKAGE               2         TYPE test_type is table of varchar2(100);
    TEST_PACK                      PACKAGE               3  end test_pack;
    TEST_PACK                      PACKAGE BODY          1 package body TEST_PACK as
    TEST_PACK                      PACKAGE BODY          2   vc_array test_type;
    TEST_PACK                      PACKAGE BODY          3   begin
    TEST_PACK                      PACKAGE BODY          4    null;
    TEST_PACK                      PACKAGE BODY          5   end;
    8 rows selected
    SQL>

  • How to give query in lookup type udf in OIM 11g

    Hi,
    In OIM 9.x, we were able to provide query in lookup type field in users UDF to fetch data from DB and display it in lookup table.
    Where as in OIM 11g, I cant find that option. We need to provide user id in lookuptype field based on some query. Please let me know where we can do the same in OIM 11g.
    Thanks,
    Kalpana.

    In OIM 9.x, we had below query in one of the lookup type attribute:
    select usr.usr_udf_empid,usr.usr_first_name,usr.usr_last_name from usr where usr.usr_emp_type='Full-Time' and usr.usr_status='Active' and usr.USR_UDF_EMPID is not null
    The lookup used to show firstname, lastname & employee id of active employees in the lookup.
    Where we can achieve the same in OIM 11g?
    Thanks,
    Kalpana.

  • Abnormal termination of runform when PROCEDURE is used as Query Data Source Type

    I created a package with a procedure that returns a table of records. This
    procedure tested OK in SQLPLUS. I then created a form and in this form a block
    that used this procedure as the Query Data Source Name, and of course the Query
    Data Source Type has been set to PROCEDURE. This form runs beautifully when the
    number of records returned is small (a few hundreds). But when the number of
    records is large (I have one case where the total number of records returned
    was 11099) then it will crash. I also found that whenever this happens, there
    will be a file in my C:\TEMP with funny namessuch as s90, s81, etc. They are
    always the same size (5008 kBytes).
    Anyone any ideas?
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Chandra movva([email protected]):
    Create a view and base your block on view.That could solve the problem unless you have other requirements specifically.<HR></BLOCKQUOTE>
    Chandra,
    Thank you for your suggestion. Unfortunatel, we have requirements that translate to logics too complicated to be handled by views, and that is why we use PROCEDURES. This actually works very well and very fast, except when we have lots of records returned, then it fails. I am just wondering whether this is a configuration problem ???
    Regards,
    A. Leung
    null

  • Block Property (Query Data Source Type)

    Hello Friends
    I am using Forms 6i.oracle 9i.
    in the Block Property Pallete under Query Data Source Type there
    are 4 Type is mentioned.i have used Table,From Clause Query but yet to use Transactional Trigger and Procedure.How to use this two and it will be very kind enough if u give any example about these twos.
    Regards

    There's a whole bunch of explanation about this subject in the online help of Forms. Just select the Query Data Source Type property and press F1. The initial explanation is very limited but there are a number of useful links under "Related topics"

  • Query for records on a block with Query Data Source Type : Procedure

    Hi All,
    The veriosn of form I'm using is:
    Forms [32 Bit] Version 6.0.8.23.2
    I have a block based on a procedure.
    But when I enetr-query and search for records specific to ceratin criteria even then the result of the Query is all records.
    Is Query not allowed on a block with Query Data Source Type : Procedure.
    Hope my question is clear.
    Thanks in advance.
    Regards
    Arif

    When you use a table based block, forms can construct any select with any where clause based on the given inputs. Using a procedure based block, forms cannot "know" which in or out parameter of the procedure corresponds to which item. Even if Forms could pass the value of an item to an argument automagically, the procedure would have to "do something" with the argument, and you´d have to code it.
    So, any item that should be used in the where-clause must be mapped to an argument.
    Perhaps it would be easier to use a table based block querying a view? For DDL, you could use an instead-of-trigger on the view.
    Regards,
    Gerd

Maybe you are looking for