Smart camera 1742 selecting inspection by tcp/ip and labview

Hello everybody!
I´m working with two smart cameras NI1742 where i have some inspection for different products, i´m trying via tcp/ip and lab view 2010 select the inspection for each product. i have configured the tcp/ip connection and test it with the vision builder ethernet terminal, this part works very good, but i can´t do this with Labview where i show images from the smart cameras via shared variables.
If someone know how can i do it? please, i will be thankful.
this is my code but there is something that is wrong.
thanks and regards
Solved!
Go to Solution.
Attachments:
USER1.vi ‏85 KB

You are already using the VBAI API in LabVIEW to start the inspection. Why don't use the Open Inspection VI to select which inspection to run and then you don't need a product select state and TCP commands? You can use the Get Target Inspections VI to list the paths to the inspections on your target since they are saved in numbered folders and it won't be obvious what the path is, but once you get the path, it is very simple to just keep one session open to the target and use the API to open inspections, run them, even get images instead of using the variables (you can use Get Inspection Image for the Image or just keep using your shared variable since it sounds like that works fine.).
There are two possibilities I can think of without more info on why your current setup doesn't work:
1. When you start the inspection using the API, I don't think product select works, since it is expected that you just use the API to switch inspections. You can test this out by commenting out your VBAI API calls in LV. Start the inspection from the VBAI executable when connected to the target and the Product Select is in use. Run your VI that sends a TCP command to switch to the other inspection and see if it works (you can reconnect from VBAI and see if it's running the new inspection).
2. There is an error with the TCP command...check the error out of your TCP VIs.
Again, instead of trying to get your current model working, I would switch to using the API for running inspections and selecting the inspections. If you do use the API, you don't need to stop the current inspection, when changing inspections. The Open Inspection VI will stop any current inspection before loading the new inspection. It will wait until the current iteration is done before stopping the current inspection, and the clean up state of that inspection will be called as well.
Hope this helps,
Brad

Similar Messages

  • NI-1744 Smart Cameras go offline using Vision Builder AI and LV2010?

    I've run into a perplexing and frustrating problem.
    I have a set of 6 NI-1744 smart cameras used to monitor sample motion in an automated system
    A central robot moves samples between 6 satellite chambers; there is a camera mounted above the entrance to each of the satellites; the sample carriers are drilled with up to 10 holes encoding their numbers in binary (0-1023). There is also an L-shaped registration mark drilled near the region for the number encoding. Matters are complicated somewhat in that the second generation of carriers has a slightly more complicated registration mark (which includes the simple L of the first generation).
    What I would like to accomplish is this:
    Most of the time, I just want to be able to see what's under each camera, illuminating from above using a ring light attached to the camera. Call that Inspection A.
    I may need to capture an image without the ring light. Call that Inspection B
    When a sample transfer is occurring, I need to run a more complicated inspection (Inspection C):
    A light is turned on underneath the end of the sample transfer arm (the "fork"), backlighting the region where the hole pattern would be if a carrier is in fact present.
    Acquire an image of the fork with the backlight on.
    Check to see if the image shows the fork to be empty. If so, return that information and the inspection is complete.
    If not, look for the (backlit) registration mark and establish a coordinate system for the holes. Look to see which holes are present, calculate the sample number, return the data and the inspection is complete
    If not, look for the 2nd gen registration mark. If it is found, establish the coordinates as in step 4, calculate the number, return the data and complete.
    If none of the registration patterns are found, turn on the ring light, capture an image and return it so the operator can intervene and enter the appropriate data.
    I have successfully built the inspection, and it appears to work in the Vision Builder configuration interface, or if run from the Vision Builder inspection interface. If I attempt to *use* the inspection, accessing it via the VBAI interface in Labview, one or more of the cameras will hang after one or more inspections and stops responding to LabVIEW. It will take multiple reboots to get it back on line and visible to either VB or Labview.
    Originally, I had thought to configure the camera to run inspections continously and select inspection A, B, or C based on a variable I could access using the Labview Shared Variable Engine.  Every time I tried that the camera in question would hang. My current sort-of-successful software uses the VBAI functions in LabVIEW to open Inspection A, B, or C on the camera, run that inspection a single time and return the results and inspection image. That still ends up with one or more cameras hanging, especially if I've added the case to handle the more complicated registration mark.
    I think I may be running out of memory in the camera. I have occasionally received an out of memory error message when running the inspection in debug (step) mode in the VB configuration interface, at which point the camera will disconnect from the VB interface. When I look at the system monitor tab for a camera in MAX, I can see that it is showing me 11.5M free/124M total memory, and 72.3Mfree/118M total disk space. If I understand those numbers, that means that less than 10% of the memory is free when the inspection starts!
    I'm only communicating with the cameras via the ethernet interface. Are there any software components I don't need to have installed on the 1744 (MAX lists about 12 different things installed!) in that case?
    Alternatively, it appears there are VBAI functions available that might let me acquire an image and then process it via a local copy of Vision Builder running on the host PC, rather than in the camera. Is that so, and if so, would it be faster than running the inspection in the camera?
    I've attached a zipfile with the inspection that appears to stall the camera, and samples of typical images captured of the empty fork and a sample holder.
    Kevin Roche
    Advisory Engineer/Scientist
    Spintronics and Magnetoelectronics group
    IBM Research Almaden
    Attachments:
    Carrier Read Problem.zip ‏657 KB

    The good news: thanks to some offline assistance from Brad, my cameras are no longer crashing.
    The bad news: my labview VI using VBAI functions still fails for one or more cameras after a while (typically >12 hours of monitoring). 
    It's very odd: the cameras are still visible online.
    I can ping them.
    I can connect to them via VBAI, run inspections that way (either in configuration mode or inspection mode), and disconnect successfully.
    My calling VI, however insists that it can't connect (usually with a -354700 error from VBAI Connect.vi, occasionally with a -354705).
    I am using shift registers in the monitor loop of the main VI so that I can pass the VBAI session reference for each camera back to the subvis that actually load and run the desired inspection once a connection has been made. After an indeterminate time, one or more of those appears to go bad, but if I attempt to reset and connect to the camera again (I did include a control to let me close and reconnect if necessary from the monitor loop), I still get the above errors.
    The only way to get them back online within LabVIEW this morning proved to be to stop the main VI and reset all the controls to default, reboot the cameras, and then restart the VI. At that point it was able to connect to all 6 again and has been running happily for over 8 hours.
    I set up the persistent sessions using the shift registers because I have observed in the past continually opening and closing resources like that can lead to memory problems. It also dramatically reduced my cycle time when all I want to do is get the latest images from the cameras to under 2 seconds.
    Any ideas? Is there some subtlety to disconnecting/reconnecting to the VB in the cameras via Labview that I'm missing?
    I am working on a slightly smarter version of the inspection that can be allowed to run continously in a camera and simply return the appropriate result when asked, rather than having to start and stop different inspections as I do now, but that is not ready for deployment yet. It's the symptom of running just fine for X hours and then losing one or more cameras that is baffling me right now.
    Kevin Roche
    Advisory Engineer/Scientist
    Spintronics and Magnetoelectronics group
    IBM Research Almaden

  • Does anyone have Experience talking to a WAGO Ethernet Fieldbus copler using the Open modbus/TCP protocol and LabView ?

    I have an Ethernet Fieldbus Copler of WAGO which supports the OpenModbus/TCP Protocoll, and I want to talk to it over LabView. Does anyone know how to do this or even has example VI's or Librarys ?

    Wago and National Instruments have worked together to test and develop an application note showing the use of the National Instruments Modbus driver with LabVIEW and the Wago Ethernet Coupler. I have attached the preliminary applications note (which is in final technical review here at NI). You can purchase the National Instruments Modbus driver by ordering the Industrial Automation Servers, part 777616-01. The USA price is $995. It should save you quite a bit of time in working with the Wago device and any other industrial controller or modbus device you might work with in the future.
    Preston Johnson
    Business Development Manager
    Preston Johnson
    Principal Sales Engineer
    Condition Monitoring Systems
    Vibration Analyst III - www.vibinst.org, www.mobiusinstitute.com
    National Instruments
    [email protected]
    www.ni.com/mcm
    www.ni.com/soundandvibration
    www.ni.com/biganalogdata
    512-683-5444
    Attachments:
    wago_overview.doc ‏171 KB

  • Losing smart camera connection when using web server on NI1762 smart camera

    Hi
    I am using 2 smart cameras ( old NI1762 and the new NI1772) with Vision builder 2011 . 
    I am trying to find a way to retrieve data and image to a Visual Basic 6 application. i could not find an elegant way to do it , so instead , i am sending TCP command to the smart camera as an input and the smart camera send me back a TCP command a as an output. by this way i could communicate with the smart camera . For transferring images I could not use the TCP step , so I turned on the smart camera web server to get the image by a browser Object . But the problem is that everything is going well with the TCP, but when I turned on the web server and try to communicate with it, sometimes I loose the connection with the smart camera. That is happened with the 1762 smart camera. But when I use the NI1772 it rarely happed.
    Please help me. is there any other elegant way to communicate with the smart camera , and if a TCP and web server is a solution , Why the NI1762 web server is not stable ? Why i am losing the connection when browsing to the inspection page???
    Thanx

    Previous versions of Vision Builder had a COM library that you could use from Visual Basic 6 or other environments and talk over the network to a Smart Camera running Vision Builder AI and control its execution just how you are requesting. In more recent versions, this has been replaced by a native .NET and LabVIEW-native API that is much more fully featured. Unfortunately, I do not think the older COM mechanism is still available/supported (but I certainly could be wrong...).
    However, one avenue you may wish to persue would be to call into the .NET interface from Visual Basic 6. Microsoft designed .NET to allow COM interoperibility in both directions (.NET can call into COM libraries and COM libraries can call into .NET). Take a look at the following document from Microsoft:
    http://msdn.microsoft.com/en-us/library/zsfww439(v​=vs.85).aspx
    You could then look at any of the .NET (C#) examples to get an idea of the API:
    C:\Program Files (x86)\National Instruments\Vision Builder AI 2011\API Examples\dotNET Examples
    Eric

  • Ajout d'une smart caméra dans un projet Labview

     Bonjour
    Je possède Labview 2009 ainsi que Ni Vision Acquisition 8.5.1 et Ni Vision Builder 3.5. Lors de l'installation de Vision Builder je ne peux installer la boite à outils Developement Toolkit car il me dis que Labview 8.5 n'est pas installé (alors que j'ai la version supérieur de 2009). Du coup je ne peux pas ajouter de smart camera dans un projet Labview puisqu'elle n'apparait pas dans les cibles et périphériques vià Labview. Comment pouvoir installer cette boite à outils ? Existe-t-il une mise à jour d'un des logiciels ?
    Résolu !
    Accéder à la solution.

    Bonjour,
    En premier lieu disposez vous bien de TOUT ces logiciels :
    LabVIEW
    LabVIEW Real-Time Module
    NI Vision Development Module
    NI Vision Acquisition Software
    ou :
    Vision Builder for Automated Inspection
    Ensuite :
    Est-ce que vous pouvez voir votre caméra sous Measurement and Automation Explorer  (MAX)?
    Dans la suite je pars de l'hypothèse que vous ne pouvez pas la voir sous MAX.
    Comment l'avez vous configuré, notamment au niveau des paramètres réseau ?
    Si vous pensez que la configuration réseau n'est pas bonne, remettez les paramètres à zéro :
    Aussi il faut faire attention à ce que les ports suivants ne soient pas filtrés par un firewall ou autre :
    Si vous ne voyez toujours rien, démarrer votre Smart Camera en safe mode :
    Regardez sous Measurement and Automation Explorer (MAX) si vous la détectez, et n'hésitez pas à la formater et réinstaller l'ensemble des composants.
    Enfin, n'hésitez pas à utiliser la sortie série qui peut vous informer de l'état de la caméra  (en utilisant Hyperterminal ou autre) :
    Avec les paramètres suivants :
    Révélation (Surlignez pour lire)
    • 9,600 bits per second
    • 8 data bits
    • No parity
    • One stop bit
    • No flow control
    • 9,600 bits per second• 8 data bits• No parity• One stop bit• No flow control
    N'hésitez pas également à nous fournir l'état des LEDs (notamment status, power, pass et fail) de votre caméra.
    Il se peut que votre firmware soit corrompu et nécessite une installation / réinstallation de la cible.
    Cordialement,
    Da Helmut

  • Modify variables in a smart camera by a remote computer

    Hi
    I have a smart camera NI1722 and I want to modify some variables inside the camera by a computer which is connected to the camera.
    Is it possible to modify variables inside the camera from a computer outside? On the computer we program with CVI. We have a RS232 and a TCPIP connection.
    Does anybody can help us?
    thanks
    Oliver
    Solved!
    Go to Solution.

    Hi Oliver,
    Are you using LabVIEW or Vision Builder AI to program the Smart Camera?
    There are multiple ways of exchanging data between a smart camera and CVI on the host computer.
    The easiest way is probably to use shared variables.
    If you're using LabVIEW to program the smart camera, the following article explains how to create and deploy shared variables on the target.
    http://zone.ni.com/devzone/cda/tut/p/id/4679
    If you're using Vision Builder AI, first connect to the smart camera, then select Tools>>Variable Manager...
    Select the  System Variables tag, then click Add to create variable for the data you want to share. Make sure you select the Publish on Network checkbox.
    You can set the value of these variables in Vision Builder, using the Set Variable step, located in the Additional Tools palette.
    And many steps allow to use them directly in their configuration page, by clicking on the down arrow of some numeric controls.
    Now, on the CVI side, this example shows how to connect to, read and write the variables that you created on the smart camera.
    https://decibel.ni.com/content/docs/DOC-3806
    Hope this helps.
    Best regards,
    -Christophe

  • Smart camera for flame and smoke detection

    Has anyone ever done this with the camera?  Is the camera capable of hold the agorithems to do the task?

    That sounds reasonable to try. But, I'm not sure if it'd be able to give you satisfactory performance and reliability. You do have the option of downloading the trial versions of our Vision Development Module (VDM) or Vision Builder for Automated Inspection (VBAI) products. You could then use any camera to acquire some images of smoke and fire and use our software to check if your algorithm ideas work. VDM is a LabVIEW add-on, which gives you low-level control over our image processing algorithms. Whereas, VBAI is a stand alone application that lacks some of the functionality of VDM, but it's menu-configured and allows you to create vision inspections much faster. Either of these software products can run on our smart cameras. I linked some info pages and trial download sites below.
    Vision Development Module
    http://www.ni.com/vision/software/vbai/
    Evaluation: https://lumen.ni.com/nicif/us/evaltlktsigproc/content.xhtml
    Vision Builder for Automated Inspection
    http://www.ni.com/labview/vision/
    Evaluation: https://lumen.ni.com/nicif/us/machinevisionbrochure/content.xhtml
    Mike
    Applications Engineer
    National Instuments

  • NI 1742 Smart Camera: Error de comunicaci​on con remote target en NI MAX

    Buenos días con todos,
    tengo varios problemas con mi Smart Camera NI 1742:
    Problema 1.- Mi camara es de puerto ethernet dual , pero ahora me sale que tiene un solo puerto Ethernet. No se como se puede arreglar este problema pues desde que apareció este error me genera el "Problema 2"
    Problema 2.- Cuando quiero acceder al software de la smart camara me envia este siguiente mensaje de error.
    Necesito ayuda urgente pues esta cámara será utilizada en un proyecto especial.
    ¡Resuelto!
    Ir a solución.

    Hola;
    El error que estás viendo se debe a que la cámara no puede establecer comunicación con la PC.-
    En efecto la cámara 1742 cuenta con dos puertos ethernet para conectar a la cámara con la computadora de desarrollo, uno de ellos funciona como puerto primario a 10/100/1000 MB que generalmente se conecta a la pc y puede configurarse para adquirir una dirección de un servidor dhcp, mientras que el segundo, se conoce como secundario y sólo puede ser confgurado para un ip estático.
    Te recomendaría formatear el disco duro de la cámara y reinstalar el software. Para formatear hay qe dar click derecho en la camara y elegir la opción "Format Dosk" . A partir de ahí un wizard te guiará por el formateo de la misma, será necesario reiniciarla. Es probable que por eso solo puedas ver un puerto en la cámara
    Después de ahí, una vez formateada la cámara podrás agregar nuevamente el software a la misma (click derecho>> install software)
    How do I Configure the Dual Ethernet Ports on Real-Time Controllers?
    Exito en tu aplicacion

  • Smart Camera gets Restart When it is put in inspection inface mode, why ?

    Hi,
    why smart camera gets Reboot when it is put in Inspection Interface mode from configure Inface Mode.?
    Brijesh Patel
    CLAD
    Labiew programmer

    I've seen this a lot recently.  It use to show no warn you but now a messages tells you it is doing this and that it should take less than a minute.  Definitely was seeing this before I switched to VMS, and now see the VMS startup screen sometimes.
    I believe that on some conditions it does the update even in Standby, but for some reason not always.

  • Multicast IP on 1742 Smart Camera

    I have setup a smart camera on a switched ethernet system.
    Cam IP--10.128.xx.xx
    PLC IP--10.128.xx.xx
    PC with browser to view web server--10.128.xx.xx
    The Camera ONLY NEEDS TO COMMUNICATE to these other 2 IP's.
    How to I limit this or shut off multi-cast?

    Its been a while since i have gotten to get back to the forum.
    Attachments:
    fatal error.PNG ‏29 KB
    fault on connection upon fail loop.PNG ‏27 KB
    ping of death edit.png ‏287 KB

  • Smart camera & PC

    Hello,
    When running VBAI 2013 on a PC in RUN mode, all image layers can be watched on the monitor.
    Using the NI-1752 smart camera connected to PC will I be able to watch all image layers as well in real time?
    If the question is YES, do I need to use the second Ethernet port, or every thing (developing and monitoring) is done with Ethernet port 1?
    Thanks,
    gsc

    Hi,
    Yes, there are 2 ways to monitor what the Smart Camera is inspecting. Both are using Ethernet Port 1.
    1) Display the inspection interface in a web browser on the host.
    You can use the default Inspection Interface or design your own. (Tools>>Inspection Interface Configuration...)
    Then, go to Target>>Target Options. Select the Web Server category and enable the web server.
    You can then go to inspection mode and run your inspection.
    The inspection can be monitored from a web browser of a PC, where you type the IP address of the Smart Camera.
    2) Use shared variables.
    You can create an image shared variable (Tools>>Variable Manager). In the System Variable tab, create an image variable and share it.
    Set it using the Set Variable step located in the User Additional Tools palette.
    You can then create a VI on the host that reads this image variable (and any other shared variable) and displays it on your LabVIEW VI.
    This application note explains how to do that:
    http://www.ni.com/white-paper/12322/en/
    Hope this answers your question.
    Best regards,
    Christophe

  • Smart camera / vision builder data logging

    Hi
    I have Vision Builder 3.5 with a  NI-1722 Smart Camera. I have the inspection working as I need it to but I need to log the failed data. I just can not seem to get this to work. I have attached a couple of photos of the program and hope I can get some suggestion on what I need to do. What I am trying to do is inspect if the light is on and if one of the light do not come on. The data I need is which light did not come on and at what time this occurred. When setting up the data logging Icon I direct it to the folder I want and give it a name but nothing is ever logged. I have been trying to figure this out for about 12 hours now I need some help please.
    Thanks
    Gerald
    Attachments:
    controller.JPG ‏110 KB
    controller2.JPG ‏113 KB

    Sorry about that. Sent one from home and the other from work that why two different names. I will watch that next time and will rearrange the wording on the topic. I will try to do better next time.  But the fact is I would still like some help or suggestions with this if you have any Idea on how you could help I would appreciate it! Thanks Gerald

  • NI 1772 Smart Camera periodical​ly freezes

    I am working with a NI 1772 smart camera and Vision Builder AI 2013 and I am running an inspection that is time dependant.
    When running an inspection my camera will momentarily freeze or lockup or act really slow for a few seconds, then on it's own go back to running normal. Even running a simple inspection where I am just displaying this picture to the VGA monitor it will do this. I have tried adding delays to the loop thinking the CPU is getting overloaded with no improvement.  Runs good for about 60 seconds getting about 60 frames per second, then for about 10 to 15 seconds I only get about 1 frame per second, then suddenly returns to normal. This goes on like this indefinitely.

    Ok, following up on this issue. I have resoved it. First off, I was wrong about my simple "take a picture" inspection. It wasn't as simple as I thought. It still had a little custom VI, that listened on the ethernet port for a command to "take pictures". It was the VI reference that was the issue. Apperently because my network has so much traffic, it seemed to be causing the program to slow (perhaps to process traffic not related to the camera). Disconnecting from my main network proved the easiest solution. If I run my camera and machine on it's own isolated network, I don't have the issue. Thanks for everyone who read this thread and attempted to help.

  • Smart Camera Input reads low

      I have a 1722 Smart Camera.  I can't get the inputs to read a "high" value.  Other than this, my application works well.
      I'm using the NI cable and screw-terminal block.  If I jumper any of input 0 or 1 (pin 2 or 8) to +24V (pin5), still the inputs always read low, so I can never get past the step that waits for a "high" input before proceeding.  I used the data monitor as well while applying the voltages, but they always read "0".
      Note: the outputs also don't work; they always are at 24V even when set low (they have pullups to +24).
      The LEDs though work fine when I turn them on and off.
      What am I missing conceptually to have inputs read?
    Solved!
    Go to Solution.

    1)  Yes, it's the NI Vision I/O Terminal Block.  The power supply is a high quality 24V, 5A MeanWell regulated supply going into the terminal block.
    2)  The system itself works well (inspections are passed/failed correctly), so I don't think it's the power supply connection.  However, the power supply is connected to the +24V and ground terminals on the block (pin 5 and 15, I believe from memory)
    3)  I tried reading a few different ways.  (a) the Test Panel, which comes up when I double click the I/O logic block in Vision Builder AI (2011). I both shows the state, and also can chart the real-time values in a plot if the values are double-clicked.  (b) the VBAI application itself, where an exit condition from the very first state is waiting for a pin to go high.  This state never leaves, unless I set the exit condition to Low (which is what the system always reads).  I connect the two isolated input pins 0 and 1 (terminal 8 and 11 on the screw terminal block, again from memory) to +24V (terminal 5), so both inputs should be able to read High.
    4) The LED indicators cycle through their startup sequence, then the Power is lit as it should, and the status LED is on as well.  The Fail and Pass LEDs work as they should, as mentioned (they were programmed to show a pass/fail condition, and then reset at the start of the next inspection loop).
      The outputs also don't seem to work despite pullups to +24.  They always seem to be low even when commanded high. I think, though, that at one point they might have briefly worked, so I suspect I'm doing something fundamentally wrong...

  • Smart camera remote connection

    Estamos intentando conectar con el Vision Builder remotamente con una Smart Camera a través de Internet.
    Hemos abiertos los puertos 3363 (TCP/UDP), 3580 (TCP/UDP), 7749 (TCP) y 7750 (TCP) del router conectado a la Smart Camera dirigiendolo a la dirección IP de la Smart Camera (192.168.1.3 en nuestro caso).
    Sin embargo no hemos conseguido conectarnos (dice Unable to initiliza connection to remote target).
    ¿Qué podemos hacer?
    CUalquier ayuda será muy agradecida.

    Gracias por tu ayuda
    en NI Measurement and Automation Explorer cunado  he insertado la direccion publica del router y me detectado la camara , he obtenido informacion de la camara ( numero serie, direccion IP,modelo)  pero me esta indicando que esta desconectada, estoy seguro que la  camara esta conectada 
    Attachments:
    max.jpg ‏163 KB

Maybe you are looking for