dynamic generation of datagrid

my configuration:
I have 3 files. the first is the leader (mxml) main of the application that displays a datagrid control. the 2nd is a file that builds the datagrid (generator model). and the 3rd is a datamanager who retrieves my data via webservice that eventually fills the datagrid control.

my situation:
Im trying to dynamically generate a datagrid control that depends on data I collect through a Web service. Unfortunately, the result event handler runs asynchronously, and data are not yet available when my script tries to produce the datagrid.

thoughts:
I was wondering if there was a way to sync this process, so I generate the data grid after the webservice called the result event, or if there is no other possible solutions for this problem.


in case any who wondered for a solution to this, I took advantage of the event driven framework that Flex simply provides extended eventdispatcher within my datamanager class and called an event back to my main application to let him know when it's ready to generate the data grid. I don't know if there is no more graceful alternative, but for now, it works! optimization can come after version 1.0 =)

Tags: Flex

Similar Questions

  • dynamic generation to the top of an array of objects to fill a datagrid

    I'm having a hard time to figure out how to push an object in a table to populate a datagrid control.
    I don't know if I'm not recover the right values or send them.

    I want to push the full string as the label and now: 'Data_Grid.selectedItem' retrieve the value of name with "Data_Grid.selectedItem.G_val" by dynamically building 'type': 'value '.




    Thanks :)

  • Adding dynamic columns to datagrid at the beginning of the datagrid

    Hello friends,

    There is a datagrid that is static. and I m adding a dynamic column. It is added at the end of the static data grid

    but I want to add dynamic at the begning of the datagrid column can someone help me on this.

    Thanking you,

    Kind regards

    Gallot

    datagridfeeamount.dataProvider = new ArrayCollection (event.result.rows.row) collection;

    the word 'new', after that the = was supposed to be red and larger

  • Dynamic dataProvider in Datagrid combobox.

    Hello

    I'm using Flex 3. I have a DataGrid with the first two lines, with an element converters like ComboBoxes. I want to set up is that, according to my selected in the combobox of first, second respective combobox must get a dataprovider of my choice.

    For example

    If I select the 1 combobox as the India, then the adjacent combobox should have cities in India.

    If I select the 1 combobox as the France, the adjacent combobox should have cities in France.

    I don't have the values in local variables. Values should be captured during execution, because the list of countries (in the first combobox) is very comprehensive in order to fetch the list of all the cities for all countries wouldn't be fair. So for each selection of country, I have to call an http service to retrieve the list of corresponding cities.

    My question is how can I dynamically give cities such as dataprovider to each of the combo boxes to each line.

    Hope that my description is quite understandable.

    Thank you

    SID.

    Hello

    You can check the code below. If this is what you need.


    http://www.Adobe.com/2006/mxml '.
    Layout = "vertical".
    creationComplete = "application1_initializeHandler (event)" > "
        
             Import mx.collections.ArrayCollection;
    Import mx.events.FlexEvent;
               
               
    Sets your collections
    [Bindable]
    public var countriesData:ArrayCollection = new collection ArrayCollection ([{label: "India"}, {label: 'Brazil'}]);
    [Bindable]
    public var citiesData:ArrayCollection;
    [Bindable]
    public var collection: collection ArrayCollection = new ArrayCollection();

    protected function application1_initializeHandler(event:FlexEvent):void
    {
    dataGrid.addEventListener ("countryChanged", country_changed_handler);
                    
    collection.addItem({cityData:citiesData});)
    }

    Override this method the remote calls.
    In the resultEvent, you will modify the citiesData collection.
    protected function country_changed_handler(event:DataEvent):void
    {
    If (event.data is "India")
    {
    dataGrid.selectedItem.cityData = new collection ArrayCollection ([{label: "Bombay"}, {label: "Delhi"}]);
    }
    on the other
    {
    dataGrid.selectedItem.cityData = new collection ArrayCollection ([{label: "São Paulo"}, {label: "Rio de Janeiro'"}]);
    }
    dataGrid.invalidateList ();
    }
               
    public void addRow(event:MouseEvent):void {}
    collection.addItem (new Object());
    collection.addItem({cityData:citiesData});)
    }
    public void dropRow(event:MouseEvent):void {}
                   
    }
    ]]>
        


    dataProvider = "{collection}" >
            
                
                    
                        
                            
    labelField = "label".

    change = "combobox1_changeHandler (Event)" "
    selectedIndex = "-1" >
                                
                                     Import mx.collections.ArrayCollection;
    Import mx.events.ListEvent;

    protected function combobox1_changeHandler(event:ListEvent):void
    {
    dispatchEvent (new DataEvent ("countryChanged", true, true, this.selectedLabel));
    }
    ]]>
                                
                            
                        
                    
                
                
                    
                        
                            

                                
                                     override public function set data(value:Object):void
    {
    Super.Data = value;
    var prevSelectedItem:Object = this.selectedItem;
    this.dataProvider = data.cityData;
    this.selectedItem = prevSelectedItem;
    }
    ]]>
                                

                            
                        
                    
                
            
        
        
            
            
        

  • niHSDIO dynamic generation and Acquisition using LV configure Trigger VI

    Hello!

    My experience is limited within the environment of digital programming; Nevertheless, I have worked on this problem for a few days and would appreciate some comments if possible.

    I am trying simply to generate and acquire a duty cycle of 50% of 8 MHz TTL pulse train on a PIN DIO of the PCI-6541 and acquire back from the signal on another axis of DIO. I have a connector corresponding to the embedded 6541 VHDCI connector which of course the generation and acquisition DIO welded pins to provide a loopback effect.

    In short, I use the niHSDIO configure Trigger VI (instance--> start Trig: SW), niHSDIO send software Edge Trigger VI and write Named Waveform VI (instance--> data: 1 D U32) in the generation section. For the section of the acquisition, in short, I use the VI of waveform Fetch niHSDIO (instance--> single record: WDT).

    I see results in the waveform acquired showing the generated and acquired digital TTL pulse on the respective DIO pins train, but I can't seem to get my 8 MHz frequency requirement. In addition, the lower part of the assignment of pin DIO, more frequency. Unfortunately, due to the configuration system required, I have confined myself to pin 12 DIO for the generation of digital pulses. Even with a 50 MHz clock frequency, I'm ~ 6 kHz of frequency acquired max. I looked at changing the parameters of the wave form VI named write, but it is not possible because the VI call a library function node. I also tried to generate a waveform of 8 MHz through a VI of generator of digital model, but I do not believe, you can trigger on generated waveforms? It seems that you must generate data using a simple loop to as a counter and sending the result to the waveform VI named write. Are there other ways I can simply generate and acquire a digital signal of TTL of 8 MHz (no external connection)?

    In any case, any kind of feedback would be greatly appreciated.

    Thanks in advance for your time.

    Dan

    Dan,

    Sorry about the nomenclature.  I usually use 0 x or 0 b for indication of radix, it is not necessarily a kind of standard, just what I used in my old days of the Assembly.

    Looks like you have a knowledge about the data.  Basically the material is just save in DRAM an array of words of 32 bits, with each bit corresponds to a data channel and each element being generated to the sampling clock rate you enter to your vi.  Everything else is just easy data manipulation or usage.  The interleaving method is just as I like to create a toggle model.  You can easily do a loop with an inverter and feedback node or use on the construction in screws to signal generation.  In addition, you can use the software digital waveform editor or control panel test to generate the county or toggle modes.

    Give us an update when you enter the laboratory and let us know if you encounter any other disorder.

  • Dynamic generation of query - ' sign

    Hello

    I'm trying to build a dynamic query to obtain the product report and the employee who assigned. I write code below:

    CREATE OR place the SALE_EmpORT PROCEDURE

    IS

    T_Products. ARRAY TYPE IS VARCHAR2 (100);

    v_ProductList t_Products: = t_Products();

    T_Emps. ARRAY TYPE IS VARCHAR2 (100);

    v_EmpIDs t_Emps: = t_Emps();

    LONG V_SQL;

    -VARCHAR2 (9000);

    BEGIN

    SELECT DISTINCT product BULK COLLECT INTO v_ProductList

    OF Emp_Products;

    SELECT DISTINCT Emp_Id BULK COLLECT INTO v_EmpIDs

    OF Emp_Products;

    I'm IN 1.v_ProductList.COUNT LOOP

    IF i = 1 THEN

    V_SQL: = 'SELECT'. v_ProductList (i) | «, » ;

    ON THE OTHER

    V_SQL: = V_SQL | 'UNION SELECT' | v_ProductList (i) | «, » ;

    END IF;

    FOR j IN 1.v_EmpIDs.COUNT LOOP

    IF j < v_EmpIDs.COUNT THEN

    V_SQL: = V_SQL | "DECODE (product, ' | v_ProductList (i) |', DECODE (Emp_Id, ' | v_EmpIDs (j) |)) ((', NULL), NULL) AS ' | v_EmpIDs (j) | «, » ;

    ELSIF j = v_EmpIDs.COUNT THEN

    V_SQL: = V_SQL | "DECODE (product, ' | v_ProductList (i) |', DECODE (Emp_Id, ' | v_EmpIDs (j) |)) ((', NULL), NULL) AS ' | v_EmpIDs (j);

    END IF;

    END LOOP;

    V_SQL: = V_SQL | ' FROM Emp_Products';

    END LOOP;

    INSERT INTO T_LOG_SQLTEXT VALUES (V_SQL);

    COMMIT;

    END SALE_EmpORT;

    /

    In this code, I am unable to handle situation if product contains a single quote, for example

    DOWN

    CHILD HEALTH

    THE WOMEN'S HEALTH

    How to handle this situation in order to run this dynamic query.

    Kind regards

    Karki

    You need to replace a single quote with two single quotes:

    CREATE OR REPLACE PROCEDURE Sale_Report

    IS

    TYPE T_Products IS TABLE OF VARCHAR2 (100);

    V_Productlist T_Products: = T_Products ();

    TYPE T_Emps IS TABLE OF VARCHAR2 (100);

    V_Empids T_Emps: = T_Emps ();

    V_Sql CLOB;

    FUNCTION Qte_Product (NUMBER Ix)

    RETURN VARCHAR2

    IS

    BEGIN

    RETURN to REPLACE (V_Productlist (Ix), "',"');

    END;

    BEGIN

    SELECT DISTINCT products

    BULK COLLECT INTO V_Productlist

    OF Emp_Products;

    SELECT DISTINCT Emp_Id

    BULK COLLECT INTO V_Empids

    OF Emp_Products;

    FOR I IN 1... V_Productlist.count

    LOOP

    IF I = 1

    THEN

    V_Sql: = 'SELECT ' | Qte_Product (I) | ', ';

    ON THE OTHER

    V_Sql: = V_Sql | 'UNION SELECT | Qte_Product (I) | ', ';

    END IF;

    FOR J FROM 1... V_Empids.count

    LOOP

    IF J<>

    THEN

    V_Sql: = V_Sql

    || «DECODE (product, ' |)» Qte_Product (I)

    || ', DECODE (Emp_Id, ' |) V_Empids (J)

    || (Target, NULL), NULL) AS ' | V_Empids (J)

    || ',';

    ELSIF J = V_Empids.COUNT

    THEN

    V_Sql: = V_Sql

    || «DECODE (product, ' |)» Qte_Product (I)

    || ', DECODE (Emp_Id, ' |) V_Empids (J)

    || (Target, NULL), NULL) AS ' | V_Empids (J);

    END IF;

    END LOOP;

    V_Sql: = V_Sql | "OF Emp_Products."

    END LOOP;

    INSERT INTO T_Log_Sqltext

    VALUES (V_Sql);

    COMMIT;

    END Sale_Report;

    /

  • Using the name of dynamic column in datagrid selectedItems

    Hello

    I have a datagrid that is loaded with 2 columns. AllowMultiSelect is enabled.

    Based on the values selected at runtime, I get the correspondent selected the name of the column and its values and displays it on the screen of the HTML.

    GRP is datagrid

    dgrcl is a data grid column

    selflds is a table that has values 0,1,2,3

    selflds [0] = name, selflds [1] = age

    for (var l:int = 0; < grp.columnCount; l ++)

    {

    dgrcl = grp.columns [l];

    selflds [l] = dgrcl.dataField;

    }

    srhVals will have a single value selected in one point any

    get the corresponding name of the selected column and its value

    var srhVals:String;

    srhVals = String(grp.selectedItem[selflds[1]]);

    I'm trying to make the selection above instead in .selectedItems something like below. By doing that, I'll get all selected items, but not a single. If I try under syntax, I get error. Anyone have any ideas on how to make.

    srhVals = String(grp.selectedItems.selflds[1]);

    Hello

    I got my mistake, there should be no point after selectedItems operator;

    I found a solution - it goes like this:

    for (var g:int = 0; g<>

    {

    srhVals = srhVals + String(grp.selectedItems[g][selflds[1]]);

    }

    If the whole scenario is like this:

    DataGrid:

    Name age

    a               20

    b               30

    c               40

    d               50

    I select b, d in the user interface. At runtime, I get the selecteditem as 'Name' column name programmatically, loops through the selecteditems and store the value in srhVals b, d.

    b, d will finally be shown in the user interface.

  • Dynamic generation of DDX ES2

    Hi all

    I want to create a portfolio PDF package of files not PDF where number of attachments can vary, but with a static PDF cover page.

    does anyone have a sample ES2, which allows you to dynamically create the DDX?

    Concerning

    KeV

    KeV,

    The joint .lca ES2 is assembled of dynamic document using a custom script. You can drop any number of PDF files flattened in the control file to assemble a PDF file.

    The process is described below.

    Notes:

    (1) process includes logic to calculate assembler duration of treatment, which may or may not be useful.

    (2) as you probably know PDF files must be flattened for Assembly. The process does not flatten a PDF file.

    The custom script is represented below. It iterates over the keys of the map list to build the DDX.

    Steve

  • Dynamic generation of table

    Hello world!

    I use the free trial version Adobe LiveCycle Designer ES.

    I have a data set and two pdf. The first is a pdf file that I got on the web, which was created with the full version of Adobe LiveCycle Designer ES.

    The second is that I created with the trial version.

    I am trying to display several data like this:

    < history >
    < date > 08/05/2009 < / date >
    doc, doc > < / doc >
    desc < desc > < / desc >
    < / history >

    < history >
    < date > 09/05/2009 < / date >
    doc, doc > < / doc >
    desc < desc > < / desc >
    < / history >

    ...


    With the first pdf, it works fine. All data are displayed.

    But only the data appear with mine.

    I checked all the options (such as the link) and there are all the same on the two pdf.

    Then there is a limitation of the trial version with the case of duplicated data?

    Thank you

    No, there is no limitation in the trial version, but the one you have on the web is probably saved in dynamic PDF and yours is probably saved that way.

    Paul

  • dynamic generation of tabs or accordion

    I need to display information as follows:
    Dept has
    Group 1
    Position 1-1
    Position 1-22
    Group 2
    Position 2-1
    B Dept
    Group 1
    etc.
    Currently do using < cfoutput query = "myQuery" group = "Dept" > and so on to create div tags that I then show and hide with DHTML/Javascript
    The number of departments change as do groups and positions, so the divs must be generated dynamically based on a query.
    Can be done the same thing in Flex 2 with accordians or tabs?
    Last question is my webhost does not have Data Services installed so I wiould have pr - compile SWF files. If this were doable in Flex 2 SWF of pre-compled would always implement the dynamic creation of the tabs/accordians?

    Hello

    Tab controls and the accordion can have their navigation dynamically modified. Both use the children containers (for example a cloth) - when you first receive your data from departments, the removeAllChildren() method clears the existing tabs/accordion tabs, then you need to create and addChildren() to rebuild the interface.

    See you soon,.

    Simon.

  • Dynamically creating DataGrid imported .txt file

    I have a tab delimited .txt file exported from Excel which looks like this:

    Sector Section the family Brand Image Description price quantity Code

    Sector 1 Section 1 Description of the Fiat 10000 1 10000 10000 8 25.00 family

    Sector 1 Section 1 1 10001 Kawasaky 10001 Description 10001 10 45.00 family

    Sector 1 Section 1 10002 1 Ford 10002 Description 10002 15 10,00 family

    Sector 1 Section 1 2 10003 Fiat 10003 Description 10003 100 8.00 family

    In this case, I have nine columns, but the method should work with any number of columns.

    The code is developed in Flash Builder, but it's especially AS3.

    I dynamically create a DataGrid from these values. It's my first attempt:

    <? XML version = "1.0" encoding = "utf-8"? >

    " < = xmlns:fx s:Application ' http://ns.Adobe.com/MXML/2009 "

    xmlns:s = "library://ns.adobe.com/flex/spark".

    xmlns:MX = "library://ns.adobe.com/flex/mx".

    creationComplete = "creationCompleteHandler (event)" >

    < fx:Script >

    <! [CDATA]

    import flash.net.URLLoader;

    import flash.net.URLRequest;

    Import mx.collections.ArrayCollection;

    Import mx.controls.DataGrid;

    Import mx.controls.dataGridClasses.DataGridColumn;

    Import mx.events.FlexEvent;

    private var loader: URLLoader = new URLLoader();

    private var request: URLRequest = new URLRequest("txtData/products.txt");

    protected function creationCompleteHandler(event:FlexEvent):void {}

    loader.addEventListener (Event.COMPLETE, loader_complete);

    Loader.Load (request);

    }

    protected function loader_complete(evt:Event):void {}

    Create array of lines in .txt file loaded

    var lines: Array = evt.target.data.split(/\n/);

    var dg:DataGrid = new DataGrid();

    var columns: Array = [];

    var dataProvider:ArrayCollection = new ArrayCollection();

    for (var i: Number = 0; i < lines.length; i ++) {}

    String: var line = lines [i];

    Create array of column values of each row

    var lineArray:Array = line.split(/\t/);

    for (var j: Number = 0; j < lineArray.length; j ++) {}

    var prop: String = lineArray [j];

    {if(i==0)}

    If the first row of the table, create column and assign the value of prop to dataField

    var c:DataGridColumn = new DataGridColumn (prop);

    c.dataField = prop;

    Columns.push (c);

    }

    else {}

    create the new object and add it to the dataProvider

    var dataObject:Object = {area: lineArray [0], Section: lineArray [1], family: lineArray [2], Code: lineArray [3], mark: lineArray [4], Image: lineArray [5], Description: lineArray [6], quantity: lineArray [7], price: lineArray [8]};

    dataProvider.addItem (dataObject);

    }

    }

    }

    assign columns to the dataGrid control

    CGI Columns = columns;

    assign the dataProvider of the dataGrid

    dg.dataProvider = dataProvider;

    Add the DataGrid on stage

    this.addElement (dg);

    }

    []] >

    < / fx:Script >

    < / s:Application >

    I was able to create columns and dataFields dynamically, instead, I wasn't able to do it for the data provider items (see below):

    var dataObject:Object = {area: lineArray [0], Section: lineArray [1], family: lineArray [2], Code: lineArray [3], mark: lineArray [4], Image: lineArray [5], Description: lineArray [6], quantity: lineArray [7], price: lineArray [8]};

    How can I create these values dynamically (without knowing the names number and column data area)?

    Thanks in advance

    use:

    If (i == 0) {}

    for (var j: int = 0; j

    var prop: String = lineArray [j];

    var c:DataGridColumn = new DataGridColumn (prop);

    c.dataField = prop;

    Columns.push (c);

    }

    } else {}

    var dataObject:Object = {};

    for (j = 0; j<>

    dataObject [columns [j] .dataField] = lineArray [j];

    }

    dataProvider.addItem (dataObject);

    }

  • Add a dynamically created checkbox in DataGrid

    Rquirement: Add a dynamically created checkbox in the first column of a dynamically created a DataGrid .
    Note: The dataprovider of the DataGrid is a collectible arraycollection, which is populated by tables in the database. Therefore, whenever the DataGrid columns can varry depents on the table.

    The code below would work for you. Please give it a try.

    Import mx.controls.dataGridClasses.DataGridColumn;
    Import mx.collections.ArrayCollection;
               
    Import mx.controls.DataGrid;
    Import mx.controls.CheckBox;
               
    [Bindable]
    private var dtGrid:DataGrid;
    [Bindable]
    private var chkBox:CheckBox;
               
    [Bindable]
    private var peeps: ArrayCollection collection;
               
                
               
    private function init (): void
    {
    friends = new ArrayCollection();
    peeps.addItem ({firstName: "Beautiful", lastName: "Dude", age: 24 gender: "male"});
    peeps.addItem ({firstName: "Red", lastName: "Dude", age: 25 gender: "male"});
    peeps.addItem ({firstName: "Top", lastName: "Guy" of the age: 25 gender: "male"});
    peeps.addItem ({firstName: "Cute", lastName: "Girl", age: 24, sex: "female"});
    peeps.addItem ({firstName: lastName "to"hot,":"Chick", age: 24, sex:"female"});
    peeps.addItem ({firstName: lastName "Lazy",: "The man", age: 25 gender: "male"});
                      
    var dataGridColumn:DataGridColumn = new DataGridColumn("");
    dataGridColumn.itemRenderer = new ClassFactory (CheckBox);
              
    dtGrid = new DataGrid();
    dtGrid.dataProvider = friends;
    this.addElement (dtGrid);
                      
    var tempColArray:Array = new Array();
    tempColArray [0] = dataGridColumn;
    for (var i: int = 0; dtGrid.columns.length > i; ++ i)
    {
    tempColArray [i + 1] = dtGrid.columns [i];
    }
                      
    dtGrid.columns = tempColArray;
    dtGrid.invalidateDisplayList ();
    }
    ]]>

  • Dynamically call a demon or an actor VI in TestStand

    Hi all

    The context:

    • I have a non-reentrant VI that must run in parallel to a sequence
    • This VI is opened and closed several times during the tests.
    • I close the VI sending him a pending request as it closes.

    It seems to me that there are two ways to start the VI:

    • Have TestStand call a LabVIEW VI that launches the dynamic VI. This could be the static node in the CGRA or an invoke node using a ref VI.
    • Use the asynchronous step "Run VI" in TestStand type.

    Right now I use the step "Run VI" asynchronous. I do not use the option "Reserve loaded live for execution", and once from time to time I get the crash 'TestStand sequence editor has stopped working ".

    My questions:

    1. With regard to memory management, which is the best way to put in place my use case? Is it better to have LabVIEW make the dynamic call or TestStand call dynamic?
    2. What is the difference in between both of these memory management works?

    Thanks a lot - suggestions are appreciated.

    Mr. Jim

    Let us know how it goes with the movement of the sous-suite.

    Basically the call run VI Asynch just dynamically create a sous-suite and qualifying in a new thread.  You can view it in the definition of step Type in one of the PreSteps.  But using the subsequence you eliminate the part of the dynamic generation of it (I've seen topics with, similar to what you describe).

    Good luck

  • OR PCI-6542: Creation of dynamic waveforms using the HSDIO library

    Hello!

    I have problems to understand how to create waveforms using the HSDIO library to run on a card PCI-6542. I need to create a program that activates a channel for 12.5 microseconds, waiting for a while (i.e. 100 samples) and activates another channel to 12.5 microseconds.

    This program must be used in a Multielement ultrasound system.

    Here the example of dynamic generation program that transforms the channels 0-2 on 1024 samples.

    /************************************************************************
    *
    * Example program:
    * DynamicGeneration.c
    *
    * Description:
    * Generates a simple model on the specified channel.
    *
    * Pin connection information:
    * None.
    *
    ************************************************************************/

    / * Includes * /.


    #include "niHSDIO.h".

    / * Sets * /.
    #define WAVEFORM_SIZE 1024

    int main (void)
    {
    ViRsrc deviceID = 'Dev1 ';
    ViConstString channelList = "0-2";
    ViReal64 sampleClockRate = 50.0e6;
    DataWidth ViInt32 = 4;

    ViUInt32 waveformDataU32 [WAVEFORM_SIZE];
    ViConstString waveformName = "myWfm";
    ViInt32 timeout = 10000; / * milliseconds * /.

    ViSession vi = VI_NULL;
    Error ViStatus = VI_SUCCESS;
    Bruno errDesc [1024];
    ViInt32 i;

    / * Initialize generation session * /.
    checkErr (niHSDIO_InitGenerationSession)
    Deviceid, VI_FALSE, VI_FALSE, VI_NULL, &vi));

    / * Assign channels for dynamic generation * /.
    checkErr (niHSDIO_AssignDynamicChannels (vi, channelList));

    / * Set up the clock sample parameters * /.
    checkErr (niHSDIO_ConfigureSampleClock)
    VI, NIHSDIO_VAL_ON_BOARD_CLOCK_STR, sampleClockRate));

    / * Query the data Width attribute * /.
    checkErr (niHSDIO_GetAttributeViInt32)
    VI, VI_NULL, NIHSDIO_ATTR_DATA_WIDTH, & dataWidth));

    / * Fill the waveform with ramp data * /.
    < waveform_size;="">
    {
    waveformDataU32 [i] = i;
    }

    checkErr (niHSDIO_WriteNamedWaveformU32)
    VI, waveformName, WAVEFORM_SIZE, waveformDataU32));

    / * Start the generation * /.
    checkErr (niHSDIO_Initiate (vi));

    / * Wait for all the generation * /.
    checkErr (niHSDIO_WaitUntilDone (vi, timeout));

    Error:

    If (error is VI_SUCCESS)
    {
    / * Print result * /.
    printf ("made without error. \n") ;
    }
    on the other
    {
    / * Get the description of the error and print * /.
    niHSDIO_GetError (vi, & error, sizeof (errDesc) /sizeof (petitioner), errDesc);

    printf ("\nError encountered\n===\n%s\n", errDesc);
    }

    / * log * /.
    niHSDIO_close (vi);

    / * prompt to go out (for the popup console windows) * /.
    to continue...\n");
    GetChar ();

    error return;
    }

    Issues related to the:

    How can I change the values in waveformDataU32 to create market reports (instead of just always on)?

    How to select the channel waveformDataU32 is applied to the?

    Thank you!

    Zachary Geier

    The waveformDataU32 table is an array of 32-bit integers. Each bit corresponds to a line on the device.  On the first clock cycle, this program outputs:

    0000 0000 0000 0000 0000 0000 0000 0000

    Then it displays the following, changing at each clock Pulse:

    0000 0000 0000 0000 0000 0000 0000 0001,

    0000 0000 0000 0000 0000 0000 0000 0010,

    ...

    and so on all the way up to 1023:

    0000 0000 0000 0000 00000011 1111 1111

    In the example that you include at the bottom, you set the least significant bit (LSB) to zero and one, actually only change one line on the output. To change all the lines, you must instead use 4 294 967 295 or 0xFFFFFFFF:

    < waveform_size;="">
    < 200){="" if="" sample="" number="" is="" less="" than="">
    waveformDataU32 [i] = 0; Disable channels 0-2
    }
    else {}
    waveformDataU32 [i] = 4 294 967 295; Otherwise turn on all channels to 800 samples
    }
    }

  • Build/update dynamically the table 3D

    Hi all

    I'm having a problem with the dynamic generation of a 3D of the following set of data table:

    x: {1,2,3,4,5}

    y: {1,2,3,4,5}

    Z_1: {1,2,3,4,5}

    Z_2: {1,2,3,4,5}

    Z_3: {1,2,3,4,5}

    Z_4: {1,2,3,4,5}

    Z_5: {1,2,3,4,5}

    where there is (5) Z amplitudes associated with each measurement location.  What I am able to statically (from the above values x and y tables 1 d and 2D table Z) is to create a 3D Board made up of x and is indexed intensity to the graphic format of the 2D tables.  Each page of the table corresponds to each of the 5 Z amplitudes measured at each location.  In the attached VI, the Array Build function works perfectly for the static case where the entire data is available.  I followed the example of a another discussion forum will be subject to the provisions of nest two loops construction 2D array in the inner loop and incrementing the pages on the outer loop. The static situation is resolved.

    However, my goal is to graphically present data he is taken, point by point, to the user.  The other attached VI simulates this scenario, incrementation of x and y positions based on the measure button.  Z matrix indicator shows that the 2D Array (each individual page) is in the proper format.  The construction of the 3D picture is dynamically where I'm having problems.  I tried to build table and replace a subset of table, but none of these functions to produce the desired result.

    In the case of building table, 3D table is correctly based on the first measure: for x = y = 1, 2D array page0 is set Z_1 in position (1,1), page1 has the Z_2 value in the position (1,1), page2 Z_3, etc..  However, on the second measure, as expected, the berries are concatenated page5 have Z_1 values in the (1,1) and (2,2) positions.  This result is properly formatted, however, should the counted array 3D page is limited to 5 (page0, 1, 2, 3, 4).  So ideally, page5 should in this case replace page0.  So build array results in the correct format but concatenation is not desirable.

    The subset of spare board was made with the index of the page (outside of the loop) number to specify the subset of the 3D Board needs to be replaced.  The result was an empty 3D array.

    Thank you any help to solve this problem.

    kmsk wrote:

    Any suggestions on how to handle filling out table 3D of unknown size?

    If the size of the final table has a reasonable upper limit, you can initialize an array of slightly oversized, then keep using the subset of the table replace. It will be much faster and more effective memory than gradually more and more large networks.

    When the purchase is made, you can cut to the final size.

    Aircraft add to a table 3D using 'insert into array' or 'Build array' (favorite?), cause memory frequent shifts and might slow down your code by orders of magnitude in casing of excessive fragmentation of memory.

Maybe you are looking for

  • New mac connects to the time capsule but does not see the old backups

    My new MacBook Pro connects perfectly to my Time Capsule, but it is not all backups that are there.  I can't scroll through them as I can with my old MacBook Pro.  The MacBook still connect to Time Capsule well and see and scroll through all the back

  • How do I enlarge the text box

    I have the latest version of Skype and trying to extend the text box where I write. Now, it seems so small. I know that before you could develop the window moving upwards or downwards according to the needs. Someone knows how to do this? Is it still

  • HP 021ne-15r nootbook pc: mother of replacement for Council

    Dear Sir I want to buy the new mother 'J2S05EA' for HP 15r-021ne nootbook pc card, the current Board is deamaged due to the high touch voltage with a usb device, So where I purchse new Board of Directors

  • Can I remove... ?

    My computer is so slow, and I would like to delete some Microsoft programs.  I have Windows XP on my computer, but used to have an older version. Is this ok for me to delete these things: for system 2007 Compatibility Pack, Microsoft NET framework 2.

  • Vibrate on calls, but not silent

    Hello. I now have a Xperia z5 compact Marshmallow. I would vibrate for calls when the ringer volume is turned on (which it does) but for the vibrations turn off silent mode. I have vibration on or off in the settings but I don't want to do every time