Initialize the array 1 d with predetermined values

Hi all

I'm pretty new to the comm suite, but I'll have one (probably simple) question about the initialization of a constant matrix of 1 d. Suppose I want to create a constant 1 d of the matrix of size M and I want to boot with some predetermined values. Is there an easy/effective way to do it? Initializing one is rather heavy, especially for the great Mr. also, how can I initialize such constant on a Traget FPGA?

I've seen that for example for metering screws, it is possible to define a constant flow of data and initialize it with a .cvs file. Is there a similar possibility to initialize a constant matrix of 1 d?

See you soon,.

Steve0

Hi Steve0,

I found a quick solution and dirty to do this, as there is not a clear method to implement a constant matrix arbitrarily large. You can generate an array, but you prefer, my example is seen below:

Then go to the front, right click on the indicator and select "capture". From there, this table will be available on your range of data to drop as a constant of other VI in this project. You can also do the same with a CSV file by writing your CSV file to a flag and then enter the data to use.

BeenCoughin

Tags: NI Products

Similar Questions

  • Initialize the array, then using a feedback node to replace items

    Hello friends,

    I have a typical problem. I need to store values in a table 1 d with 7 elements. I want to start with a set zero array of items. I then start sending values and indices one by one so that the value is inserted in the table and is stored. My problem is when I start with a zero table, what happens is every time I have send a value that it replaces a zero to the correct index, but does not store this value for the next iteration as the zero table defines the table to zero once again. Changes as well as an item in the table all the time. I won't like that. Once started, I want all my values stored in the corresponding index, unless until a value with the same index overrides. Here is my attempt in jpg format. I tried to insert a table of zero which takes place once in a while loop and then connect the spare in feedback mode Board so that the insertion of elements Dummies happens only once. But I am not able to do. Please help me view inthi

    Your image shows that you cannot have a 'next iteration"because there is no point in loop around the code of the replacement array element and the while loop around the table to initialize is useless. You are not clicking on the button "Continuous run" are you? Do not!

    Here's a basic example. You can learn a few basics of LabVIEW by taking some of the tutorials.

  • Reference to the array of Clusters with an array element

    Hello

    I have an array of clusters of CONTROL (qualifying as "upper-tier cluster table") with one of the items is an array of cluster cluster (see attached).

    I intend to "reference" of this cluster of high level at different screws (as add item VI, insert item VI, delete the item VI etc.) and access (add/edit delete) the elements of this array.

    In my code, how I cataloged the array element (cluster) on the cluster internal (as shown on the figure)?

    I use LV RT on PXI.

    Hello smercurio_fc,

    Thank you for your example! Just a question: actually, with shift registers, is an example of creating a local copy of the full range? Even if the value of the lowest level cluster is changed, is the complete table is updated at the end (registry value to offset the full picture at the right end is updated using the reference node and property)? This VI will be slow when the size of the array becomes great?

    Comment of nicely.

  • initialize the array index

    Hello!

    I'm new to LabView and I am struggling with this problem for a few days...

    I have a 2D x CH spike_time table and on each line (table 1 d), I need to implement logic that requires the ability to dynamically initialize the two indexes.

    To be more clear, if I says each line of the table 2D with CH, it is the logic I should apply on each line:

    i = 0;

    while I<=>

    {j = i + 1;

    While ch (j) AND (i) - ch (j) ch<= inter_spke_interval="" and="" j=""><=>

    {j = j + 1 ;}

    If j - i + 1 > = min_burst_size then save (i, j);
    I have = j;

    }

    What is the best way to apply this logic in labview?

    How can I manipulate the value of the indxes, i and j to initialize as in the code? I tried to use the "Subset of the table" function in order to 'cut' subset of the line from i and j and records the SHIFT to pass again the subset as the loop, but I couldn't a solution anywhere nearby.

    If someone could share some ideas with me or has a similar vi useful, I would be very grateful!

    Thank you very much!

    Hi MG,.

    I already said you can use SHIFT registers to store I and j!

  • Form with predetermined values

    I am new to LiveCycle. I want to set up a form where if a person touches a button or a checkbox, it fills the form with the predetermined variables. I want to be there that several different buttons/check boxes if selected to fill the form with the predetermined values. These values would be different, depending on the selected button/checkbox.  Is this possible?

    Just to help understand a bit more, I am designing a form of prescription.

    If the practitioner selects 'Option A' I want to automatically fill in the fields required in the rest of the form with values predetermined (by me).

    Even if the practitioner selected 'Option B', it fills the form with a different set of predefined values.

    Hope it makes sense.

    Thank you

    After watching your form, I understand what you were going.  You want that prepopulate the fields multiple values when you select Option A, Option b... and so on.  Here is the script that I use for different areas, I would also suggest adding the same script for the event initialized so that you can save the State of form after that that it has been changed.

    A loss of Down - JavaScript Change event

    If (xfa.event.newText == 'Option A') {}
    optionText.rawValue = 'this is A option. "
    optionText2.rawValue = "this is the value of option A;
    optionText3.rawValue = 'this is A option. "
    optionText4.rawValue = 'this is A option. "
    optionCheckbox.rawValue = "0";      0 = unselected 1 = selected
    optionRadio.rawValue = 'Option A ';.
    }

    If (xfa.event.newText == 'Option B') {}
    optionText.rawValue = "this is option B;
    optionText2.rawValue = "this is the value of option B;
    optionText3.rawValue = "this is text option B;
    optionText4.rawValue = "this is option B;
    optionCheckbox.rawValue = "1";
    optionRadio.rawValue = 'Option B ';.
    }

    Leave a Radio - JavaScript Click event area (make sure you set your values)

    If (optionRadio.rawValue == 'Option A') {}
    optionText.rawValue = 'this is A option. "
    optionText2.rawValue = "this is the value of option A;
    optionText3.rawValue = 'this is A option. "
    optionText4.rawValue = 'this is A option. "
    optionCheckbox.rawValue = "0";
    optionDropdown.rawValue = 'Option A ';.
    }

    If (optionRadio.rawValue == 'Option B') {}
    optionText.rawValue = "this is option B;
    optionText2.rawValue = "this is the value of option B;
    optionText3.rawValue = "this is text option B;
    optionText4.rawValue = "this is option B;
    optionCheckbox.rawValue = "1";
    optionDropdown.rawValue = 'Option B ';.
    }

    By a button - JavaScript Click event

    optionText.rawValue = 'this is A option. "

    optionText2.rawValue = "this is the value of option A;

    optionText3.rawValue = 'this is A option. "

    optionText4.rawValue = 'this is A option. "

    optionCheckbox.rawValue = "0";

    optionDropdown.rawValue = 'Option A ';.

    optionRadio.rawValue = 'Option A ';.

    I would set an example of form, but I don't see where to download on this forum.  I will send you the form.

    Suggestion on your form: make sure that your form fields have unique names in the hierarchy (SHIFT + F11).

  • String to the Array.vi worksheet with negative numbers

    I was exploring a program posted on the developer zone titled "ClipboardtoNumericArray.vi" and noticed that it substitute 0 for elements with negative numbers. The 'String to Array.vi worksheet"working with negative numbers? If so, how?

    The problem is that your negative sign is not a negative sign.  This is the code ASCII 150.  I'll call it something like a "long dash", that's why it does not recognize the LabVIEW code.  A negative real sign you have in part E-6 is code ASCII 45.  And also why same Excel treats as text rather than a number.

    Where did you get the CSV file from?

  • Initialize the NOR-2548 SPDT with topology using IVI

    I'm controlling a NOR-2548 in labview using IVI. What are the Topologies back. I know that the convention to initialize it with option string is ' topology: model / topology ' (2530/1-Wire 192 x 1 matrix). What is the topology string your entry of a reverser, namely the NEITHER-2548. Also, what are the parameters you enter to connect to a channel to IVI?

    Hey thanks, but I managed to Forest Gump my way towards the right solution.

  • MathScript NaN initialize the array LV 8.6

    For those of us who bought LV 8.2 - 8.6 Mac OS Suite of Dev, the mathscript module won't boot has a table with NaN.

    It's

    c = Nan (m, n)

    and

    repmat (NaN, m, n)

    are broken.

    The only work around I can find is to replace a number, for example '0 ':

    InT = repmat(0,m,n); InT (= NaN;)

    Would appreciate any other workaround to create an m x n array of NaN.

    Hi wjdwyer,

    This has been fixed in more recent versions of MathScript, but for older versions, another workaround potential that I could meet you multiply nan by a table that already exists (see below). I know that's not ideal, but if all goes well it will at least give you an alternative.

    A = nan * repmat(1,m,n);

  • display of the output cursor empty with null values

    I have the below procedure of the State where he is shown the output to the client.

    The requirement now is if the select statement does not return a value any with the input given then output parameter should see NULL values instead of no line at all.


    One method is to get the number of the select query that is written in "open p_out for." And then write the condition as if count is 0 then null other show data.

    Could you please suggest me any other alternative to this.

    Create or replace procedure test (p_empno in number , p_out out sys_refcursor) is
    
    begin
     open p_out for 
     select e.ename, d.deptname, s.sal , p.addr , v.age
      from emp e ,dept d, sal s, padress p , age v
     where e.deptno = d.deptno and d.deptno = s.deptno
     s.sal_id = p.sal_id and p.id = v.id
    and e.empno = p_empno ;
    
     
    exception when others then
     open p_out for 
     select null , null,null,null,null from dual;
    
     
    end test.
    

    Thank you

    Maybe NOT TESTED!

    Select x.ename, x.deptname, x.sal, x.addr, x.age

    of the double

    left outer join

    (select e.ename, d.deptname, s.sal, p.addr, v.age

    from emp e,.

    d Dept,

    SAL s,

    padress p,

    v of the age

    where e.deptno = d.deptno

    and d.deptno = s.deptno

    and s.sal_id = p.sal_id

    and p.id = v.id

    and e.empno = p_empno

    ) x

    1 = 1

    Concerning

    Etbin

    Select x.*

    of the double

    left outer join

    (select *)

    WCP

    where ename = 'ETBIN.

    ) x

    1 = 1

    EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
    - - - - - - - -
  • Dynamic action on the amendment of item with AjaxRequest value does not

    Hello
    I have a select list of users called P222_USERS. When a new user is selected, I want to run a query to find the email to the selected user and paste it into the P222_EMAIL text field.

    I have a process on demand on the change of P222_USERS that calls a javascript function:
    fetchEmail ($('#P222_USERS').val ());

    In my head, the function calls an application process in an Ajax request:

    function fetchEmail (email) {}
    var ajaxRequest = new htmldb_Get (null, & APP_ID, 'APPLICATION_PROCESS = GET_EMAIL', 0);
    ajaxRequest.add ("P222_USERS", $('#P222_USERS').val ());
    ajaxResult = ajaxRequest.get ();
    }

    Here is my request PLSQL process GET_EMAIL:
    Start
    Select send to: P222_EMAIL of connection where userid =: P222_USERS;
    end;

    Enamel is not filled is at: P222_EMAIL. I know I'm close, but have already spent a lot of time with various alternates to the above function / on the application process. Any help is greatly appreciated. I wish the process of PL/SQL on the item change worked that way instead of through AJAX.

    Thank you
    Johnny

    Johnny98 wrote:
    Hello
    I have a select list of users called P222_USERS. When a new user is selected, I want to run a query to find the email to the selected user and paste it into the P222_EMAIL text field.

    I have a process on demand on the change of P222_USERS that calls a javascript function:
    fetchEmail ($('#P222_USERS').val ());

    In my head, the function calls an application process in an Ajax request:

    function fetchEmail (email) {}
    var ajaxRequest = new htmldb_Get (null, & APP_ID, 'APPLICATION_PROCESS = GET_EMAIL', 0);
    ajaxRequest.add ("P222_USERS", $('#P222_USERS').val ());
    ajaxResult = ajaxRequest.get ();
    }

    Here is my request PLSQL process GET_EMAIL:
    Start
    Select send to: P222_EMAIL of connection where userid =: P222_USERS;
    end;

    Enamel is not filled is at: P222_EMAIL. I know I'm close, but have already spent a lot of time with various alternates to the above function / on the application process. Any help is greatly appreciated. I wish the process of PL/SQL on the item change worked that way instead of through AJAX.

    Thank you
    Johnny

    The fact is that your application process defines the elements of value in session state and do not meet the side value client/browser

    If you need to return the value of the application process and to assign the value in javascript like this

    function fetchEmail(email){
    var ajaxRequest = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=GET_EMAIL', 0);
    ajaxRequest.add('P222_USERS', $('#P222_USERS').val());
    ajaxResult = ajaxRequest.get();
    //newly added
    alert(ajaxResult);
    $s('P222_EMAIL',ajaxResult);
    }
    
    //amend your On Demand PLSQL Process GET_EMAIL like this
    begin
    select email into :P222_EMAIL from login where userid = :P222_USERS;
    //newly added
     htp.prn(:P222_EMAIL);
    end;
    

    In this way the value will be set in and client side state both session

  • How do I run the exe of labview with command line

    I would like to launch an exe of labview with a command line.

    I would like to get advice how to launch the exe of Labview with give values to the control settings?

    You can view the example where x, there are controls

    There is a more detailed guide here, I reference below:

    1. first of all, you can enable it in settings:

    1. open the properties for a version of the application specification

    2. navigate to the Advanced category

    3. check the pass all arguments on-demand command line

    To pass the arguments to command line to request and access in your code follow the same steps as for LabVIEW 7.x.

  • How re - initialize an array with the new values at run time?

    Hello

    In this application of particluar I want to change the value of a particular index (Ex: 4th move in a 1 d table) and store the changed value (Inremented) in the same index position.

    I wrote a program, can someone tell what I am doing wrong?

    LabVIEW version: 8.6

    Screenshot kindly updated instead of .vi

    Two things.

    First of all:

    You must initialize the table (via the feedback loop).

    Click with the right button on the wire of the array and create constant.  Move the index of item 99.  Initialize element 0.  This thread up to the lower part of the feedback node.

    Second:

    You use an Insert in the table VI, but it's not describe what you try to do.  While he places an element in the position shown is also increases the size of the table.

    This change to a subset of table replace VI.

  • Replace the index of an array with strings values

    I have a control table 2D (or indicator) CH x T: each cell of the table contains the voltage check for channel and time represented by the respective row and column.

    I would like to be able to scroll the data showing the names and time values to the Index screen instead of numeric values.

    For example, instead of see 0,1,2,3 etc. as line index values, I would like to see channel 1, canal2, canal3 etc..

    Is - it somehow possible?

    Any idea is welcome!

    Thank you in advance!

    See you soon.

    MG

    If you want to display the data in the form of a 2D array, but use channel & time as the Index display, you can use the rings of text and structure of the event.  You can reduce the table view if you only want to display one value.

  • Type a table defined clusters to hold configuration data - definition of default values for each element of the array

    Hello

    I was wondering if I could get some information and opinions on the use of an array of type defined clusters to store configuration data.  I am creating a program to test several EHR and wanted to have a control of type defined for each HAD with the information needed to create the DAQmx tasks for all signals for it must HAVE.  I am eager to do so that the data are encoded in hard and not in a file that the user might spoil.

    Controls of type def are then put into a Subvi who chooses as appropriate, one based on the enumeration of Type DUT connected to a case structure.

    I have problems with the control of the defined type.  I see issues when you try to save a configuration unique to each element of the array in the array of clusters.  Somehow, it worked at first, but now by clicking on "Operations on the data--> default font of the current value ' on individual elements of the cluster or the entire cluster (array element) does not save data when I re - open the command def.  What I am doing wrong?  I'm trying to do something with the berries of the clusters that I shouldn't do?

    I enclose one of the defined reference type controls.  I tried to change it bare to see if that helped, but no luck.

    To reproduce, change the resource string for the element 0 of the array and do the new value by default.  Then close the def of type, and then reopen it.  The old value is always present in this element.  The VI is saved in LabVIEW 2012.

    The values of a typedef are not proprigated to the instances of the control. They get if created WHEN data values have changed. They will be not updated with the changes to come. You must create a VI specifically to hardcode your values or to implement a file based initialization. The base file would be much better and more flexible. If you don't want users to change the data simply encryption. There is a wedding blowfish library that you can download.

  • Update of digital control with different values with array function

    Hello

    I have attached my code base. I want to execute the code for 2 sets of digital control with a gap between the two values, then pass it. Something like that

    ABC

    Initialize the P1 = 10; P2 = 20; P3 = 30; P4 = 40

    Run the code

    delay = 10ms

    Update of P1 = 150; P2 = 200; P3 = 350; P4 = 500

    Run the code

    jump to abc

    I am stuck how can I update the values of P1, P2, P3, P4? I thought about using a function table but couldn't go further.

    Thanks for the help,

    Ana

    Hello Ana,

    One way you might achieve what you are looking for is using property nodes. These property nodes will allow you to change the values of the block diagram control. You can set up a structure of case inside your loop that will change control through nodes of property value after a certain number of iterations. Here is a community sample that shows how to use the nodes property to change the Boolean controls:

    https://decibel.NI.com/content/docs/doc-22669

    -Erik S

Maybe you are looking for

  • who need to allow listening music when it is already licensed

    When you try to listen to music, I just bought, it asks me to authorize my computer. I open a session goes hand in hand with the application for leave and he tells me that this computer is already authorized, but continues to not play or let me play

  • Satellite L350D-131 - Excessive heat

    Hello I got my Toshiba Satellite L350D-131 about a year and a bit ago. Ever since the first day, I noticed that the laptop seems to be excessive heat. Everyone has noticed this and is this normal? When he is sitting on a desk, it seems to get to the

  • HP mini 110 computer: System stopped and blocked from BIOS password

    Hi, I can not access my hp mini 110 organization it requires a password. It says FATAL error SYTEM QUIT. My system stopped code is

  • Took too long to install the update

    Remember - this is a public forum so never post private information such as numbers of mail or telephone! Ideas: You have problems with programs Error messages Recent changes to your computer What you have already tried to solve the problem

  • Bad name shows the Solitaire game

    The guy who installed my Vista, put the fake name than mine in Windows Solitaire.  Anyone knows how I can fix? Thank you