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

Similar Messages

  • 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

  • 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

  • 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

  • Display image in Smart camera web interface

    Hi!
    I need some assistance with LV-RT. 
    What I have succeeded is to enalble the web server on NI 17XX camera and successfully displayed a VI with Image Display on it. I thikn I got the hang of it. 
    What I would like to know is there another way to display images on the camera web page. I really do not need the whole VI up there just an image and a string with serial number. One way I know would work is to write an image file to the system memory and then embed that image to the web page, but I am not sure that is the best solution as writing process takes time and it is not recommended to write too often to the program memory (am I right?).
    So, is there some way to assign some object to say a memory bank and display it (without having to install the runtime maybe) on the page?
    Thank you for your attention,
    Mart

    Hey Mart,
    Going back to your original question; are you looking to stream images to a web page from your smart camera or simple see what your camera is seeing when you go to a particular site? Take a look at the sample project below. It is sort of a work around, but it posts an image to a web service. Essentially it snaps an image, saves it, and then posts the saved image to a web service. You will have to change the file path for the image, then build and deploy the webservice from the project view. Also, it would be beneficial to take a look at the webservice build specifications. The webbing to view the snapped image from your local machine would then be viewable from your web browsers at the address : "http://localhost/Stream_Service/ShowImag"
    Let us know if you have trouble getting this example working. Also, perhaps another visit to what your end goal is would be helpful. What was it that you had working?
    Hope this helps
    -Ben
    Message Edited by BCho on 04-10-2009 02:27 PM
    Hope this helps.
    -Ben
    WaterlooLabs
    Attachments:
    SnapWebService.zip ‏14 KB

  • Saving a series of images (from a smart camera) into an AVI file

    Hello,
    I have a lab setup in which we view brain cell deflections in a well-plate after being pressurized with air for 50ms. I have a smart camera hooked up to an IMAQ PCI card to acquire images.
    I'm trying to save the series of images into an avi file, so that I can view the deflections in a slow video.
    The way I have it set up at the moment takes an image and saves it in an avi pre-existing (some random .avi that I didn't need) format. But here are some problems:
    1. I would like for the VI to create a NEW .avi, rather than saving it into a pre-existing one.
    2. Right now, each image simply overwrites the previous one in the avi file. So the resulting avi is a 00:00 length movie with a single image (the last frame that camera viewed).
    I have what I have programmed attached. Any help would be appreciated.
    Thank you,
    B.J. Kim
    University of Michigan
    Solved!
    Go to Solution.
    Attachments:
    forum.jpg ‏1438 KB

    Here is an updated version (attached). I kept trying to incorporate the examples you showed me, and I have made a little bit of a progress.
    It now saves a new avi file, and it's not a single image movie anymore. It's got as many images as I run the VI for. BUT, it only saves the very first image the camera takes and just loops it over and over again until I press stop. So the resulting avi shows a still image of the very first view of the camera for however long I ran the VI for.
    Any suggestions on how I can fix this?
    Thank you,
    B.J.
    Attachments:
    forum2.jpg ‏1190 KB

  • How to insert a table with variable rows in smart form

    Hi all,
    How to insert a table with variable rows in smart form?
    Any help would be appreciated.
    Regards,
    Mahesh.

    Hi,
    Right click the mouse->create->table
    If you want 5 columns, you need to declare 5 cells in one line type of the table
    Click on Table -> Details, then do the following
    Line Type 1 2 3 4 5
    L1 2mm 3mm etc
    Here specify the width of the columns as many as you want..
    then in the header/main area of the table, click create Table Line, Rowtype is L1, automatically 5 cells will come,In each cell create a text element, display the variable to be printed there.

  • Writing files is not supported on this device (smart camera 1722)

    Hi,
    I have a smart camera NI 1722 and I want to save images that I aquire. I use the "IMAQ Write file 2.vi" and I always get this error: "Writing files is not supported on this device". 
    Is the smartcam really doesn't support to write images in a folder? I've tried to change the path (on the smartcam and on our server) but I always get the same error.
    I use LabVIEW Real-Time 8.5.1, LabVIEW 8.5.1, NI Vision 8.5 etc (all the lastest versions of LabVIEW).
    Thank you for helping me,
    Stephanie

    Hello
    If you already flattened the image, you can now save it on the hard disk of the smart camera.  To load the image, you will have to un-flatten with an image again.  See the attached document to see the block diagrams.
    I did it for a template in a pattern matching program and worked!!!
    Good Luck
    Santiago Orellana V.
    HighLights - National Instruments Ecuador
    Attachments:
    Grabacion y recuperacion de imagenes en smart camera.doc ‏28 KB

  • Acquisition & saving with smart camera

    I couldn't find an example about saving sequence images to hard disk with Ximea smart cameras. 
    I have a RL50C smart camera. I want to acquire and save images to hdd. Since I don't have LabVIEW installed in this camera, I need to program it in a developing computer and then build aplication for runtime. I created a VI doing that with the webcam of my laptop.
    I wonder how can I edit this VI to work with my smart camera.
    Solved!
    Go to Solution.
    Attachments:
    Save Sequence.png ‏15 KB

    Hi there,
    Correct me if I’m wrong, you are trying to log the file into the smart camera’s hard disk? If that is the case then a simple VI of acquiring and saving to disk (make sure the file format is supported) should work on the smart camera, like the ones below:
    1. Community: IMAQdx Grab and Save Individual Files
    2. Community: Snap and Save Frame From IMAQdx Grab
    3. Community: IMAQdx: Save IMAQdx Sequence to AVI File
    Add the smart camera on your project, and here is the trick…if the camera has WES7, is just like another laptop with an integrated camera. If the camera has a real time OS then threat the device as a generic RT target.
    I hope this helps
    Alejandro | Academic Program Engineer | National Instruments

  • 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

  • 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.

  • NI smart camera 1764 Status LED Blinking

    I am using NI smart camera 1764. when i am giving 24 V DC supply to the camera then Power & Status LED is blinking continuously in RED colour. on the other hand pass & fail LED also blinking in RED & GREEN colour alternatively. i am not able to connect camera to my computer through ETHERNET cable & cannot use for my application. 
    Please suggest me the solution as soon as possible.

    Have a look at chapter 6 of this manual:
    http://www.ni.com/pdf/manuals/372429b.pdf
    Adnan Zafar
    Certified LabVIEW Architect
    Coleman Technologies

  • Smart camera 1764 Status & power led blinking

    I am using NI smart camera 1764. when i am giving 24 V DC supply to the camera then Power & Status LED is blinking at high rate in RED colour. on the other hand pass & fail LED also blinking in RED & GREEN colour alternatively. i am not able to connect camera to my computer through ETHERNET cable & cannot use for my application. 
    Please suggest me the solution as soon as possible.

    Hello,
    Have a look at this document on page 52 http://www.ni.com/pdf/manuals/372429b.pdf.
    It seems to be an application error.
    Try to boot your camera in safe mode with no app, using the switces.
    If you can connect, then try to reinstal using VBAI.
    Regards

  • 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

Maybe you are looking for

  • BIG n EVIL Finder Bug!

    After "converting" our last co-worker to Mac, she found (in astounding 45 Minutes OSX) an extremely evil Finder bug. Don't try it, it's no fun to correct if afterwards: In a normal OSX Finder Window, you can change the name of the home folder link in

  • Servlet - xml data storage best practice

    Hello - I am creating a webapp that is a combination of servlets and jsp. The app will access, store and manipulate data in an xml file. I hope to deploy and distribute the webapp as a war file. I have been told that it is a bad idea to assume that t

  • Error handling in static block

    Hello All, I have the following code static{ abc(); private static void abc() throws Exception{ how do I throw error in static block because if I write static { abc() throws Exception; it gives error during compilation. How do I handle it. Sachin

  • Question about locating library

    I currently have over 15,000 on my iPod. My G4 was hit by a power surge and my motherboard got fried. I believe that my HD is still good, however, can't get to it. I thought all of my MP3's were on external HD's, however, can't seem to find them. I a

  • Edit Mode On Open Property

    The question has undoubtedly been raised before, but I was unable to infer the exact solution to it from the semi-relevant entries already posted. I have the source code to a large EEG DAQ program that the developers have given.   When opening the pr