Update of unique value in the loop voltage output?

Hello

I'm trying to use the DAQmxWriteAnalogScalarF64 function to produce a voltage constant and regular say 3V.  The program will be in a loop, and after each iteration, I would that the output voltage be increased to say 0.1V.

So, a shortened version of my program looks like this

float64 value = 3;

DAQmxCreateTask

DAQmxCreateVoltageChan

DAQmxWriteAnalogScalarF64 (TaskHandle taskHandle, bool32 autoStart, float64, float64 value, timeout, bool32 * reserved);

Loop

{

DAQmxStartTask

DAQmxStopTask

}

Now of course who does not help me update the output voltage after each loop.  So I tried something like this:

Loop

{

DAQmxWriteAnalogScalarF64 (TaskHandle taskHandle, bool32 autoStart, float64, float64 value, timeout, bool32 * reserved);

DAQmxStartTask

DAQmxStopTask

value = value + 0.1;

}

My computer would crash when I try to run the program.   I have to erase and create the task in each iteration too?

I try to avoid using the DAQmxWriteAnalogF64 function, because I need to use a sample clock in time, he and my sample clock is used for the other channel of analog output.

Thanks for any input.

Howard

aNItaB,

I tried to call the DAQmxWriteAnalogScalarF64 in a loop and freeze my computer completely and I have to restart it by pressing the Start button.

Then, I tried to use the DAQmxWriteAnalogF64 in a loop, specifying the output as an array of one element array, and then to update an element at the beginning of each loop.  This seemed to have solved my problem for now without any computer breaks down.

A strange thing happened was when I took your suggestion and took the StartTask and StopTask out of the loop, the computer crash problem appeared again.

in any case, I think that my problem has been resolved, thank you very much for your responses timely and sincere help.

Howard

Tags: NI Software

Similar Questions

  • How to get the updated values of the loops while they are running

    Hello

    I am trouble with a very basic problem, how to access the updated values of the "loop FOR" during operation?  Basically, the VI I is currently working on two sub vis calls each sub VI has a loop for, and the two screws may or may not work for the same number of iterations. My goal is to read the values in each terminal within the loop of two sub VIs, in primary VI. I tried to do this using Global Variables, but in main VI it will display only the last iteration of the two value sub live. Could someone please tell me whrere I go wrong? Is there any other/better way to do this.

    I appreciate any input on this issue.  

    Pass a reference of the main VI control to the Sub screws.  See attached example.

  • a problem in passing multiple values in the loop settings for

    Hi all

    I am facing a problem in passing multiple values in the loop settings for.


    EX:

    CREATE or REPLACE PROCEDURE (pr_id OUT NUMBER) HAVE


    tab type is table of NUMBER;

    TEMP_TAB TAB;

    BEGIN

    Select the COLLECT LOOSE pr temp_tab pr_id;

    I'm in 1.TEMP_TAB. loop of COUNTING

    PR_ID: = temp_tab (i);

    end loop;

    END TEST;

    OUTPUT:-

    pr_id = 234578


    in the example above, I'm only a value as an out parameter. but I send you PR_ID of the loop.
    why I don't get all the values that the parameters.please offer a solution for me.

    Thank you my friend.

    More clarification, let's look at your code...

    -- create a procedure and have a single numeric out variable
    CREATE OR REPLACE PROCEDURE TEST ( pr_id OUT NUMBER ) AS
      -- declare a type as an array of numbers
      type tab is table of NUMBER;
      -- declare a varianble of that array type
      TEMP_TAB TAB;
    BEGIN
      -- query all the values from the table into the array
      select pr_id BULK COLLECT INTO temp_tab from pr;
      -- loop through each value in the array
      for i in 1..TEMP_TAB.COUNT loop
        -- set the value of the single OUT parameter, OVERWRITING any previous value it has
        PR_ID := temp_tab(i);
        -- loop around to the next value
      end loop;
      -- end the procedure with the final value of PR_ID
    END TEST;
    
  • Update the values in the loop after pressing OK without a control

    Hello

    in a loop, a chain of control can be changed until the user clicks the ok button. This method works.

    But the button is also assigned to toggle with the return key.

    But now, the output is not updated any more.

    Is there a solution?

    THX

    Iliale wrote:

    Attached my VI that doesn't work here.

    If I stop the loop with key then return the s text not written

    Set the control to the value of update while typing.

  • Value of the loop 'For' pass before the complete loop - FPGA

    Hello

    8.5 LV, LV FPGA, PCI 7831-R FPGA Board

    I got a cramp of brain on this one.  I have a function (Arb. GIS read) that Im using to generate an arbitrary signal which I created in memory.  I can't move to the value of data however.  I don't know why I can not, its because it is nested in a "loop For" who runs indefinetly and updates only the value whenever it loops back to 'zero '.  Ideas quick and dirty on how to use this value as it is being updated in the loop in my hand vi?

    I've seen messages on the use of local variable 'Files' and property nodes, but I can not just give a sense the.  Maybe because it's FPGA, something is different/no supported?

    * My principal is 'control MicroMirror Arb. SP", look in the #4 case and the condition of"false. "

    The 'Sub - VI' is called 'Arb Sig read RevB', and I'm trying to pass the variable 'Data' to hand while the loop For always runs.

    Thank you!


  • Cannot read every value of the loop iteration for

    Hiiii...

    I developed a front-end which reads the values of serial port and display on the front panel.

    16 channels, which is a string data value. I've separated this string to read the data of each channel, but at the end of the loop for, I can read data only one channel for an iteration, and also I have to store each value iteration in a text file.

    I'm new to labview. Help, please. I have LabVIEW 8.0.

    Attached is my application code.

    This seems quite inefficient. Why don't you use a business structure? Why don't post it your code.

    In regards to the original code, you try to run by using the run continuously? I ask because I do not see a global loop, so it was not clear whether this was intended to present itself as a simple Subvi or "on-demand". If it's supposed to run continuously until you stop, DO NOT USE CONTINUOUSLY RUN it BUTTON. Use a while loop in your VI. Do not forget to place the initialization and close outside of the loop - you don't need to initialize and close the serial port whenever you loop around.

  • Value of the loop variable for begins with the last entry of the previous run

    I have a problem with a loop for... I am a beginner with Labview and perhaps do not follow the order of events (since it runs not on a line-by-line as typical of programming languages), but I think that my problem is trivial.

    Say I'm running a loop for 16 iterations and I want to build a table which, for example, consists of four 0s, 1 4s, four 2s and 3 four s.   I initialize the array outside and using shift registers to be added to the matrix in the loop for.

    However, the first time I run the program I get funky results.  In subsequent runs, the first value in my table is a 3, and the rest of the rest of the table is moved down by 1, so I did that three 3s at the end (for example).

    Can someone help me understand how to solve this problem?

    Thank you

    George


  • Updated external Unique ID in the Contact item

    I have the need to update the Unique ID of the current outside in the element of Contact to other unique 'ID '. Because the ExternalSystemId is part of the key of the user, if I try to update using WS, I get an error that the "new" external id has no recoprd of mathcing in the business component. I'm passing ContactId and ExternalSystemID to the ContactUpdate.

    No idea how to upgrade the ExternalSystemID? In some cases, I have multiple contacts with the same name that need to get updates to the different external system ID.

    Thank you.

    Why don't you build a workflow that will update the Id of the external system, based on the State.
    Can you please provide a unique case.

  • County to assimilate all of the instance of unique value in the drop-down table?

    I'm just a beginner. I know how the code in order to get an automatic count of lines but I try to go a little further.

    I would like to be able to get a number that matches the number of times that a value has been chosen from a drop-down list.

    I have attached a few illustrations to explain what I'm trying to achieve:

    Pic 10.PNG

    In the end, I would like to end up with something like that.

    pic11.PNG

    Any help would be appreciated.

    Hello

    To do something like this, you must use the calculate of the County field event.

    What you want to do is to count how many times the name in the drop-down list is selected up to that line.

    If you use this for loop by using JavaScript and change the names for your form should look like this:

    The parent of the field line

    myRow = this.parent.parent var; Use this line if the field is in the subform

    myRow var = this.parent;

    Number of divers

    var intDiverCount = 0;

    for (var i = 0; i)<= myrow.index;="">

    Store lines in a variable

    preRow var = this.resolveNode ("Row1 [" + I.ToString + "]");

    If the name of the diver is the same selected add 1 to the count of the diver

    If (preRow.ddlDiver.getDisplayItem (preRow.ddlDiver.selectedIndex) is {myRow.ddlDiver.getDisplayItem (myRow.ddlDiver.selectedIndex))}

    intDiverCount ++;

    }

    }

    Number of divers display

    intDiverCount;

    And in FormCalc:

    The parent of the field line

    myRow = this.parent.parent var; Use this line if the field is in the subform

    myRow var = this.parent;

    Number of divers

    var intDiverCount = 0

    for i = 0 upto myRow.index step 1 do

    Store lines in a variable

    preRow var = $.resolveNode (Concat ("Row1 [", i, "]"] ""))

    If the name of the diver is the same selected add 1 to the count of the diver

    If (preRow.ddlDiver.getDisplayItem (preRow.ddlDiver.selectedIndex) eq myRow.ddlDiver.getDisplayItem (myRow.ddlDiver.selectedIndex)) then

    intDiverCount = intDiverCount + 1

    endif

    ENDFOR

    Number of divers display

    intDiverCount

    I hope this helps!

  • Update of several values in the column

    Is not a matter of complicated and likely, I use a wrong syntax, but I'm trying to update the values in different columns in the same query

    I'm doing this
    update cm_item_master i
    set i.dept = 'VIVERES',
    set i.class = 'PASTAS',
    set i.subclass 'ESPECIALIDADES'
    where i.ITEM = '1.1005292'
    update cm_item_master i
    set i.dept = 'VIVERES',
     i.class = 'PASTAS',
     i.subclass 'ESPECIALIDADES'
    where i.ITEM = '1.1005292'
    
  • Caught in the trap in the loop of Windows Update

    Automatic installation of updates causes computer find themselves trapped in loop waving the circle and the Configuration of the State: 3/3 (the percentage complete locks to 0).  After a period of time (1-2 minutes), the computer restarts and immediately displays the same update status screen.  He continues again and again this cycle.

    I can restore the computer to an earlier date, successfully, but if I let Windows Update automatically download a new update, I'm trapped in the loop do even once.

    Try this: change your update settings and find the problem.

    Remove the Vista updates; two ways to do this:

    Click Start > right click on computer > properties > Windows updates down the lower left corner > updates installed in the lower left corner in the next window

    > then click the one that you don't want > uninstall will appear at the top > uninstall it.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    In addition, on the page where you clicked "Installed updates", click on change settings at the top left corner it

    > Change update settings in the next page of AutoUpdate to "check for updates but let me choose etc" > OK ".

    When you take a look at pending updates, you can either download/install them one at the time, namely the update causing you problems.

    > or if you do not need an individual > right-click on > UAC prompt > hide it

    See you soon.

    Mick Murphy - Microsoft partner

  • uniqueness of the value of the attribute on the multiple database

    Hello

    I ODSEE 11.1.1.7.2 on SLES platform version. My question is, I have two suffixes on another database on the same instance

    suffix: or = Org1, o = domain.com-> userRoot_Org1 (name of the comic)

    suffix: or = Org2, o = domain.com-> userRoot_Org2 (db name)

    I want to have a unique value for the attribute 'o' between these two suffixes. I created the following plugin but does not work... someone can help me?

    DN: cn = clientID uniqueness, cn = plugins, cn = config

    objectClass: top

    objectClass: nsSlapdPlugin

    objectClass: ds-signedPlugin

    objectClass: extensibleObject

    CN: unique clientID

    nsslapd-pluginPath: /opt/dsee7/lib/uid-plugin.so

    nsslapd-pluginInitfunc: NSUniqueAttr_Init

    nsslapd-pluginType: preoperative

    nsslapd-pluginarg0: o

    nsslapd-plugin-depends-on-type: database

    nsslapd-pluginarg1: suffix = "or = Org1, o = domain.com" \ ", = domain.com" ", = Org2, o = Org2, o is domain.com", "o = domain.com'

    nsslapd-pluginEnabled: on

    entryDN: cn = clientid uniqueness, cn = plugins, cn = config

    nsslapd-pluginId: NSUniqueAttr

    nsslapd-pluginVersion: 11.1.1.7.2

    nsslapd-pluginVendor: Oracle Corporation

    nsslapd-pluginDescription: enforce unique attribute values

    also tried the below...

    nsslapd-pluginarg1: or = Org1, o = domain.com

    nsslapd-pluginarg2: or = Org2, o = domain.com

    Hello

    Have you created this configuration manually in the directory configuration file?
    To avoid unnecessary attempts to specify plugin args, I would recommend using dsconf to configure the plugin as described in the https://docs.oracle.com/cd/E20295_01/html/821-1220/bcayb.html#scrolltoc

    Sylvain

    Please mark this answer as correct or helpful, when it is appropriate to make it easier for others to find

  • How to concatenate values based on multiple columns of data duplicate in the loop

    Hi all

    Select '100' col_1, '111111' col2 of double

    Union of all the

    Select '100' col_1, '222222' col2 of double

    Union of all the

    Select '101' col_1, '333333' col2 of double

    Union of all the

    Select '102' col_1, '333333' col2 of double

    I need to write by using cursor loop (configurable) so, it must concatenate col_1 or col_2

    If,

    In the table

    col_1, col_2

    100 111111

    100 222222

    101 333333

    102 333333

    Then

    col_1, col_2

    100 111111,222222

    333333 101 102

    Is it possible to compare and concatenate values in the loop

    I have more than 4,000 bytes in the table of col_1,col_2 data values

    Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0 - 64 bit Production

    Ok then:

    create a type that makes "grouped" clob

    CREATE or REPLACE TYPE clob_obj IS OBJECT
    (
    CLOB theClob
    ORDER MEMBER FUNCTION equals (in_clob_obj IN clob_obj) RETURN NUMBER
    member function getClobVal return clob)
    /

    CREATE or REPLACE TYPE clob_obj BODY
    IS
    FUNCTION MEMBER ORDER is equal to (in_clob_obj IN clob_obj)
    RETURN NUMBER
    IS
    BEGIN
    RETURN sys.dbms_lob.compare (SELF.theClob, in_clob_obj.theClob);
    END;
         
    Member return clob getClobVal function
    is
    BEGIN
    Return self.theClob;
    end;
    END;
    /

    WITH conc_table AS (SELECT 1111 cust_id, cust_no 'ABC', '101010' ordr_no OF DOUBLE UNION ALL

    SELECT 2222 cust_id, cust_no 'ABC', '101010' ordr_no OF DOUBLE UNION ALL

    SELECT 3333 cust_id, cust_no 'ABC', '101010' ordr_no OF DOUBLE UNION ALL

    SELECT cust_id 4444, "CCC" cust_no, ordr_no ' 123456' OF DOUBLE UNION ALL

    SELECT cust_id 5555, "CCC" cust_no, '454545' ordr_no OF DOUBLE UNION ALL

    Select cust_id 66666, "CCC" cust_no, ordr_no ' 77777' DOUBLE UNION ALL

    SELECT cust_id, "CCC" cust_no, ordr_no ' 77777 66666' FROM DUAL)

    SELECT rtrim (XMLAGG (XMLELEMENT (E, cust_id_no, ',')). EXTRACT ('customer_id //text()').getClobVal (),',')

    clob_obj (ord_number) .getClobVal)

    cust_num

    FROM (SELECT cust_id_no

    cust_num

    rtrim (XMLAGG (XMLELEMENT (E, ord_num, ",")). EXTRACT ('//text ()') .getClobVal (), ',') ord_number

    FROM (SELECT DISTINCT cust_id_no, cust_num, ordr_no AS conc_table FROM ord_num cust_no cust_id)

    GROUP BY cust_id_no

    cust_num)

    GROUP BY clob_obj (ord_number)

    cust_num;

    I got the distinct in the select more intimate for no duplicate of the basetable is only sent to reunification of...

    HTH

  • Looping through the names of columns that are based on a value of the variable

    I have an ArrayCollection collection with a series of columns named price1, price2... through price10

    I try through these columns based on a value of the loop variable, but may not understand the syntax:

    for (var column: int = 1; column < 11; column ++) {}
    testPrice = myGrid.selectedItem.price (column); <-this does not work
    }

    Try testPrice = myGrid.selectedItem ["price" + column];

    Don't forget to test this selectedItem is not null before you try to set the values.

    TS

  • A generated within a loop in a subvi output data can be transferred to the main program for each iteration of the loop?

    Hi LV users,.

    I have a very basic question, I have not succeeded to asnwer using basic considerations.

    I made a sub - vi that performs a scan of current-voltage using a unit of measurement-source Keithley and a loop FOR.

    The subvi outputs 2 tables with my data (essentially an array of voltage and the corresponding current table). I also defined a Terminal at the exit of a group of these 2 tables in order to plot a graph XY - output. Specifically, I indexed this cluster to update after each iteration of the loop FOR, in my sub - vi (the indicator is placed outside the loop, of course).

    My problem is that I want my main program to display the XY-graph in real time, with an update after each iteration of the loop FOR which is in my sub - vi.

    I have a problem because my sub - vi output terminals are available for the main program concluded as soon as the sub - vi has completed its own execution (which is what we expect of sub - vi to do).

    How can I use a sub - vi (because it's handy) and get in the main program in the course of its performance data that are generated from the loops of sub - vi?

    Thanks in advance for your help,

    Yoyo87

    Elements of the queue in the Subvi them put your main VI where you want to display the data and the.

    It is similar to the architecture of producer/consumer. There are examples of it in LabVIEW. The examples work with 2 parallel loops, in your case a loop (the producer) will be in the Subvi.

Maybe you are looking for