Extracting an array element and index

Greetings,
I'm making a program to auto align a fiber cable to a waveguide. As of right now I'm only concerned with 2 axis. So I'm producing a table of 3 columns (X, Y, I) where "I" is my measured current based on how well my fiber lines up with my waveguide. I have about 1000 rows (this table is also saved to a .txt file). What It's doing right now is returning to me the highest value of I, but I need to know which row this highest value is in, and more importantly I need to be able to return the values of X and Y for this row- so that I can set the positioner to this coordinate. I'm really not very good with arrays, so I'm trying to do this using amateur techniques.
If anyone can help it would be much appreciated. But please keep in mind I'm a newbie when it comes to array stuff so please write with simple terms~.
Many Thanks,
Tony 

"Array min&max" will give you the max as well as the index of the max value, just slice out the relevant column and apply this function. Now use "index array" with the found max index to get the entire row from the original 2D array if needed.
If you want more details, please attach a simple VI containing a typical array as default data in a control.
LabVIEW Champion . Do more with less code and in less time .

Similar Messages

  • 'Incorrect value type for array element in index N'

    Please help.  Preflight is flagging multiple 'Incorrect value type for array element in index N" > Required key /F is missing >Array element at index 0 is of wrong type' messages for pages throughout my text document with embedded navigation and annotations.What does it mean? Is there anything I can do?
    The origins of the file are from a selection of emails taken from Mail and gmail, and letters probably written on pc (Office) and converted to pdf...
    I'm on Mac Mavericks.
    Thanks for reading.

    What problem are you trying to solve with preflighting? What are you checking for?

  • Running 5 commands using array elements and waiting between?

    Hi All,
    Trying to learn PS so please be patient with me ;)
    System: PSv3 on Win2012 server running WSUS role
    I am wanting to execute 5 commands using a 'foreach' loop but wait until one finishes before moving onto the next. Can you please check out what I have and provide some suggestions of improvement? or scrap it completely if it's rubbish :(
    Current code:
    #### SCRIPT START ####
    #Create and define array and elements
    $Array1 = @(" -CleanupObsoleteComputers"," -DeclineSupersededUpdates -DeclineExpiredUpdates"," -CleanupObsoleteUpdates"," -CleanupUnneededContentFiles"," -CompressUpdates")
    #Run the cleanup command against each element
    foreach ($element in $Array1) {
    Get-WsusServer | Invoke-WsusServerCleanup $element -Whatif
    #### SCRIPT END ####
    I am assuming that I need to use @ to explicitly define elements since my second element contains two commands with a space between?
    The cleanup command doesn't accept '-Wait' so I'm not sure how to implement a pause without just telling it to pause for x time; not really a viable solution for this as the command can sometime take quite a while. They are pretty quick now that I do
    this all the time but just want it to be future proof and fool proof so it doesn't get timeouts as reported by others.
    I have found lots of code on the net for doing this remotely and calling the .NET assemblies which is much more convoluted. I however want to run this on the server directly as a scheduled task and I want each statement to run successively so it
    doesn't max out CPU and memory, as can be the case when a single string running all of the cleanup options is passed.
    Cheers.

    Thank you all for your very helpful suggestions, I have now developed two ways of doing this. My original updated (thanks for pointing me in the right direction Fred) and Boe's tweaked for my application (blew my mind when I first read that API code
    Boe). I like the smaller log file mine creates which doesn't really matter because I am only keeping the last run data before trashing it anyway. I have also removed the verbose as I will be running it on a schedule when nobody will be accessing it anyway,
    but handy to know the verbose commands ;)
    Next question: How do I time these to see which way is more efficient?
    My Code:
    $Array1 = @("-CleanupObsoleteComputers","-DeclineSupersededUpdates","-DeclineExpiredUpdates","-CleanupObsoleteUpdates","-CleanupUnneededContentFiles","-CompressUpdates")
    $Wsus = Get-WsusServer
    [String]$Logfile = 'C:\Program Files\Update Services\LogFiles\ArrayWSUSCleanup.log'
    [String]$Logfileold = 'C:\Program Files\Update Services\LogFiles\ArrayWSUSCleanup.old'
    If (Test-Path $Logfileold){
    Remove-Item $Logfileold
    If (Test-Path $Logfile){
    Rename-Item $Logfile $Logfileold
    foreach ($Element in $Array1)
    Get-Date | Out-File -FilePath $LogFile -Append -width 50
    Write-Output "Performing: $($Element)" | Out-File -FilePath $LogFile -Append -width 100
    . Invoke-Expression "`$Wsus | Invoke-WsusServerCleanup $element" | Out-File -FilePath $LogFile -Append -width 100
    Logfile Output {added 1 to show what it looks like when items are actions}:
    Wednesday, 27 August 2014 2:14:01 PM
    Obsolete Computers Deleted:1
    Wednesday, 27 August 2014 2:14:03 PM
    Obsolete Updates Deleted:1
    Wednesday, 27 August 2014 2:14:05 PM
    Expired Updates Declined:1
    Wednesday, 27 August 2014 2:14:07 PM
    Obsolete Updates Deleted:1
    Wednesday, 27 August 2014 2:14:09 PM
    Diskspace Freed:1
    Wednesday, 27 August 2014 2:14:13 PM
    Updates Compressed:1
    Boe's Updated Code:
    [String]$WSUSServer = 'PutWSUSServerNameHere'
    [Int32]$Port = 8530 #Modify to the port your WSUS connects on
    [String]$Logfile = 'C:\Program Files\Update Services\LogFiles\APIWSUSCleanup.log'
    [String]$Logfileold = 'C:\Program Files\Update Services\LogFiles\APIWSUSCleanup.old'
    If (Test-Path $Logfileold){
    Remove-Item $Logfileold
    If (Test-Path $Logfile){
    Rename-Item $Logfile $Logfileold
    [Void][reflection.assembly]::LoadWithPartialName("Microsoft.UpdateServices.Administration")
    $Wsus = [Microsoft.UpdateServices.Administration.AdminProxy]::getUpdateServer($WSUSServer,$False,$Port)
    $CleanupMgr = $Wsus.GetCleanupManager()
    $CleanupScope = New-Object Microsoft.UpdateServices.Administration.CleanupScope
    $Properties = ("CleanupObsoleteComputers","DeclineSupersededUpdates","DeclineExpiredUpdates","CleanupObsoleteUpdates","CleanupUnneededContentFiles","CompressUpdates")
    For ($i=0;$i -lt $Properties.Count;$i++) {
    $CleanupScope.($Properties[$i])=$True
    0..($Properties.Count-1) | Where {
    $_ -ne $i
    } | ForEach {
    $CleanupScope.($Properties[$_]) = $False
    Get-Date | Out-File -FilePath $LogFile -Append -width 50
    Write-Output "Performing: $($Properties[$i])" | Out-File -FilePath $LogFile -Append -width 100
    $CleanupMgr.PerformCleanup($CleanupScope) | Out-File -FilePath $LogFile -Append -width 200
    Logfile Output {added 1 to show what it looks like when items are actions}:
    Wednesday, 27 August 2014 2:32:30 PM
    Performing: CleanupObsoleteComputers
    SupersededUpdatesDeclined : 0
    ExpiredUpdatesDeclined    : 0
    ObsoleteUpdatesDeleted    : 0
    UpdatesCompressed         : 0
    ObsoleteComputersDeleted  : 1
    DiskSpaceFreed            : 0
    Wednesday, 27 August 2014 2:32:32 PM
    Performing: DeclineSupersededUpdates
    SupersededUpdatesDeclined : 1
    ExpiredUpdatesDeclined    : 0
    ObsoleteUpdatesDeleted    : 0
    UpdatesCompressed         : 0
    ObsoleteComputersDeleted  : 0
    DiskSpaceFreed            : 0
    Wednesday, 27 August 2014 2:32:34 PM
    Performing: DeclineExpiredUpdates
    SupersededUpdatesDeclined : 0
    ExpiredUpdatesDeclined    : 1
    ObsoleteUpdatesDeleted    : 0
    UpdatesCompressed         : 0
    ObsoleteComputersDeleted  : 0
    DiskSpaceFreed            : 0
    Wednesday, 27 August 2014 2:32:36 PM
    Performing: CleanupObsoleteUpdates
    SupersededUpdatesDeclined : 0
    ExpiredUpdatesDeclined    : 0
    ObsoleteUpdatesDeleted    : 1
    UpdatesCompressed         : 0
    ObsoleteComputersDeleted  : 0
    DiskSpaceFreed            : 0
    Wednesday, 27 August 2014 2:32:38 PM
    Performing: CleanupUnneededContentFiles
    SupersededUpdatesDeclined : 0
    ExpiredUpdatesDeclined    : 0
    ObsoleteUpdatesDeleted    : 0
    UpdatesCompressed         : 0
    ObsoleteComputersDeleted  : 0
    DiskSpaceFreed            : 1
    Wednesday, 27 August 2014 2:32:43 PM
    Performing: CompressUpdates
    SupersededUpdatesDeclined : 0
    ExpiredUpdatesDeclined    : 0
    ObsoleteUpdatesDeleted    : 0
    UpdatesCompressed         : 1
    ObsoleteComputersDeleted  : 0
    DiskSpaceFreed            : 0

  • Testing array elements

    Hello,
    This might be a very stupid question, but I did do quite a bit of searching and haven't found the answer. I'm trying to test the value of an array element and not sure how to do this. Here's the code:
    public static void Fibbonacci(int end){
         Integer[] f = new Integer[end];
         f[0] = 0;
         f[1] = 1; //2
         int i = 2;
         while(f[i] <= end){
         f[i] = f[i-1] + f[i-2];
         print(f);
         i++;
         print(Array.getInt(f, i));
    My understanding is that, as in C, the array elements are pointers (or reference) to the actual values. Is there a way to dereference? How would I assign an element of an array to a single variable to of the same type as the array elements?
    Thank you very much for your time!
    Edited by: DaneWKim on May 10, 2010 8:59 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Hmmmm... it seems I'm missing something. In my previous code,
    while(f[i] <= end){doesn't seem to evaluate. also, when I do
    j = f;
    print(j);
    I get 0 even if the element indexed has a non-zero value.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Accessing custom device FIFO array element by name

    Hi,
    Some of my custom devices have a large number if I/Os. Because the FIFOs are arrays, my custom device RT driver VI has been referencing them by indexing the arrays. Is there a recommended method to reference FIFO I/Os by name, and preferably the same name as the channel names that are created by the initialization VI? Referencing array elements by index can get very confusing and not very flexible if I need to add or remove custom device I/Os. Thanks.

    You could use an enum diagram constant to wire to the index terminal of index array. Make the item name correspond to the element name.
    LabVIEW Champion . Do more with less code and in less time .

  • Referencing Array element by name

    Hi, I've got an array containing various sprites... I'm
    wanting to reference the sprite I want by its name rather than its
    index in the array, and was wondering if theres a simple way of
    doing this? I know I could do a for loop through all the array
    elements and see which one has a name that is equal to the name im
    looking for, but is something along the lines of
    myArray[elementName] possible?

    It can be a sprite.
    var testSprite:Sprite = new Sprite();
    addChild(testSprite);
    var myObject =
    {valueOne:"one",valueTwo:"Two",valueThree:testSprite};
    myObject.valueThree.x = 200;
    trace(myObject.valueThree.x);

  • How to modify array elements from a separate class?

    I am trying to modify array elements in a class which populates these fields by reading in a text file. I have got mutator methods to modify the array elements and they work fine in the same class.
    public class Outlet {
         private Outlet[] outlet;
         private String outletName;
         private int phoneNumber;
         private int category;
         private int operatingDays;
    static final int DEFAULT = 99;
         public void setPhoneNumber(int newPhoneNumber) {
              phoneNumber = newPhoneNumber;
         public void setCategory(int newCategory) {
              category = newCategory;
         public void setOperatingDays(int newOperatingDays) {
              operatingDays = newOperatingDays;
    public static void readFile(Outlet[] outlet) throws FileNotFoundException {
              Scanner inFile = new Scanner(new FileReader("outlets.txt"));
              int rowNo = 0;
              int i = 0;
              String outletValue;
              while (inFile.hasNext() && rowNo < MAXOUTLETS) {
                   outlet[rowNo] = new Outlet();
                   outletValue = inFile.nextLine();
                   outlet[rowNo].setOutletName(outletValue.toUpperCase());
                   outlet[rowNo].setPhoneNumber(DEFAULT);
                   outlet[rowNo].setCategory(DEFAULT);
                   outlet[rowNo].setOperatingDays(DEFAULT);
              inFile.close();
         public static void displayUnassignedOutlets(Outlet[] outlet) {
              int i = 0;
              System.out.println("Showing all unassigned Outlets");
              System.out.println(STARS);
              for (i = 0; i < MAXOUTLETS; i++ ) {
                   if (outlet.getCategory() == DEFAULT) {
                   System.out.println("\nOutlet Number: " + (i + 1) + "\t" +
                             outlet[i].getOutletName());
    Now in the other class that I want to modify the array elements I use the following code but I get an error that "The expression type must be an array but a Class ' Outlet' is resolved".
    So how can I modify the array elements? What do I have to instantiate to get the following code to work?
    public class Franchise {
         private Franchise[] franchise;
         public Outlet[] outlet;
         public static void createFranchise(Franchise[] franchise) throws FileNotFoundException {
              Scanner console = new Scanner(System.in);
              int choice = -1;
    ++++++++++++++++++++++++++++++++++++
              Outlet outlet = new Outlet();
              Outlet.readFile(outlet.getOutlet());
    ++++++++++++++++++++++++++++++++++++
              boolean invalidChoice = true;
              while (invalidChoice) {
              System.out.println("\nCreating a New Franchise...");
              System.out.println(STARS);
              System.out.println("Please select an outlet from the list below");
              Outlet.displayUnassignedOutlets(outlet.getOutlet());
              choice = console.nextInt();
              if (choice < 0 || choice > 10) {
                   System.out.println("Error! Please choose a single number between 1 and 10");               
              else {
                   invalidChoice = false;
              invalidChoice = true;
              while (invalidChoice) {
                   System.out.println("Please enter the Phone Number for this Outlet");
                   choice = console.nextInt();
                   String phone = new String();
              phone = new Integer(choice).toString();
                   if (phone.length() < 8 || phone.length() > 10) {
                        System.out.println("Error! Please enter 8 to 10 digits only");
                   else {
    +++++++++++++++++++++++++++++++++++++++
                        outlet[(choice - 1)].setPhoneNumber(choice);
    +++++++++++++++++++++++++++++++++++++++
                        invalidChoice = false;

    Hi Pete!
    Thanks for your comments. I have included my full classes below with their respective driver modules. Hope this helps out a bit more using the code tags. Sorry, it was my first posting. Thanks for the heads up!
    import java.util.*;
    import java.io.*;
    public class Outlet {
         public Outlet[] outlet;
         private String outletName;
         private int phoneNumber;
         private int category;
         private int operatingDays;
    //     private Applicant chosenApplicant;
         static boolean SHOWDETAILS = false;
         static final String STARS = "****************************************";
         static final int MAXOUTLETS = 10;
         static final int DEFAULT = 99;
         public Outlet[] getOutlet() {
              return outlet;
         public String getOutletName() {
              return outletName;
         public int getPhoneNumber() {
              return phoneNumber;
         public int getCategory() {
              return category;
         public int getOperatingDays() {
              return operatingDays;
         public void setOutletName(String newOutletName) {
              outletName = newOutletName;
         public void setPhoneNumber(int newPhoneNumber) {
              phoneNumber = newPhoneNumber;
         public void setCategory(int newCategory) {
              category = newCategory;
         public void setOperatingDays(int newOperatingDays) {
              operatingDays = newOperatingDays;
         public Outlet() {
              outlet = new Outlet[10];
         public static void readFile(Outlet[] outlet) throws FileNotFoundException {
              Scanner inFile = new Scanner(new FileReader("outlets.txt"));
              int rowNo = 0;
              int i = 0;
              String outletValue;
              while (inFile.hasNext() && rowNo < MAXOUTLETS) {
                   outlet[rowNo] = new Outlet();
                   outletValue = inFile.nextLine();
                   outlet[rowNo].setOutletName(outletValue.toUpperCase());
                   //System.out.println(rowNo % 2);
              //     if (rowNo % 2 == 0) {
                   outlet[rowNo].setPhoneNumber(DEFAULT);
                   outlet[rowNo].setCategory(DEFAULT);
                   outlet[rowNo].setOperatingDays(DEFAULT);
    //               System.out.println("Outlet Name+++++++  " + rowNo + "\n" + outlet[rowNo].getOutlet());               
                   rowNo++;
         //          System.out.println(rowNo);
              if (SHOWDETAILS) {
                   if (rowNo > 6) {
                        for (i = 0; i < rowNo; i++ ) {
                             System.out.println("\nOutlet Name+++++++  " + (i + 1) + "\t" +
                                       outlet.getOutletName());
              inFile.close();
         public static void displayAllOutlets(Outlet[] outlet) {
              int i = 0;
              System.out.println("Showing All Outlets");
              System.out.println(STARS);
              for (i = 0; i < MAXOUTLETS; i++ ) {
                   System.out.println("\nOutlet Number: " + (i + 1) + "\t" +
                             outlet[i].getOutletName());
         public static void displayUnassignedOutlets(Outlet[] outlet) {
              int i = 0;
              System.out.println("Showing all unassigned Outlets");
              System.out.println(STARS);
              for (i = 0; i < MAXOUTLETS; i++ ) {
                   if (outlet[i].getCategory() == DEFAULT) {
                   System.out.println("\nOutlet Number: " + (i + 1) + "\t" +
                             outlet[i].getOutletName());
         public static void main(String[] args) throws FileNotFoundException {
              Outlet start = new Outlet();
              Outlet.readFile(start.getOutlet());
              Outlet.displayUnassignedOutlets(start.getOutlet());
    ================================
    So in the below Franchise class, when I specify:
    outlet[(choice - 1)].setPhoneNumber(choice);
    I get the error that an array is required but the class Outlet is resolved. Any feedback is greatly appreciated!
    import java.io.FileNotFoundException;
    import java.io.PrintWriter;
    import java.util.*;
    public class Franchise {
         private Franchise[] franchise;
         public Outlet[] outlet;
         static final int MAXOUTLETS = 10;
         static final int DEFAULT = 99;
         static boolean SHOWDETAILS = false;
         static final String STARS = "****************************************";
         static final double REGHOTDOG = 2.50;
         static final double LARGEHOTDOG = 4;
         static final int SALESPERIOD = 28;
         static final int OPERATINGHOURS = 8;
         public Franchise[] getFranchise() {
              return franchise;
         public Franchise() {
         public static void createFranchise(Franchise[] franchise) throws FileNotFoundException {
              Scanner console = new Scanner(System.in);
              int choice = -1;
              //franchise[i] = new Franchise();
              Outlet outlet = new Outlet();
              //outlet[i] = new Franchise();
              Outlet[] myOutlet = new Outlet[10];
              Outlet.readFile(outlet.getOutlet());
              boolean invalidChoice = true;
              while (invalidChoice) {
              System.out.println("\nCreating a New Franchise...");
              System.out.println(STARS);
              System.out.println("Please select an outlet from the list below");
              Outlet.displayUnassignedOutlets(outlet.getOutlet());
              choice = console.nextInt();
              if (choice < 0 || choice > 10) {
                   System.out.println("Error! Please choose a single number between 1 and 10");               
              else {
                   invalidChoice = false;
              //System.out.println(j);
              invalidChoice = true;
              while (invalidChoice) {
                   System.out.println("Please enter the Phone Number for this Outlet");
                   choice = console.nextInt();
                   String phone = new String();
                  phone = new Integer(choice).toString();
                   if (phone.length() < 8 || phone.length() > 10) {
                        System.out.println("Error! Please enter 8 to 10 digits only");
                   else {
                        outlet[(choice - 1)].setPhoneNumber(choice);
                        invalidChoice = false;
              invalidChoice = true;
              while (invalidChoice) {
                   System.out.println("Please enter the category number for this Outlet");
                   choice = console.nextInt();
                   if (choice < 1 || choice > 4) {
                        System.out.println("Error! Please choose a single number between 1 and 4");
                   else {
                        outlet.setCategory(choice);
                        invalidChoice = false;
              invalidChoice = true;
              while (invalidChoice) {
                   System.out.println("Please enter the Operating Days for this Outlet");
                   choice = console.nextInt();
                   if (choice < 5 || choice > 7) {
                        System.out.println("Error! Please choose a single number between 5 and 7");
                   else {
                        outlet.setOperatingDays(choice);
                        invalidChoice = false;
    //          Applicant chosenApplicant = new Applicant();
         //     Applicant.readFile(chosenApplicant.getApplicant());
              //Applicant.checkCriteria(chosenApplicant.getApplicant());
         //     System.out.println("This Franchise has been assigned to : " +
              //          chosenApplicant.displayOneEligibleApplicant());
              Outlet.displayUnassignedOutlets(outlet.getOutlet());
         public static void main(String[] args) throws FileNotFoundException {
              Franchise start = new Franchise();
              Franchise.testing(start.getFranchise());
              //Franchise.createFranchise(start.getFranchise());
              //Franchise.displaySalesForcast();
              //Franchise.displayAllFranchises(start.getOutlet());

  • Find and replace several array elements

    I have a 2d array and want to subsitute any negitive value with a marker e.g "**" or any indicator which would be identified easily. I am using Labview 5.1

    Hi,
    The data type of you array is probably numerical. If you haven't already
    done this, the first step would be to convert the data to a character
    data type. This is easy done with 'Number to Decimal String'. Tie the
    output to a 'For Loop' and the search and modify each element in the
    array using a combination of 'Search 1D Array', 'Replace Array Subset',
    and shift registers.
    The first iteration of the 'For Loop' will give you the first index of
    the first '-1' found. Use that index value to replace the the '-1' with
    your '**'. Increment the index and pass it to the shift register to use
    as a starting point for the next interation's search and replace process.
    There may be a more "packaged" way of doing this but I just love For
    Loops.
    Hope this helps ...
    - Kevin
    In article <[email protected]>,
    "Gorelick" wrote:
    > I have a 2d array and want to subsitute any negitive value with a marker
    > e.g "**" or any indicator which would be identified easily. I am using
    > Labview 5.1

  • Using a For Loop Index for Array Element Number?

    Hi.  Thanks in advance for the help.  I can't seem to find what I want to do here using the search function... probably because I don't know how to frame the question appropriately.  Ignore the title to this post cause it's probably wrong vocabulary for what I want to do.
    Here's the situation:
    I have a 2D array where the first column is the X data and each subsequent column is Y data (call it Y1...Yn).  The n-value varies from run to run (some runs have 4 columns of data, some have 20), but that is easily gathered when reading the data file.  I need to perform a number of operations on each set of data, the least of which is smoothing the data and graphing it, so I'm limiting my discussion to these 2 operations.
    What I want is a for loop structure where the indexing of the loop tracks the Y1...Yn columns, grabs each column for the iteration, performs the relevant analysis, and spits out the result, but in a stackable manner.  Thus the title; I want to use the for loop's index to mark the array element for building a new array.
    See the image attached.  A 2D array of 9 columns (X, Y1...Y8) is analyzed such that each data set, (X, Y1), (X, Y2)...(X, Y8) is bundled, graphed, run through a B-spline Fit, of which is also graphed.  I need to replace this with something that looks like the for loop structure shown.  
    I just don't know how to get those two data bundles [(X, Yi) and it's smoothed pair] out of the for loop in a stacked set from every iteration of the for loop.
    Again the title, I think I want to build a new array where i use the index of the for loop to control the entries of the new array.  But I can't see how to do that.
    Any help would be appreciated.
    Attachments:
    NeedForLoopForThis.PNG ‏30 KB

    Hello H.R. Dunham, and welcome to the forum!
    It seems that you may be looking for Auto-Indexing, a basic feature of loops in LabVIEW.  You'll need to transpose your array before wiring it into the for loop, as elements are auto-indexed by row before column, but at that point you should be able to operate on each column and output an array of n cluster elements corresponding to your input columns.  Auto-indexing tunnels look like brackets to indicate each element will be indexed automatically- this should be the default when wiring an array into a for loop or when wiring anything out of a for loop.
    As for how to build your pairs, I suggest removing the X column and creating a "starter" cluster containing your X data and placeholder Y data before entering your "Y" processing loop.  Use the bundle by name function in the for loop to insert your processed column data into the cluster and auto-index the cluster output. Flow would be something like this:
    1) Gather data
    2) Split X and Y using standard array operations
    3) Create "template" cluster with shared X data
    4) Pass template cluster and Y-column array into an auto-indexed for loop.
    5) Insert processed Y data into cluster inside loop.
    6) Auto-index cluster data out of loop.
    This tutorial is probably also a good place to get started:
    Getting Started with NI LabVIEW Module 3: Loops
    http://www.ni.com/white-paper/7528/en/
    Hope that helps!
    Regards,
    Tom L.

  • How to Return the Index of a Mouse-Selected Array Element in the View Interface of Diadem

    Hello,
    Does anybody have an idea of how to obtain the index of a mouse-selected array element in the View interface of Diadem??
    Thanks!

    Hi Ovidius,
    Keep explaining.  The only way I know of to trap a selected cell value in VIEW is to embed into the desired VIEW area a second non-modal SUDialog that has a Table control or an XTable control displaying the values of certain data channels.  There are callbacks in both table controls for cell selection, and you can configure the table control to allow only single cell selection if that's what you want.  The regular table control will be easier to program, but the XTable control will perform much better for larger channels.
    But what happens with that value the user selected?  Is it used for a calculation?  Is it added to a report?  Why would the user select that cell in a table rather than selecting the corresponding feature in a graph with the crosshair cursor?
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments

  • I have recently purchased a new computer and photoshop element. It looks like its downloaded it but I don't know how to access it. it says file are ready...down load files have been extracted and saved to folder....launch PS elements and open specific fol

    I have recently purchased a new computer and photoshop element. It looks like its downloaded it but I don't know how to access it. it says file are ready...down load files have been extracted and saved to folder....launch PS elements and open specific folder. it looks like it downloads. It then keeps taking me back to this page. Im not sure where to go next

    if you have a win os you should have dl'd an exe and a 7z file.
    put both in the same directory and double click the exe.

  • Strange behaviour of "And array Elements"

    If u connect an empty boolean array to "And Array Elements" function, The output is "True" !. Is this correct?. Is there something wrong ?. Please Help.

    Hi J.A.C
    This is correct.This is an explanation I've found: "This behavior is intentiional, and stems from elementary Boolean logic. The Boolean algebra primitives are analogous to numeric operations are integers. Just as the identity element for addition is 0, and for multiplication, 1; the identity for Boolean OR is FALSE, and for AND, TRUE. For example, x^0 == 1; that is, x times itself zero times is by definition 1. For the same reason boolean x ANDed with itself zero times is TRUE."
    If this is not acceptable for your application, then just use the "Array Size" VI first to check if you've an empty Array (Array size=0) and then you can pass or not the array to the "And Array Elements" function.
    Hope this helps.
    Luca
    Regards,
    Luca

  • Goldengate Extracts reads slow during Table Data Archiving and Index Rebuilding Operations.

    We have configured OGG on a  near-DR server. The extracts are configured to work in ALO Mode.
    During the day, extracts work as expected and are in sync. But during any dialy maintenance task, the extracts starts lagging, and read the same archives very slow.
    This usually happens during Table Data Archiving (DELETE from prod tables, INSERT into history tables) and during Index Rebuilding on those tables.
    Points to be noted:
    1) The Tables on which Archiving is done and whose Indexes are rebuilt are not captured by GoldenGate Extract.
    2) The extracts are configured to capture DML opeartions. Only INSERT and UPDATE operations are captured, DELETES are ignored by the extracts. Also DDL extraction is not configured.
    3) There is no connection to PROD or DR Database
    4) System functions normally all the time, but just during table data archiving and index rebuild it starts lagging.
    Q 1. As mentioned above, even though the tables are not a part of capture, the extracts lags ? What are the possible reasons for the lag ?
    Q 2. I understand that Index Rebuild is a DDL operation, then too it induces a lag into the system. how ?
    Q 3. We have been trying to find a way to overcome the lag, which ideally shouldn't have arised. Is there any extract parameter or some work around for this situation ?

    Hi Nick.W,
    The amount of redo logs generated is huge. Approximately 200-250 GB in 45-60 minutes.
    I agree that the extract has to parse the extra object-id's. During the day, there is a redo switch every 2-3 minutes. The source is a 3-Node RAC. So approximately, 80-90 archives generated in an hour.
    The reason to mention this was, that while reading these archives also, the extract would be parsing extra Object ID's, as we are capturing data only for 3 tables. The effect of parsing extract object id's should have been seen during the day also. The reason being archive size is same, amount of data is same, the number of records to be scanned is same.
    The extract slows down and read at half the speed. If normally it would take 45-50 secs to read an archive log of normal day functioning, then it would take approx 90-100 secs to read the archives of the mentioned activities.
    Regarding the 3rd point,
    a. The extract is a classic extract, the archived logs are on local file system. No ASM, NO SAN/NAS.
    b. We have added  "TRANLOGOPTIONS BUFSIZE" parameter in our extract. We'll update as soon as we see any kind of improvements.

  • Display and modify array elements

    Hello,
    I am using LabVIEW to read a set of parameters from an instrument and display them into an array indicator. This first part is quite easy and works fine. What I would like to be able to do (so far unsuccessfully) is to modify some of the values directly on the array indicator and subsequently pass the new values on the array indicator back to LabVIEW. I would really appreciate if somebody could help me understand whether this is possible and how do it?
    Thanks a lot,
    Gianni
    Solved!
    Go to Solution.

    Make the array a control and write to it programmatically using a local variable. Be aware of race conditions. For example in this case you have two writers: the instrument and the user, and whoever writes last, wins.
    LabVIEW Champion . Do more with less code and in less time .

  • How to set the value of an array element (not the complete array) by using a reference?

    My situation is that I have an array of clusters on the front panel. Each element is used for a particular test setup, so if the array size is three, it means we have three identical test setups that can be used. The cluster contains two string controls and a button: 'device ID' string, 'start' button and 'status' string.
    In order to keep the diagrams simple, I would like to use a reference to the array as input into a subvi. This subvi will then modify a particular element in the array (i.e. set the 'status' string).
    The first problem I encounter is that I can not select an array element to write to by using the reference. I have tried setting the 'Selection s
    tart[]' and 'Selection size[]' properties and then querying the 'Array element' to get the proper element.
    If I do this, the VI always seems to write to the element which the user has selected (i.e. the element that contains the cursor) instead of the one I am trying to select. I also have not found any other possible use for the 'Selection' properties, so I wonder if I am doing something wrong.
    Of course I can use the 'value' property to get all elements, and then use the replace array element with an index value, but this defeats the purpose of leaving all other elements untouched.
    I had hoped to use this method specifically to avoid overwriting other array elements (such as happens with the replace array element) because the user might be modifying the second array element while I want to modify the first.
    My current solution is to split the array into two arrays: one control and one indicator (I guess that's really how it should be done ;-) but I'd still like to know ho
    w to change a single element in an array without affecting the others by using a reference in case I can use it elsewhere.

    > My situation is that I have an array of clusters on the front panel.
    > Each element is used for a particular test setup, so if the array size
    > is three, it means we have three identical test setups that can be
    > used. The cluster contains two string controls and a button: 'device
    > ID' string, 'start' button and 'status' string.
    >
    > In order to keep the diagrams simple, I would like to use a reference
    > to the array as input into a subvi. This subvi will then modify a
    > particular element in the array (i.e. set the 'status' string).
    >
    It isn't possible to get a reference to a particular element within an
    array. There is only one reference to the one control that represents
    all elements in the array.
    While it may seem better to use references to update
    an element within
    an array, it shouldn't really be necessary, and it can also lead to
    race conditions. If you write to an element that has the
    possibility of the user changing, whether you write with a local, a
    reference, or any other means, there is a race condition between the
    diagram and the user. LV will help with this to a certain extent,
    especially for controls that take awhile to edit like ones that use
    the keyboard. In these cases, if the user has already started entering
    text, it will not be overwritten by the new value unless the key focus
    is taken away from the control first. It is similar when moving a slider
    or other value changes using the mouse. LV will write to the other values,
    but will not rip the slider out of the user's hand.
    To completely avoid race conditions, you can split the array into user
    fields and indicators that are located underneath them. Or, if some
    controls act as both, you can do like Excel. You don't directly type
    into the cell. You choose w
    hich cell to edit, but you modify another
    location. When the edit is completed, it is incorporated into the
    display so that it is never lost.
    Greg McKaskle

Maybe you are looking for

  • Exit in transaction FB70

    Hi. In transaction FB70 I need to save the document number in field bkpf-xblnr, I tried with BTE SAMPLE_PROCESS_00001120, but in this moment, the document number has not been generated yet. Any ideas ??? Thanks for your help.

  • GPS coordinates in CS6

    I recently purchased CS6 and am having difficulty importing (or finding) the GPS data for my images.  I'm using Nikon D5100 and D5200 cameras to take pictures, with attached GP-1 GSP system.  I'm shooting in RAW and converting the images as I import

  • XML LPX-00209 Error

    I have one clob field with xml content and i want to use them with l_parser := dbms_xmlparser.newParser; dbms_xmlparser.parseClob(l_parser,p_xml); without this value <?xml version="1.0" encoding="UTF-8"?> What the simplest way. Thaks.

  • Need help calculating total from flowable rows

    I am trying like a mad man to figure out how to calculate a total field from fields that flow one after another.  I utilized the tutuorial on Adobe, but the process to enter the formcalc forumula does not work in my instance.  I can upload the file t

  • I gor an i phone from my uncle when he passed away and i can not access it

    My uncle passed awy in September and I was given his new I Phone 5s.. I have been trying to access it to make it my new phione and I am unable to do so. Please help!! I have doen a favtory restore or so I thought but it keeps telling me I need his e