a node property to return the configuration of the task a DAQmx

Tasks in this project are preconfigured in MAX, but once the operator needed to enter and change the sampling frequency, that I would like to add a routine to start to check the sampling rate of the configured tasks. I know that using a DAQmx property node can return task names and channel names, but what I could use is a property node to return the sampling frequency of the task. A knowledge of a way to do this?

If you place a property on the block schema node, connect it to your task control. Right-click on the property node, and then select the DAQmx Timing (class select DAQmx-> DAQmx Timing). Then select the sample-Rate property > clock.

Tags: NI Software

Similar Questions

  • What is error 50103? the task of DAQmx START?

    Hello

    I use cDAQ 9174 with NI 9401 to measure the period of the encoder.  I have two encoders and learned that I need to have a separate task for each.  Initially, I got an error telling me that the task was not reserved, so I followed the advice of the forum and added the TASK of CONTROL DAQmx, STORE of the value.  That eliminates the error, but now I have a new error 50103, which offers very few details of what actually is the error.  The seal is a snippet of the code, you see where there are three tasks, two tasks of meter to measure the period of encoder, and task of measurement of blood pressure, which in my opinion is not related to this error.

    Error 50103 to DAQmx controls TAsk.vi:3.

    The possible reasons: NI Platform Services: T / he said that resource is reserved.  the operation could not be performed as indicated.

    TAKS name: task _unnamed<3E>

    Thus, at the beginning, said he reserved the task, now it tells me that the problem is the reserve.  Does anyone know what this error is talking about?  The attached code is connected to a WHILE loop that aims to do a bunch of stuff with the data from the period after it was collected.

    Thank you

    Dave

    Hi dav2010,

    I modified the original example of working with the two counters at the 9174. It worked for me. Let me know if it works for you also.

    Best,

  • Node property/reference for the image and 'Create VI' inconsistent control?

    Hello

    I encountered this problem several times already and although I have worked around him, so far, I would really like to understand what is it:

    If I have an image display control on the Panel before (IMAQ Vision, not the image control type) and drag a property node or a reference to it on the block diagram, it seems impossible to create a Subvi diagram if the selected objects are equipped with a knot of property image or an image reference. Select 'Create Subvi' won't do anything, don period. No warning, no beep system, no nothing.

    A related issue is that if I have a view control reference on the diagram and try to create a control from it (for example to use as a control on one dimension of connector VI entry), same thing, "Create control" will not do anything.

    Why is this?

    Thanks for your comments.

    X.

    Xavier,

    This was reported to R & D (35835) for further investigations. A possible workaround is to make the Subvi LabVIEW 7.1 and open it in the new version of LabVIEW.

  • Use the node property to get the value of control

    Hi all

    I know that you should keep the use of local variables to a minimum in order to avoid race conditions. Is this the same problem if you using the eg property node. a digital control?

    The reason why I want to do is to keep the son of the intersection when I need to use a control on one side of the diagram across the diagram...

    Basically to make the scheme simple and enjoyable to watch.

    I hope that makes sense!

    Good day!

    Kind regards

    Tommy

    Tombech84 wrote:

    [...] Is this the same problem if you using the eg property node. a digital control? [...]

    Exactly. Perhaps, he creates the race conditions and should not be used. Using wires to connect the terminals is the approach only "Save".

    In addition, performance decreases in the following order:

    -Terminal (+)

    -variable (0)

    -property to value node set (-)

    Norbert

  • How can I take an anchored frame and return the paragraph tag used?

    I need to analyze through anchored frames and return the tag of paragraph that it is spotted. I can't find a property which returns the paragraph tag. Anyone have any ideas?

    Try this on the anchored frame selected:

    #target framemaker
    
    var doc = app.ActiveDoc;
    var aFrame = doc.FirstSelectedGraphicInDoc;
    var pgf = aFrame.TextLoc.obj;
    
    alert (pgf.Name);
    

    Rick

  • Set the scale of thermocouple at table for a channel in the task

    I create a task that contains 9 measures voltage and 10 by thermocouple programmatically. All the thermocouples are of Type T. I just want to read one of the thermocouples up to the limit of 30 k. NOR for the Type T is 73 K.

    I understand that the lira below their limit thermocouples OR is to change the scale type to table using a property DAQmx Channel node. However, because I take different types of measures, I need to isolate the channel particularly thermocouple. If I move the entire task to the node property DAQmx channel and try to set the scale of the type of thermocouple to table, I get an error because the voltage channels do not support this property. I can't understand how to get individually on channels of the task. I don't want to separate the measures into two tasks, because then I have to do to synchronize the clocks of additional programming.

    I have more than one idea: use a DAQmx create task VI at the beginning. Do a global virtual channel to MAX for the thermocouple that I want to change the type of ladder for. Place a constant for this virtual channel and run through the DAQmx Channel property. Use the task of creating DAQmx to create a task containing this global virtual channel. Pass this task to a bunch of DAQmx create Virtual Channel screws to add other measures to the task.

    This makes a lot of the scalability of my program and seems to be the wrong shape in general. Looks like there should be an easier way to do it. Any ideas? Thank you!

    Hello

    Try to use the property node of channel Active channels (ActiveChans) that is by specifying the string "isolated" as its input, and then adding the (HAVE. Themcpl.ScaleType) in developing the property node even by setting its entry. The property node Active channels specifies a list of virtual to change channels or virtual channel. Virtual channels are in a specific job. NOR-DAQmx configure all channels in the task if you do not set this property

    Best regards

    M Ali

    Technical sales engineer

    National Instruments

  • How to clear the output buffer, possibly resize and burn again, before you begin the task of output

    I use PyDAQmx with a USB-6363, but I think the question is generic to DAQmx.

    I have an output buffer that I want to be able to (re) write to without starting the task output.

    More specifically, I have a graphical interface and a few sliders, the user can move.  Whenever the slider changes, a new set of values is loaded into the buffer output through DAQmxWriteAnalogF64.  After you set the value, the user can click on a button and start the task output.

    In some cases the change in cursor does not require a change in buffer size, only a change in the data.  In this case, I get the compalint following DAQmx as they tried writing:

    The generation is not yet started, and not enough space is available in the buffer.

    Set a larger buffer, or start the generation before writing data more than content in the buffer.
    Property: DAQmx_Write_RelativeTo
    Value: DAQmx_Val_CurrWritePos
    Property: DAQmx_Write_Offset
    Corresponding value: 0
    Property: DAQmx_Buf_Output_BufSize
    Corresponding value: 92

    In other cases the change in cursor requires both change in the size of the buffer and data modification.  In this case, I get the following, but only after that do a few times each time increase the size of the writing.

    DAQmx writing failed because a previous writing DAQmx configured automatically the size of output buffer. The size of the buffer is equal the number of samples written by channel, so no additional data can be written before the original task.

    Start the generation of before the second writing DAQmx or set true in all instances of writing DAQmx Auto Start. To gradually write to the buffer before starting the task, call DAQmx Configure an output buffer before the first writing DAQmx.
    Task name: _unnamedTask<0>

    State code:-200547
    function DAQmxWriteAnalogF64

    I tried to configure the output via DAQmxCfgOutputBuffer buffer (in some cases, by setting it to zero or a samples, then save again, in an attempt to clear it) but that doesn't seem to do the trick.

    Of course, I can work around the problem by loading data only when the user clicks the end button, but not what I'm asking here.

    Is it possible to "remake" the writing of output before you begin the task?

    Thank you

    Michael

    Today I have no material practical to validate, but try unreserving task before writing the new buffer:

    DAQmxTaskControl (taskHandle, DAQmx_Val_Task_Unreserve);

    With a simulated device, he made the error go away in case the buffer is the same size.  You will need to validate if the data are in fact correct, but I think it should be (unreserving I would say reset the write pointer so the old buffer are replaced with the new data).

    I always get errors when you try to change the size of buffer if (on my 6351 simulated).  I posted some similar mistakes about the reconfiguration of the tasks here, I guess it is possible that this issue has also been set at 9.8 (I always use 9.7.5 on this computer).  If the behavior is still present in the new driver, and also appears on real hardware (not just simulated), then it seems that this is a bug of DAQmx someone at OR should be considered.

    I wrote a simple LabVIEW VI that captures the error in order to help people to NOT reproduce it:

    The best solution at the moment would be likely to re-create the task if you need to change the size of the buffer (or avoid writing data until you are sure what will be the size of buffer).

    Best regards

  • Property DAQmx node do not return error whereas it should

    Overview:

    I do a configuration dialog box where the user can select which tasks available (from MAX) and the channels that it wants to use for the configuration. I have display them in a tree control with a background of different color for elements line depending on if they are used, not used, or the device is not connected.

    Question:

    In the attached extract you can see that I get all the tasks available and channels. If my device that is linked, the task is not connected to my PC at the start of the program and I press refresh I get an error. Well, this is what I want. However, if my device is not connected at the start of the program, and then I connect and press refresh, it rest-error. Same goes for the opposite--if I have the device connected at startup then unplug and press refresh, there is no error. It is a pain because I would be as the user should be able to connect if they forgot their device, then press r and have everything be updated accordingly. However, it seems that this is not possible, unless they stop and restart the program.

    These property nodes DAQmx search only a specific device and channels at startup, rather than at run time? Can anyone think of a work around? Also, can someone reproduce it so I can check that is not just "error of the programmer".

    I use a USB-6009 box to test.

    Hi Greg,.

    DAQmx control i/o tasks can be one of three things:

    1. A task object DAQmx. It is a collection of data structures representing the task, channels and task status. He lives in the process of LabVIEW (or whatever method is calling in the DAQmx API).
    2. The name of a task DAQmx persistent stored in MAX. It is just a string, but it corresponds to the settings stored in the database of the MAX.
    3. A string that does not match the #1 or #2.

    The DAQmx system > Tasks property returns the names of persistent stains from DAQmx (#2). When you one of these names of transfer to another node VI DAQmx or property, LabVIEW automatically creates a task of DAQmx (#1) with the same name and parameters object. Nothing more than a simple VI 'control IO' wired to DAQmx Read, this is an important and subtle distinction.

    Look at the auto-creation task is using NI Spy:

    The line that says DAQAutoCreateSessionWithLVContext("My6009Task",...) is when 'My6009Task' gets converted to the name of a task of DAQmx persistent (#2) to a real DAQmx task object (#1). If you click Refresh, you won't see LabVIEW Auto-creer 'My6009Task' again, because the task has already been created automatically. On the contrary, LabVIEW continues to directly use the 'My6009Task ':

    Therefore, your program only creates tasks at startup, then it reuses the same tasks for later updates.

    My suggestion was explicitly create and destroy jobs, so that operational life is under your control, not of LabVIEW. Here's how to do this using DAQmx create a task and DAQmx task clear:

    (I also replaced the structure of the event because he did not work inside an excerpt of VI, but make an extract added in any case broken wires. Simply remove control 'Panel' and broken wires, or copy the corresponding code in your original VI.)

    Creating the task checks if the device is present, but if you want to go further and check if the device is usable, you can temporarily reserve:

    This fails if another program or VI has the resources for the device HAVE reserved. Call DAQmx Start reserved implicitly HAVE the resources for the device, but it would also begin to acquire data, which are not necessary here.

    Brad

  • Writing to the nodes property DAQmx channel does not refresh the channel values

    Hi all

    I have a riddle.  I created a task programmatically in LabVIEW and programmatically added several analog input channels to the task.  It's easy.

    I wish that my user must be able to modify the individual channels within the task.  To this end, I created a set of screws that allow it to change the settings appropriate to the channel (for example, if it is a channel of thermocouple, it can change the type of thermocouple, CRC value, etc... If it is a strain gauge channel, it can change the coefficient of fish and so on).  These screws all works beautifully, like the VI where they live.

    The specific question that I have is that writing to the channel property nodes refreshes not communication channels.  See the images below.  The first image is the code that needs to define new channels of communication:

    Note that immediately after setting the property nodes, I read their values back, just to see what comes out back.

    The second image is an image of the public Service immediately after the execution of this VI.  Note that the values read from the channel property nodes did not updated to match to the set of values, but instead kept their initial configuration values:

    What I am doing wrong?  I fought this for a few days now and I'm stumped.

    Thanks for your time!

    Diane

    Hi, Diane.  A week ago, I also had a problem changing the channel properties (not sure that our situtions are exactly comparable, but...).  My 'solution' to want to change the appearance of the task was to just throw the original task and recreate all the elements of the task from scratch.

    I've not done enough 'experiments' to work when you can and cannot change, but am now much more cautious...

    Bob Schor

  • How to configure a web service primavera to return the data in the second database?

    Hello world


    We have P6 with WS first deployment on a single weblogic domain server. The first WS returns the first instance of database data.

    Then deployed to the WS second tip on a weblogic domain server separated with a different port. Set up the second WS with < WS2_INSTALL_HOME > / bin/dbconfig.sh, creating a new branch a configuration that specifies one second instance of the database. However, this configuration is ignored, and the second web services return data from the database.

    We have a single domain, including notably the following servers:

    Name / host / Port / deployments

    P6 / localhost / 0001 / P6 (v8.3), p6ws1 (v8.3)

    p6ws2 / localhost / 0002 / p6ws2 (v8.3)

    We have now two different files BREBootstrap.xml.

    P6 BREBootstrap.xml:

    < database >

    < URL > JDBC:Oracle:thin:@db1:1521:db1 < / URL >

    < user name > pubuser < / name >

    password <>anycriptopass1 < / password >

    oracle.jdbc.OracleDriver < driver > < / driver >

    < PublicGroupId > 1 < / PublicGroupId >

    < / data >

    < CfgVersion > 8.330 < / CfgVersion >

    <>configurations

    < name BRE = 'P6 Config_DB1"instances ="1"logDir ="anydir, P6EPPM, p6, PrimaveraLogs"/ >

    < / configuration >

    p6ws2 BREBootstrap.xml:

    < database >

    < URL > JDBC:Oracle:thin:@DB2:1521:DB2 < / URL >

    < user name > pubuser < / name >

    password <>anycriptopass2 < / password >

    oracle.jdbc.OracleDriver < driver > < / driver >

    < PublicGroupId > 1 < / PublicGroupId >

    < / data >

    < CfgVersion > 8.330 < / CfgVersion >

    <>configurations

    < name BRE = 'P6 Config_DB2"instances ="1"logDir ="anydir, P6EPPM, ws2, PrimaveraLogs"/ >

    < / configuration >

    "P6 Config_DB1" and "P6 Config_DB2" including the property database for the database 1 and 2 respectively.

    How to set up a second web service to return the data to the second database?


    Thanks in advance!


    Kind regards

    Dmitry

    So, answer oracle support:

    Looks like it is in the documentation, Web Services cannot be configured in this way as the other modules. See the following topics:

    BUG 19516437 - Is it POSSIBLE TO hardcode a DEPLOYMENT of SERVICES WEB P6 to an INSTANCE of DATABASE? (ask if this is possible)

    BUG 19579735 - FOR BEING ABLE to hardcode A P6 WEB SERVICES DEPLOYMENT to A DATABASE INSTANCE (corresponding improvement because it can be done).

    The problem has been resolved by the following:

    1 create the WebLogic domain.

    2 P6 and p6ws deployed on managed servers.

    3 configuration P6 uses the second instance of database and P6 has not begun.

    4 result: the p6ws (from additional domain WebLogic) returns data for the second instance of the database.

    Kind regards

    Dmitry

  • disable the node property problem

    Hi all!

    I want to do a VI that the user will not fool around with the button.

    So I put in my case for the "change the value" event, a node property disable during 1 second (disable) and out of it, an enable.

    The problem is that if I press the as button 3 times in 1 second, the button will still change the value 3 times, as he has memory.

    I want to just the user to be able to make changes to the value only after 1 second and not save them. I hope I made myself understood

    Are there any suggestions?

    You may use a state machine with two loops. UI loop place the actionwith a timestamp and the loop of consumer can compare timestamps to decide if enough time has passed, or if the action should be discarded.

  • all the nodes property objects and objects grouped

    Hello

    Now position an on my GUI objects in the center of the screen using nodes property. However, I don't want to have to have a node property for each decoration, image and control. Is it possible that I can group all the objects and then use a property node to position them? I tried to use the property node all objects, but none of the clues seem to apply to my group of objects.

    Help please!

    Thank you very much.

    John

    p.s. I downloaded my vi test. The graph, the decoration and the exit button have been grouped. control over check.vi to set the object to be moved.

    Tabbed pages are a great way to group objects GUI.

    Rather than use a decoration,

    • use a tab control
    • Delete everything except the first tab
    • Hide tab
    • The value of the proprties of the tab control and control on this page is move, hide, display as well as the tab control.

    I hope this helps,

    Ben

  • Boolean switch node property in the Sub - VI

    Hi all

    I have a main vi and one under vi.  In my Subvi, he gets a Boolean value from the main vi through property node (see table).  The Subvi queries the Boolean reference until it gets a real.  Apparently, when the Subvi is running, it is not detect changes in the Boolean main vi.  Why is this?

    If it's a Boolean latch, you will get error 1193 whenever you try to read its Value property.  I noticed that you are not checking the output of the reading the property value error, this is why I guess that's the problem.  Read/write, the Value property of a latch that Boolean is not taken in charge.  You will need to pass the Boolean value to use the mechanical action switch... or you will need to find another way to transmit information between your screws

    For more information on the mechanical action of Boolean values, see this help document.

  • How to return the QML C++ bb::cascades:Control as a property object?

    Hi all

    I need to return the value of the property QML in C++ code, problem is that this value is object of bb::cascades:Control

    Look at the example:

    import bb.cascades 1.2
    
    Page {
     property NavigationPane currentNavigationPane: tab1.navHandle
     property int testprop:0
    }
    

    In C++, I need to retrieve the value of currentNavigationPane property (I suppose it must point to NavigationPane *)

           QVariant const   prop=__current_page->property("currentNavigationPane");
            NavigationPane* nav_p=prop.value();
            if (nav_p!=NULL){
                qDebug()<<"nav_p is not NULL";
            }
            qDebug()<
    

    As a result of this code: nav_p is the null pointer and app crashes without any note of debugging on qDebug()<>

    I found the solution by Exhibitor class c ++ in QML and I can call its methods with pointer to bb::cascades:Control as a parameter

    QML

    Page {
    id:this_page
        onCreationCompleted: {
            mainCPP.UpdatePage(this_page);
        }
    }
    

    C++

    Q_INVOKABLE void UpdatePage(bb::cascades::Page *call_back_page){
    if(call_back_page){
    qDebug()<<"Page is valid";
    }
    }
    

    By this method, I can use control of Cascade in C++

     

  • How gemfire locator can be configured to return the full DNS name for the customer?

    We have an index running before 2 cache servers,

    Locator.DomainA == > Server1.DomainA, Server2.DomainA.

    the problem is when the customer (customer. DomainB) try to access gemfire via locator, it up ' get: not connected to GemFire' exception, the reason is that the Client.DomainB uses the full name "Locator.DomainA" to access the gemfire, the Locator maintains only the servers host name, when the client runs the query, it access Server1 or Server2, but in this case, the networking is not connected.

    How gemfire locator can be configured to return the full DNS name for the customer?

    in gemfire.properties, Locator attribute is full domain name already.

    Thank you

    Yao

    There is a parameter for hostname for the customers that you can put in your cache.xml file cache-server element. It is a string that is passed the server for the location, and then on the Locator for the customer. You must set this client-to-host name in each of your cache servers.

Maybe you are looking for