Appearing dynamicaly dimensions KING VBAI

Is there a way to dynamically set the KING dimensions (that is to say, using the calculator or set the Variable step) in VBAI without additional license and/or script software?

Using a variable integer computed in the previous step, I would like to change the width of the KING to match this integer value before the return on investment is used in a last step for another inspection.

Hi bjk10,

Once you have created a step create region of interest, go to the details tab. You will see that you can enter a numeric value for the various measures, but if you use the menu drop-down you can also select measures of the previous steps.  For example, I got a step to find the edges before creating my KING, so I have an option "find the edges 1 - Find Edge [1].» X-position (Pixel). If you want to base your ROI on previous measurements, make sure you configure these first steps if you have these options to choose from.

I hope this helps!

Tags: NI Hardware

Similar Questions

  • Addition of autofocus and the depth to the measuring Microscope

    Hello

    This is my first post and I consider myself a newbie with LabView, but I hope I can get some answers.  Here it goes.

    I have a measuring microscope with X & Y steps thanks to the drive motors.  The Assembly of camera and the objective of the CCD is mounted on a stage with the focus (Z-stage) and the magnification phase driven by step motors.

    My goals are:

    -Add automatic update functionality to my existing VI, such as the image will focus on a selected area of the user of interest (ROI).

    -Calculate the depth between two duties of the party appearing in separate Kings.

    Any help would be greatly appreciated!

    My first tip: only post your question once.  Repeated messages are annoying...

    The first step is to select a method of measuring of the development.  Over the years, several methods have been posted on this forum (search the Forum!).  My favorite is to find edges, then use to quantify for the standard deviation.  It is an indicator of development fast and accurate, and it will work pretty well on the Kings as long as they are not too small.

    The second step is to develop an algorithm to know where is your best focus position.  The simplest method is to take pictures in a series of positions of Z, then measure the emphasis in each of them.  Generally, measures will behave as a parable, where the best development is at the top of the parabola.  If you do not have a top, you have not yet reached the position of development.  Once you know about the location the position of focus, you can move in small steps until you get a specific value.  Depending on your application, there may be other algorithms that could get there faster.

    Once you have focused on the first object, save your position of Z.  Focus on the second object and note the difference in the positions of Z.  It's your difference of depth between the two objects.

    Bruce

  • Delay of paint

    Hello

    I want a label to paint with breaks. To get an impression,
    Run the code as it is. The current paint is made in the doPaint (...) - method.
    Currently, I spend the graphics Control Panel, which is not what I want, but at least
    We see some output. The issue of this "demo" - code is: why isn't the number "1".
    output?

    What I tried initially is to pass the graphics of the label - end several
    labels will be added to the Board - but then nothing is painted at all.

    Write own class which extends from JLabel was impossible either.

    So why is (partially) out visible when the graph of the group went and
    Why not when it's the graphics of the label?
    And the overall approach is valid or simply has everything to be painted on a Panel?

    Java version is 1.6.0_24.
    import java.awt.*;
    import java.awt.geom.*;
    import javax.swing.*;
    
    public class DelayedPaint {
      JFrame frame;
      JPanel panel;
      JLabel lb;
    
    
      public static void main(String args[]) {
        EventQueue.invokeLater(new Runnable() {
          public void run() {
         new DelayedPaint().createAndShowGUI();
          }
        });
      }
    
    
      void createAndShowGUI() {
        frame= new JFrame("DelayedPaint");
        frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        frame.setSize(400,400);
        panel= new JPanel(new BorderLayout());
        frame.setContentPane(panel);
        frame.setVisible(true);
        Thread t = new Thread() {
          public void run() {
         draw(panel);
          }
        };
        t.start();
      }
    
    
      private void delay(int ms) {
        try {
          Thread.sleep(ms);
        }
        catch (InterruptedException e) {
          System.out.println ("Error in delay: "+ e.toString());
        }
      }
    
    
      public void doPaint(Graphics g) {
        Graphics2D g2 = (Graphics2D) g;
    // Uncomment the following code to draw an arc. The arc will not be drawn, but cipher '1' appears.
    /*
        Dimension dim= frame.getSize();
        g2.draw(new Arc2D.Double(50,25, dim.height-100, dim.width-100, 0,360,
                        Arc2D.OPEN));
        delay(1000);
    */
        g2.setFont(new Font("Dialog", Font.BOLD, 15));
        for (char c='1'; c<':'; c++) {
          g2.drawString(""+c, (c-48)*10, 50);
          delay(500);
    //      lb.revalidate();
    //      lb.repaint();
        }
      }
    
    
      private void draw(JPanel panel) {
        lb= new JLabel("Good morning", SwingConstants.CENTER);
        Dimension dim= frame.getSize();
        lb.setPreferredSize(new Dimension(dim.width, 80));
        panel.add(lb, BorderLayout.NORTH);
    //    delay(2000);
    
        lb= new JLabel();
        lb.setPreferredSize(new Dimension(dim.height-20, dim.height-20));
        panel.add(lb, BorderLayout.CENTER);
    //    doPaint(lb.getGraphics());
        doPaint(panel.getGraphics());
    /*
        lb= new MyLabel();
        panel.add(lb, BorderLayout.CENTER);
    */
    //    lb.revalidate();
    //    lb.repaint();
      }
    
    
    
    /*
      class MyLabel extends JLabel {
        public void paintComponent(final Graphics g) {
          super.paintComponent(g);
          Graphics2D g2 = (Graphics2D) g;
          g2.setFont(new Font("Dialog", Font.BOLD, 15));
          for (char c='1'; c<':'; c++) {
         g2.drawString(""+c, (c-48)*10, 50);
    //     delay(500); // blocks EDT
          }
        }
      }
    */
    
    }
    //frame.setVisible(true);
    panel.add(new NorthPanel(), BorderLayout.NORTH);
    panel.add(new CenterPanel(), BorderLayout.CENTER);
    frame.setVisible(true);
    

    Components should be included in the frame until the frame is made visible or packaged.

    But I need to paint the component only once

    You can use the setRepeats() method. If you want the timer to take a fixed number of times, then you need to Manager within the class ActionListener to the timer itself (which is what you do in the central panel).

    The paintComponent() method is used to paint the current state of a component. It should NOT be used for:

    (a) definition of the properties of a component
    (b) starting or using timers.

    For your panel North there is no need a custom painting. The code might look like:

    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import javax.swing.*;
    
    public class DelayedPaint {
         JFrame frame;
         JPanel panel;
    
         public static void main(String args[]) {
              EventQueue.invokeLater(new Runnable() {
                   public void run() {
                        new DelayedPaint().createAndShowGUI();
                   }
              });
         }
    
         void createAndShowGUI() {
              frame= new JFrame("Delayed Paint");
              frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
              frame.setSize(400,400);
              panel= new JPanel(new BorderLayout());
              frame.setContentPane(panel);
              NorthPanel north = new NorthPanel();
              panel.add(north, BorderLayout.NORTH);
              frame.setVisible(true);
              north.startTimer();
         }
    
         class NorthPanel extends JPanel
         {
              JLabel lb;
              Timer timer;
    
              public NorthPanel() {
                   lb= new JLabel("Good morning");
                   add(lb);
              }
    
              public void startTimer()
              {
                   ActionListener taskPerformer = new ActionListener()
                   {
                        public void actionPerformed(ActionEvent evt)
                        {
                             setLayout(new FlowLayout(FlowLayout.LEFT));
                             lb.setText("Left");
                             timer.stop();
                        }
                   };
    
                   timer= new Timer(2000, taskPerformer);
                   timer.setRepeats( false );
                   timer.start();
              }
         }
    }
    

    For the central panel, you also need to add methods to modify the text. If you add a method like setText(). Then, the code base into your timer would be:

    centerPanel.setText(...);
    centerPanel.repaint();
    

    The timer class will need to track the number of times wherever he shot then he'll know what text to set. The paintComponent() method is simple because there is no inovke your getText() method and then draw the text to the location of your choice.

  • The 2012 VBAI Migrateing move KING in LabVIEW

    Hello

    I'm working on a school project were that the goal is to sort different objekt using 2 webcams, VBIA 2012 and 2012 of LabVIEW. Later this week, my program worked allmost that perfectly, just some small change should be made. After I installed LabVIEWmyRIO 2013 region of interest moves directly in the upper left corner of every time I open my projekt in LabView 2012, and it is therefore impossible to deteckt anything. When I opened my projekt VBAI 2012 each parameter is as I want.

    Then, I tried to make a new inspection in VBAI 2012 just to see if the same thing happens when I migrate to LabVIEW 2012. And he made over and over again.

    I have attached a picture of how it look like in VBAI 2012 and a picure of what it looks like in LabVIEW 2012, after that he migrated.

    Version of the software I'm using:

    -2012 LabVIEW c. 12.0.1f5 (32 bit)

    -2012 VBAI SP1 f2

    - NEITHER IMAQdx 4.3.0

    BRG

    Kristoffer

    The Kings are dynamically created a stage to create KING? Could attach you a simple inspection to illustrate this problem? Have you considered using the LabVIEW API to call VBAI (there is a set of screws installed in your palette for LabVIEW that give you that access open inspections, perform inspections, obtain results and images and it will work in fact the same engine as the normal VBAI the fact you will get the same results and this way, it is easy to make changes to your inspection VBAI without having to migrate to the LV again. It also allows for more flexible options for what versions of LV, you can use which versions of VBAI. See the example for delivery here:

    C:\Program Files (x 86) \National Instruments\Vision Builder HAVE 2012\API Examples\LabVIEW Examples\LabVIEW API example (Local) .vi

    Hope this helps,

    Brad

  • How can I talk to a LIVE person here on the dimensions of fixation on a Psd file?  Size and DImensions continue to appear weak, even after changing their sub Image &lt; Image size

    It seems that no matter how many times I change the size of the Image and make Pixel size as large as possible, dimensions appear 4 x 6 for my client.  I downloaded this file Psd layered on DropBox and the document still appears small.  I have expanded the size of the Image in inches, enlarged the dimensions in pixels of the Image, and again, when you use crop tool (in what customer says she used a million times before) it seems that it parts of image design and cultures.  So, what gives?

    I would LOVE you forever if you are able to help me trouble shoot this challenge (not to mention learning it) I am a newbie who couldn't afford to finish school and this is certainly a first.

    You can change the ppi to change the size of the image.

    The dimensions in pixels, ppi and image size are linked together, when you change one, one of the other two must change.

    Here's the formula.

    Inches X ppi = pixels

    The ppi is stored in the metadata so if the file header is corrupt or you use save for web, the ppi could be missing. In this case Photoshop guess of 72 dpi, which would change the size of the image.

    As long as the pixel dimensions has not changed, then there is nothing to fear. Pixel dimensions is the actual data. If the size of the image is incorrect, anyone with most image editing software can change the size of the image or the ppi to fix. Make sure that the pixel dimensions do not change. In Photoshop just uncheck the box resampling.

  • Photo tags and dimensions appears in Solution Explorer.

    Hello..

    I'm having a problem with Windows 7 Ultimate x 64.  When I go to the folders that contain the types of image files (jpeg, gif, png, etc), Windows Explorer no longer displays their rating, tag and dimension information.

    To highlight what Miss me, here is an image showing an example of Windows Explorer, dealer tags, ratings and dimensions:

    http://img268.imageshack.us/img268/9683/imagejox.PNG

    All I see right now is the file name, type, size, and date of creation/modification.

    Anyone has a suggestion to fix this please?  All files must be re-registered?

    Any help would be accepted with gratitude.

    See you soon...

    I restored my computer from a backup image that solved the problem, but if someone is able to make a suggestion as to what may have caused the problem, it would be great :)

  • I did my own art of header for the toolbar and the dimensions and size of the file are correct, but the image appears badly in the area. Why?

    I used photoshop to make my theme header with 3000 pixels wide and 200 from the top. In addition, the file is less than 300 KB. But after that I downloaded it, the picture in these dimensions is amplified. I do not get the image I had intended. Why is this? See picture attached example.

    The support module is here: https://discourse.mozilla-community.org/c/add-ons

    Looks like this monitor is like 1750 pixels wide, give or take.

    The width of the whole image will not be displayed unless you have a display of 3000 pixels wide, and it is " pinned with the upper right of the image. Only, as a large part of the width will be shown that there is the width to display the image.

  • How to get the dimensions information will appear next to the mouse cursor when the design / selection

    Hello

    On an old computer that I have que j' ai utilise used Illustrator for when I want to draw or making selections, close the cursor in a small black box with white text, there will be information dimenstions. It was similar to what you'd find in the window > Info Panel but simplified and you'll know how the selection you do is great. I have searched all over preferences and can't find it. I can't say if I imagined it somehow or what, but I hope that someone knows what I speak and know where to find. Thank you.

    Use of smart guides: Cmd/Ctrl + U

  • VBAI 2010 Fatal Error (NaN to the number)

    I get a fatal error (banner image see attached) that I've never seen before in VBAI 2010: NaN A value at a stage of Calculator gets interpreted as a large negative number (-2.14E + 9) in a region of interest later stage creation, which in turn causes the subsequent automatic contour trigger the fatal event.

    The cause, in this case, is a missing measure (an occurrence common for this and other similar calculator steps in this routine), the coordinate x of an endpoint of edge in the previous step, where I subtracted a 2, that is, I'm trying to set a limit KING 2 pixels away from the previous edge found.  In general, when I have a missing measure in this situation, the KING subsquent ends at the origin of the image (0,0), but VBAI not fall down.

    I fully undestand why VBAI crashes with an edge KING listed so far has "Left Field", but I am at a loss to explain why a NaN output get caclulator is interpreted as - 2.14E + 9.  Glancing through the routine in Setup mode and changes the step create region of interest, a message indicates that a "missing measurement is replaced by a constant" or something to that effect and the constant turns out to be - 2.14E + 9, so I guess that this process happens in the background when it is in mode of inspection.  What I don't understand is why my routine never threw this error before when the measure was absent, but since this morning, it throws the error every time!

    I have a temporary work-around (verification of the NaN in the step of the calculator and strength to zero if necessary), but I have a lot of similar sequences to fix and want to make sure that I understand why this fatal error is suddenly appeared.

    Any ideas appreciated,

    Eric

    It's fixed in VBAI 2011 and newer. He will plant is no longer with the VDM dll updated and VBAI, if a previous measure used by the step of ROI is NaN, KING step will treat it as a missing measure and return on investment stage will fail. NaN is cast to many is because NaN is valid for values to double, and the KING coordinates are integers, so when convert us internally the NaN in full, it is interpreted as a large number. Not sure why it would just start happening today though.

    Hope this helps,

    Brad

  • report image does not appear when a certain background cordinate is exceeded

    Hi all

    I create reports of DIAdem using script functions. Since the update to tiara 2015 (I belive) there is a mistake that didn't happen before:

    When I add a new Image to the State and lower coordinate is that below a certain value (~50...60) the image appears correctly. However if the lower coordinate exceeds this value the image will not be displayed (see the attached example script)

    Thanks in advance

    Christoph

    Hi Christoph,

    Properties of position change if changing the related properties.

    For example, if you change the height of the image to 100%, up and down changes to 0% each.

    If you change the background property to 60% as in the example script you, height + Top must be 40%.

    I hope that this screenshot with your source code to understand the problem:

    If the height or width property is zero, no picture!

    I suggest not to define two properties for a dimension (for example Top and height or up and down).

    If you set only one of the three properties, position of the image is not fully defined by the user, but by some default values of DIAdem.

    Concerning

    Christian

  • VBAI API fails to load/launch of inspection

    Hello world

    I am facing a problem today with an application that worked before. Do not know what is spent on the computer, but now, my application doesn't work anymore.

    I have different inspections of VBAI tree running on the same PC, they are loaded and started through the VBAI API from a small VI LabVIEW functions.

    The HMI of the VBAI appears but never turns by inspecting the mode. See screenshot below. The iteration count remain at 0.

    I already checked that the inspection is fully functional, if I run the normal VBAI interface.

    Could you please help me to troubleshout this question.

    Thanks a lot for your answers.

    Find the problem by myself!

    For some unknown reason, the Vision Builder.ini has been replaced with the default values.

    And the allowmultipleinstances = True line prevented is gone, my request to load the 3 different instances.

    By adding this line once again, everything returned to normal.

    Thank you

  • Custom Tools/menu bar VBAI

    I would like to find a way to customize the menu/toolbar for a Vision Builder AI.  It seems that the buttons launch and Inspection stop Insepction cannot be hidden/disabled or password protected operator.  Does anyone know of a way to control these elements?

    I am aware that the VBAI may use a custom interface developed in a LabVIEW VI, but it seems to me that the buttons Run/Stop always appears unless a property for the latter can be accessed.

    How a developer can prevent accidental a machine vision inspection stop if the Stop button is always enabled?

    Thank you
    Dan

    Hi Dan,.

    Unfortunately, there is no way to disable these keys of Vision Builder AI. That's the good reviews.

    You are right: even when using a custom user Interface, VBAI will display these buttons and they will be activated.

    The only solution to this issue now, is instead of using the Vision Builder of the application's main executable file, create custom LabVIEW user interface and use the VBAI API to open/run the inspection. You will be able to program in LabVIEW user access capabilities and only activate the features that you want to give access to the operator on your UI.

    The developer will always be able to edit the control using Vision Builder AI.

    We are aware of the lack of UAC in VBAI.

    Example of using the VBAI API can be found here:

    C:\Program Files (x 86) \National Instruments\Vision VBAI 2014\API examples

    Christophe

  • VBAI custom interface

    I started playing with the option of the interface in VBAI and wonder what may be a stupid question.

    I have a CVS-1456.  I'm not 100% sure, but it seems that my custom interface is only visible if I use a web browser to access the controller.  (This works)

    What I would really like is to see my custom interface to appear on the monitor of the CVS unit output.  At this point I see is the inspection image and overlays, I added.

    Is this possible?

    Hi Patrick,

    Unfortunately, what you describe is not possible. The custom user interface is intended to replace the standard Interface of Inspection that you have when you run an inspection in the mode of your computer host and control Vision Builder AI leave your host computer, or another computer on the network using a web browser.

    Currently, the only way to customize the VGA output of the CVS is to insert a Custom Overlay step. With this step, you can overlay booleans, results and even images on the image.

    -Christophe

  • VBAI 2011 takes too long to initialize controls

    Hello

    I work on VBAI 2011 and have 2 controls separately to check the device on the left side and right side device. Two of these inspections are working fine. However, when I add these 2 inspections 1 inspection, my VBAI seem frozen. It took forever to Inspection steps during initialization when I run in the Mode of Inspection, and no errors appear

    I'm curious to know if anyone sees this problem before and how to fix it?

    Thank you.

    Would it not possible to display your inspection? If you don't want it on a public place, let me know and I can send you a private email.

    Thank you

    Brad (National Instruments R & D Vision)

  • VBAI 2011: DataLogging and return on investment

    Hello

    I have 2 questions regarding my request for 2011 VBAI, hope to receive assistance from experts.

    1. I set data entry at the end of my inspection I would love to have 2 of my export of variables in the text file. However, even I have only my recording of data to these 2 variables, the Date information, time and iteration connects it (by default I think). How can I remove this information by default and don't have my 2 favortied variables appear?

    2. area of interest. Is it really annoys me when my operator see the green rectangle of the region of interest each time we run the inspection. Is there anyway that we can hide the rectangle in the mode of Inspection?

    Thank you.

    -

    Hoa Huynh

    University of Minnesota, twin cities campus

    If you don't like the default data record format, you can use a LabVIEW execution step to record exactly what you want in the format you want. Provide this type of customization at the stage of Datalogging would make it even more complicated. You can always delete rows if you do not want them.

    Display or hide different parts of the overlay, you can click the button Overlay Configuration to configure the overlays to show for each step in a given State. See the icon below for where to find this button:

    Hope this helps,

    Brad

Maybe you are looking for

  • How can I change small letters to the normal print size?

    After you download the new Thunderbird, I suddenly have to read everything in very small print. How can I solve this problem?

  • Mail update needed.

    While Snow Leopard is is no longer being updated, is the messaging system that belongs to this supported.   My email provider tells me that the message from Apple system is a pain in the A and causes so much trouble; as they review maintenance do not

  • PathAway for NB200-122

    My NB200 supports 3G, I inserted a SIM card of twins in it and it works well. The GPS also works very well and gives me the coordinates of where I am. However, as stated in the user manual, there is no navigation software installed. What would be the

  • Never turn off display

    my screen automatically goes on standby every 1 minute. I tried to go to control panel (change power settings).  I went t maintenanace of system in Control Panel. He always does.  Can anyone help.  I want my screen to be open 24/7.  He falls asleep a

  • The right side of my screen is black, but I can see everything

    Hello dear community,I would ask anyone here who has some knowledge about windows 7.i have a HP Compaq laptop and since I had it has this weird black space on the right end of the screen. I can see everything on the screen, including the time and the