USB camera acquisition after a trigger

I need to setup a hardware
i will be using a conveyor belt and there will be coins moving on top of it linearly
the conveyor will be driven by a DC motor.
once the coin comes under my camera axis (sensed by an IR object sensor), my conveyor must stop and the image must be captured by the camera
please help me to code the software
-$hiv@

$hiv@ wrote:
Sir wat i planned was that when the object is found the motor of the conveyor must stop first , then the camera must capture the image for processing.
i feel it difficult to synchronise it.
I don't know what your system setup is there, but how about instead of stopping when the coin is detected, only move when the coin is not detected (and I guess for a short period after the image is taken). Then you can just take the image, and tell the conveyor to move again.
As to how to get the image taken only if the conveyor is stopped?
A case statement could work (not saying it's the best way).

Similar Messages

  • How do you cyclicly trigger data acquisition after n pulses counted

    Hello all, please forgive my ignorance because I am very new
    to lab view and data acquisition. I am working on a system which is going to
    scan an object and produce an image. The gimble that I am scanning the object
    with is an X-Y type of gimble with stepper motors on each axis. The stepper
    motor controller will output pulses real time to indicate the real time
    position of the gimble in each axis. What I need to be able to do is count
    pulses from the stepper motor controller and then output a trigger pulse to
    trigger the data acquisition in a buffered mode when N number of pulses have
    passed and then generate another pulse to stop the acquisition after another N
    number of pulses have passed. The controller puts out 10,000 pulses per degree
    of travel. The velocity that I am traveling at is 20 degrees per second, so
    timing here is really important. I need to be able to utilize the speed of the
    daq card and not so much the speed of the computer to iterate through a loop. I
    have tried using the count down feature in the NIDAQ MX library but it does not
    appear to be useful to me. I set it up and it will count down but once it hits
    zero it continues to count down. My expectation was that it would either
    restart the down count or it would stop. I was expecting some sort of trigger
    event to take place once the count reached the zero point but I did not observe
    any sort of event taking place. Once again my knowledge and background is
    really limited so I could be missing something really fundamental here. I have
    tried using some of the legacy functions which would enable me to do exactly
    what I want to do but they do not seem to work with my daq card. I have a NI
    PCI-6122 and if anyone has any knowledge on how to get this type of card to
    talk to some of the non MX functions I would be more than happy to hear how. It
    seems to me though, that I am limited to the MX functions which I can not
    really translate into what I have learned I can do with the legacy functions. I
    thank you all once again for taking the time to read this I and I will
    appreciate any and all responses that can be helpful.
    ~ Randy Brown

    I have run a few more tests and obtained some data per the request of a telephone support engineer. I have some scope screen shots that might be able to shed some light on what is going on. I will provide a brief description of what I discovered before I show the resulting data. I discovered that using the number of up ticks and down ticks suggested does not yield the right timing for the clock pulses that I will need for triggering my data acquisition. When I use 55 low ticks and 2 high ticks as my settings I end up getting a pulse every 32 pulses read on the PFI line. I get the same results when I interchange the numbers, for example, when I set the program up for 2 low ticks and 55 high ticks I get the same resulting one clock pulse per 32 pulses on the PFI line. I started playing with the numbers and come to find that I was able to generate a pulse every 57 pulses in this setup. I set the high ticks to 2 and the low ticks to 71 and once I did that it generated a pulse every 57 pulses in. The results are not ideal though, a number of things happen within the first second of operation. One mode of operation the clock output pulse latches after a few pulses generated. Another mode of operation that I noticed was that it would generate n number of pulses and then just stop even though the program was still running. The results I am getting are not reproducible when it comes to the long-term operation of the clock pulse generation but the bottom line is not matter what happens the end result after 1 second is not what is expected. I will show below screen shots of my program and also scope shots for the respective modes of operation.
    Front End interface
    Block Diagram
    55 High ticks and 2 low ticks results
    55 low ticks and 2 high ticks results
    77 Low ticks and 2 high ticks results
    Undesired Latch after 1 second of operation
    N number of pulses generated and stopped while program was still running
     It appears the the long term operation (and when I say long term I mean after a second) is intermittent, it either latches high or low after a random number of pulses are generated on the clock output. I am not sure why this is happening. The one setup that I came up with that generates a pulse every 57 pulses is not going to work for the setup that I have I think I would have to reduce the 71 to 69 in order to compensate for the two pulses that happen while the output pulse of the clock is high. To be honest I have no idea what is going on and I am starting to wonder about my daq card. Being that it is not really reproducing the same results I am starting to think maybe something is wrong with it. Another possibility is that it might be the bnc 2110 that I am using. I will try another one tomarrow and see if this problem persisits. I am leaving now so I won't be able to try that as of yet but I wanted to pass this info and data along such that maybe you will notice something and be able to lead me in the right direction. Thank you again for all of your help.
    ~ Randy Brown

  • Two Simultaneous USB Camera Image Acquisition and Saving

    Hello everyone,
    Recently my friends and I have begun a project which requires the simultaneous acquisition of images from two independent USB cameras. Throughout our project research we have encountered many difficulties. The major problem appears to be how to successfully interface two USB cameras and properly save the image to a median for further processing down the road.
    Our first attempted at this was with the USB IMAQ drivers. Unfortunately, to our surprise, it does not support two independent and simultaneous camera acquisitions. To combat this problem we implemented a crude loop of closing a camera reference, then opening the other, acquiring an image, then closing, etc... This did provide us with functionality but was very inefficient, resulting insufficient acquisition speeds.
    Afterwards we began looking at other ways of capturing and writing the image, which are listed below.
    Various Acquisition Interfaces / Strategies
    USB IMAQ Driver - USB interfacing kit available for public download, (not officially supported by NI) zone.ni.com/devzone/cda/epd/p/id/5030
    Status - Abandoned because of the lack of dual web camera support
    Avicap32.dll - Windows 32 DLL responsible for all web camera communication, and other media devices.
    Status - Currently acquired two streams of video on the front panel but with no way of saving the images
    Directx - The core Windows technology that drives high-speed multimedia on a PC.
    Status - Currently researching.
    .NET - Microsoft .NET framework, possibly a valid interface to a video stream.
    Status - No development until further progress.
    We are still currently developing the Avicap32.dll code but the major bottleneck is the learning curve on the property nodes, library calling nodes, .NET and other references. So far it’s been a tedious effort of trying to understand example code and piece them together. As a former programmer of C I know this is not the proper way of writing code web I can’t seem to grasp how these functions work. (Property nodes, library calling nodes, .NET and other references). Learning this may allow us the knowledge to code a proper system. Does anyone know any good tutorials or learning material for such functions? So far my research has come up empty handed.
    We are currently working with these interfaces and other reference examples on the NI site. Unfortunately we cannot seem to properly integrate the code for our system. Does anyone know if this setup is even possible? Also, if anyone has any experience with similar systems and can offer advice, code snippets, or any other assistance it would be greatly appreciated.
    Our current projects will be posted below if you have any suggestions. (More will be added when I get to my desktop tomorrow)
    Two Camera Avicap32.dll - Currently stuck on how to save the image, various tweaks have gotten us stuck at this point ( will have another Avicap32.dll implementation posted tomorrow)
    USB Capture Example - This USB capture VI was an example that immediate had problems. We used it as a baseline for crude open-close camera image grabbing system. (Will also be posted tomorrow)
    Thanks for any help, it's much appreciated.
    Taylor S. Amarel
    Thanks,
    Taylor S. Amarel
    Learning is living.
    Co-Founder and CEO of http://3dprintingmodel.com/
    "If we did all the things we are capable of, we would literally astound ourselves."
    -Thomas Edison
    Attachments:
    Two Camera Avicap32.dll.zip ‏84 KB
    USB Capture Example.zip ‏17 KB

    Thanks for the information but that's not exactly what I'm looking for. I've been to that URL and read the information before. I don't mean to disparage you help but I'm looking for ways that I can successfully implement a functional system, not information on an unfunctional method. Maybe I was unclear before, I'm looking for any advice, knowledge or help on how to make this system properly work.
    Thanks, have a great day.
    Taylor S. Amarel 
    Learning is living.
    Co-Founder and CEO of http://3dprintingmodel.com/
    "If we did all the things we are capable of, we would literally astound ourselves."
    -Thomas Edison

  • Need to know how to disconnect the camera Nikon Ds3 (USB cable) properly after uploading images through bridge-do not want to lose images on compact flash card.

    Need to know how to disconnect the camera Nikon Ds3 (USB cable) properly after uploading images through bridge…do not want to lose images on compact flash card.

    Give #navbar a width that is wide enough to hold all of the buttons within it.
    #navbar {
         width:####px;
    Replace #### with a pixel number large enough to hold the nav buttons.

  • Get an image from USB cam without NI VIsion Acquisition

    HI
    I am looking for a way to capture images from USB cam without using a paid library ImaxDx for Labview.
    Have you any ideas?

    Hello MaxEngee
    Off hand, I suppose you could run the third party capture software in the background and have a LabVIEW scan the target directy for changes/new images and import the image as necessary.
    In the mean time, if you install the NI Vision Acquisition Software, you do have a 30-day trial period so perhaps you may consider exploring the environment to see if it is right for you.
    NI Vision Acquisition Software 2011.09 - Windows 7 x86/XP/Vista/7 64 bit
    http://joule.ni.com/nidu/cds/view/p/id/2625/lang/en
    Thank you for choosing National Instruments!
    Sincerely,
    Greg S.

  • How to capture image from USB camera in Labview 2010

    Hey all,
    I am very new to Labview but am working on a project that requires me to use a sensor to send a signal to Labview to capture an image from a USB camera and save.  Then apply some image processing to do some geometric calculations.  The calculation will be based on pixels so I guess the image needs to be in bitmap form.  Right now I am just trying to start with the image acquisition part and was wondering if this can be done in Labview 2010.  I have the vision toolbox and NXT Robotics.  Are there any examples on this website that will help and do I have te proper tools to do this?  Once I get the image capture/grab to work using labview, then I could work getting a sensor signal to trigger that capture and finally the processing side. 
    Like I said, I am very new to this so I am not sure if I need to download any particular drivers or vi's that I am missing or what those might be.  Can someone provide some insight, links, or any help would be appreciated.
    Thanks in advance for any help/suggestions.

    Hi wklove,
    In order to do vision with LabVIEW you need to to have the Vision development module and have NI Vision Acquisition Software (VAS) installed. It sounds like you are missing VAS you can download it here. Once you have this installed you should be able to see your camera in Measurement and Automation (MAX). After you are able to see the camera, take a look at the NI Example Finder by going to Help » Find Examples
    Joe Daily
    National Instruments
    Applications Engineer
    may the G be with you ....

  • Problem regarding the transmission of video Through TCP/IP acquired from USB camera

    I want to transmit video using TCP/IP protocol acquired from USB camera. Acquisition is done well but when I place the TCP VIs in the acquisition VI then the trouble begins and I can’t even get the video in that particular VI which was acquiring video and working fine previously.
    Interesting thing is that both Cam Server and Cam Client VIs was transmitting video in the very first run. After that I don’t know what happened.
    I am using lab view 8.2.1.VIs are attached.
     Please help me out.
    Regard,
    Aftab
    Attachments:
    Cam client.vi ‏49 KB
    Cam Server.vi ‏67 KB
    camera.zip ‏66 KB

    Hi Shoaib,
    Here's an example I was testing mixing IMAQdx and the Simple TCP/IP Messaging Protocol (http://zone.ni.com/devzone/cda/tut/p/id/4095) to send up a video client/server app with a USB camera that I was testing with.
    Attachments:
    video client.vi ‏41 KB
    video server.vi ‏22 KB

  • Disconnected USB Camera Displays in MAX

    I have a USB camera that shows up in NI-IMAQdx devices in MAX even after the camera is disconnected.  MAX displays the camera serial number.  When Grab is selected, get Error 0xBFF6901B timeout.
    Any ideas??

    Thanks for the update.
    -Does MAX give same error when camera connected?
    -What are the acquisition parameters?(Post screenshot when error occurs).
    -I am not sure of this. Might be MAX database got corrupted and resetting it might solve the problem. Ref following link to reset MAX http://digital.ni.com/public.nsf/allkb/2C7480E856987FFF862573AE005AB0D9
    Thanks
    uday,
    Please Mark the solution as accepted if your problem is solved and help author by clicking on kudoes
    Certified LabVIEW Associate Developer (CLAD) Using LV13

  • MAX cannot find two usb cameras at same time

    Hi,
    I want to use two usb cameras (Thorlabs DCC 1545M) in NI-IMAQdx in Labview, but it can only find one camera (the one plugged in earlier), and also only one camera is shown in MAX. Both cameras works in the software from the manufacturer, and if I unplug the 1st camera, the 2nd will show up in MAX after a refresh. 
    I found online that up to one camera is supported for each USB hub in Labview, and all USB ports in this computer are corresponding to a same hub. I don't know if this is causing the problem.
    Actually I don't need to take picture in both cameras at the same time, a programmed switch between the two cameras will work for me. 
    Any suggestion and comment will be appreciated.
    Solved!
    Go to Solution.

    Hello JYang,
    According to this link, you can acquire from multiple USB cameras simultaneously.  The limitation is on the manufacturer and how they interface with the DirectShow bus.  When you are using two cameras of the same make and model, it is sometimes the case that not enough information is present for IMAQdx to distinguish between the two cameras.  When you switch the cameras in MAX, do they come in as different cameras, or do they show up virtually the same?
    Since you said switching between them would work, I found an example that does just that.  Just make sure to give each camera a unique camera name.  Hopefully this will be useful for you.
    Also, there is quite a bit of discussion on this topic available on the discussion forum already.  Check out these related threads, or use the Search box to search for more.  There is quite a lot of information available!
    http://forums.ni.com/t5/LabVIEW/multiple-USB-cameras-in-Labview/m-p/833517
    http://forums.ni.com/t5/Machine-Vision/two-USB-camera-identification/m-p/2193960
    http://forums.ni.com/t5/Machine-Vision/Synchronized-capture-for-multiple-USB-cameras/td-p/1879647
    http://forums.ni.com/t5/LabVIEW/Multiple-USB-Camera-Image-Acquisition-using-Vision-Acquisition/td-p/...
    Patrick
    CLA

  • From Analog CCD to NI-IMAQ for USB Cameras?

    I installed the NI-IMAQ for USB Cameras to obtain video feed from a SONY CCD camera in real-time. This camera only has the S-Video analog output so I used a Plextor PX-TV100U A/D converter to transform this signal to USB feed. It worked at first but after running my Vision VIs a couple of times NI-IMAQ could no longer establish a connection with the camera. And as I shut down my LabView 8.5, the whole computer rebooted automatically. The error messages from LabView 8.5 varied from "Not able to establish a connection to the camera... might be in use" to "No video driver installed...". None of it made any sense because the VI worked sometimes without errors. And the same thing happened to all three computers in my research lab at Tufts University.
    I realize that my camera is going through a signal conversion before the USB, but why would NI-IMAQ for USB Cameras crash the whole computer? Also, is there a way to control my camera shutter speed from NI-IMAQ? I thought perhaps the camera wasn't setup right for the image acquisition. Help!!

    Hi HTL,
    IMAQ for USB only works with cameras that are DirectX compatible.  Can you be sure that the information coming out of the A/D converter is compatible?  Also, when you say "it worked at first" what exactly do you mean?  Were you able to do image processing on images brought in via the camera?  If you had Measurement and Automation Explorer (MAX) open and the camera selected at the time you tried to run a program that called the camera, you should get an error like you saw (Not able to establish connection).
    Wes P
    Applications Engineer
    National Instruments
    Wes P
    Certified LabVIEW Developer

  • How to capture an image from my usb camera and display on my front panel

    How to capture an image from my usb camera and display on my front panel

    Install NI Vision Acquisition Software and NI IMAQ for USB and open an example.
    Christian

  • Can I use a USB camera to import directly live footage into imovie as opposed to firewire?

    Hi!
    I use iMovie to directly import live footage from my camcorder.
    I've been using old Mini DV cameras to do this but this technology is being outdated with camera manufacturers now all moving to USB.
    Can I use a USB camera to take live footage directly into iMovie just the same was as i've been doing with the firewire connection via the old Mini DV camcorders.
    Alternatively, are there any firewire camera's that any could reccomend?
    Any help or suggestions would be greatly appreciated.
    Chris.

    No, you cannot import in real time from USB. These USB camcorders will import faster than real time or slower than real time, depending on the speed of your computer.
    If you need to import in real time, there are some USB webcams out there that are used mainly for video chats and the like that might work. You may find an HD model.You can also do this with your built in iSight camera.
    With a real HD video camcorder, you will need to import it after you shoot.

  • How can I use a USB camera with cRIO 9022. Please see my strange problem.

    Hi,
            I would like to use a USB camera with NI cRIO 9022. I used the same USB camera with NI USB 6216 DAQ device and developed a VI(within a PROJECT and outside it). So, It is working fine with NI USB 6216 device when I use the Vision Assistant Express VI and gets detected in its Initialization Window.  Please see JPEG File 3 where I get NO ERROR.
            I am facing a problem when I want to use it with NI cRIO 9022. What exactly I am doing in this case is:
    1) Create a NEW PROJECT
    2) Add Targets and Devices(NI cRIO 9022)
    3) Use the Scan Interface mode
    4) Create a NEW VI under the cRIO 9022 device 
    5) Use a Timed Loop(Synchronized with Scan Engine) for continuous Data Acquisition and Sending from the Analog I/O modules.
    6) Use the Vision Assistant available through the NI Vision Acquisition 2010 Module(I get STUCK HERE! The Express VI opens the Initialization Window, but I don't see the USB camera like in JPEG File 3)
    I am facing difficulties with this HOST COMPUTER, cRIO implementation differences. On my host computer I have the software packages as shown in JPEG File 1, and on my cRIO 9022 as shown in JPEG File 2.
    Can someone guide me how to overcome this and get the USB camera detected when I am using NI cRIO 9022?
    NOTE: If this is a problem with software mismatches on HOST and NI cRIO 9022 device, please see JPEG Files 1 and 2 for available software and Host and cRIO 9022.
    Thanks.
    Amar.
    Attachments:
    NI Vision Acquisition Express Error for NI cRIO 9022.JPG ‏39 KB
    IMAQ and dx Modules Installed on my NI cRIO 9022 hardware(No NI Vision Acquisition 2010 SP1).JPG ‏82 KB
    NI Vision Acquisition Express NO Error for NI cRIO 9022.JPG ‏48 KB

    Only GigE comms are supported on the cRIO Real Time OS. Have a look at the following:
    Machine Vision on NI CompactRIO and Single-Board RIO
    Adnan Zafar
    Certified LabVIEW Architect
    Coleman Technologies

  • Can't see pictures from Ipad in Windows Explorer (usb camera)

    When I had around 3000 pictures in my Ipad, there's no problem to delete all at once from windows using the explorer and the ipad as a usb camera. But now I have around 6000 pictures and when I try to see the pictures, windows shows two messages: 1 the usb camera is busy and the pictures can't be accesed and the second message: 0 objects in the image folder is empty (zero pictures).
    I don't understand: there's a problem with the number of pictures? Why with less pictures everything works fine? Why I can't select ALL the pictures from a event to delete ALL at once.... the instructions to select more that one picture it doesn't work for me.
    The issue with the pictures is draving me crazy! The soluction to select the pictures one by one is just "insane".
    Help Please.

    It really works!! (Thanx God)...
    I was making a mistake while pressing the first picture. There's such kind of technique in the way put both fingers at once. If one finger touch the screen first it doesn't work. it needs a little bit of pressure but not too much. Anywary after a couple of minutes of "training" I can delete many pictures with the minimal effort.
    Maybe in the future the "Select All" option will appear to solve this issue at last.
    Thanx for the help... This is a really good advice.

  • Which audio interfaces are compatible with a Lightning to USB Camera adapter???

    Would like to use my iPad Mini with Lightning Adapter in conjunction with an audio interface. What are the requirements for a device that would accept the adapter (what type of USB input/output). Thanks!

    It should work.
    Reset the iPad. Press and hold both the Home button and the Sleep/Wake button continuously until the Apple logo appears. Then release the button and let the device restart. You will not lose data doing this. It's like a computer reboot.
    And, just is case, did you remember to turn the camera on after it was connected to the iPad?

Maybe you are looking for

  • Vendor Account Balances

    Hi Experts, I want to get both opening and closing Vendor balances by period wise. I know the tables are BSIK and BSAK, but I would like to know whether any FM's or BAPI's available for an efficient way to generate the reports. Pls advise. thanks & r

  • Service Registry 11g with SOA Suite 12c?

    Hello, I'm currently working on a project which requires SOA Suite and BPM 12.1.3 and databases 12c. Question 1 : I didn't find a Service Registry 12c release, is it included in another 12c middleware product or do I have to work with Oracle Service

  • Composite Application in Adobe AIR?

    Hello All,                 We are trying to build a solution in Composite Application that could be deployed in desktops and mobile. We are thinking that such an application would need to be an air package that run seamlessly. We have a few questions

  • How to change "send statements" to each customer

    Hi, Currently we are using send_statements attribute through concurrent request to change appropriatively for each customer. We are unable to group them into different classes and that's why we are following this approach. What I am thinking is, inst

  • Boot load failed, fatal SCSI error, disk read error, Elf64 read error

    Just came from vacation and started the Unix Solaris system from work. Unfortunately I get these errors that you can see in the image: Can someone tell me what is the problem? Until now I didn't had this issue before. Thanks!