Acquisitio​n.GetLastI​mage based on Gige camera external trigger doesn't give me the latest image

I am planning on using the camera's trigger input to start capturing the image. I have 4 cameras, but I only need 1 image each time. \
Here are the steps I am using:
1.  Set the camera to exteral trigger
2. PLC send the trigger to camera to take the picture
3. Read the image from camera.
It only works for the first time becasue it can get the first image, then never refresh the image again..
Here are the sample codes I use:
                     _session = New ImaqdxSession("Name")
                    _session.Acquisition.Configure(ImaqdxAcquisitionTy​pe.SingleShot, 1)
                    _session.Acquisition.Start();
                    _session.Acquisition.GetImageAt(_currImage, 0)
The piece of code is running when the PLC sends the trigger to camera. I was wondering whether it might be caused by no image was taken at that time.
I also tried
               _session.Acquisition.GetLastImage(_currImage)
Same behavior..
The strange thing is if I change the codes like the following
                    _session = New ImaqdxSession("Name")
                    _session.Acquisition.Configure(ImaqdxAcquisitionTy​pe.Continuous, 1)
                    _session.Acquisition.Start();
                    _session.Acquisition.GetLastImage(_currImage)
It only works when 2 trigger sent from PLC. Should I use _session.Acquisition.GetNextImage(_currImage) instead?
Question:
How I do know the new image is arrived?               

How are you running the repeat acquisition? I assume you are running it a loop of some sort. Are you closing the IMAQdx session at any point? This will help understand why we are seeing the behavior you are getting.
Cameron T
Applications Engineer
National Instruments

Similar Messages

  • My Olympic camera SD card doesn't fit into the SD card camera reader. Apple advised me to purchase the product in order to import photos to my IPad.

    My Olympic camera SD card doesn't fit into the SD card camera reader. Apple advised me to purchase the product in order to import photos to my IPad. How do I over ride this problem. How do I import photos from an Olympus FE-340 directly to my IPad?

    Your camera uses an OLympic XD picture card http://www.amazon.com/Olympus-xD-Picture-Memory-202332-package/dp/B002LC2DQ4/ref =pd_sim_sbs_p_1 This card has different dimensions compared to an SD card.
    You should be able to plug the cable that came with your camera into the camera connection kit to import the pics.
     Cheers, Tom

  • My father in-law bought an iPhone 4 awhile back and has been taking a lot of pictures with his phone and it's worked but now when he opens his camera it doesn't give him the option to use his front camera?

    Why will his phone not give him the option of using his front camera?

    Also, the iPhone is not a Storage device... has he been Backing Up Regularly...
    How to BackUp  >  http://support.apple.com/kb/ht1766

  • What web cams are compatiable with an imac on the latest software version?

    Hi There
    Does anyone know of a cheaper web cam than the isight? There are many different makes but i cannot find any that are compatiable with latest version of operating system.
    Thanks for your help
    Simon

    Hi Simon,
    There is this Apple Doc http://www.apple.com/downloads/macosx/drivers/firewirewebcamdriver.html
    It lists this page http://www.ioxperts.com/devices/webcam.html
    If you are going for a USB cam you will need http://www.ecamm.com/mac/ichatusbcam/
    It has a Camera list page http://www.ecamm.com/mac/ichatusbcam/configs.html that links to drivers if the one that comes with the camera does not work.
    Logitechs seem popular.
    10:01 PM Sunday; May 14, 2006

  • Gige Camera slow initialization

     I 'm using a Aviiva EM1 GigE camera with Labview 2011. I insalled the latest Imaqdx driver. I can acquire without problems images. However the initialization of the camera takes about 38 sec with Max or Imaqdx Open. When using Gevplayer (Pleora) it takes only 10 seconds. What can I do to speed up the initialzation in Labview ?
    Regards

    Hey,
    how about your network settings and all. have you enabled Jumbo frames? If yes, then there must be an incompatiblity of both ev2 and LabVIEW.
    Sasi.
    Certified LabVIEW Associate Developer
    If you can DREAM it, You can DO it - Walt Disney

  • ACE GigE - external trigger - example needed

    Hello,
    I have a CVS-1457RT with a Basler ACE GigE cam - I am having issues when I try to use a hardware trigger for the camera (thru the I/O connection on the camera)
    I've been trying for a few days now, so I decided it was time to ask here
    - have anyone used a similar setup, meaning the camera with external trigger? (controller is not the issues) and would it be possible to share the acquisition VI's?
    best regards,
    Henrik

    Hi Ehlert,
    Sorry you are having problems getting this to work!
    There are a few things to keep in mind when configuring the triggers....
    You will need to enable the trigger on the Ace camera to trigger the specific event (Frame Start) that you want to occur on the specific trigger signal. You might want to consult the Ace user manual for the specifics of doing this, as they have quite a number of options for how the trigger can be configured. Are you using the 1457RT to send the signal to the camera? If so you will then need to configure the 1457RT to send an appropriate trigger. We have some Vision RIO examples that show how to do this. Keep in mind that you also may be experiencing a hardware setup issue. If you are using the isolated outputs on the CVS you will need to provide external power for the outputs to work. It is probably helpful to examine your physical trigger line with a scope and verify thaty the trigger signal is going when you expect, allowing you to isolate which end is not configured appropriately.
    In general, assuming your trigger signal to the camera is working, setting the camera up for triggering is pretty simple:
    -Set Trigger Selector to "Frame Start" (to set context for the other trigger features)
    -Set Trigger Source to "Line1" (only option on Ace GigE)
    -Set Trigger Mode to "On"
    -Set other related features (rising/falling edge, delay, ...)
    Eric

  • How do I remove the "mirror" image on the front camera?

    After I take photos on the front camera to say a "selfie" the image is then flipped and saved. I research online and people say it's what the camera sees (like looking into a mirror) and that's how we really look in real life but I can prove this to not be true!! Here is why, I have a beauty mark on my face on the left side and when I take a selfie my iPhone saves it to show it on the right!! And when I look into an actual mirror it's obviously on left where it should be not on the right!! IS THERE a way to remove this on the new iPhone?!? All apple product seem to do this!! iPhone, iPads even my Mac! But this not true on regular cameras. HELPPP this issue is making me not get another iPhone for I travel for a living and take tons of pics.

    iPhone 5 plain.  iOS 7.1.2.  Virgin Mobile.  Had it about a month.
    I noticed that all of the selfies I had taken with Instagram were reversed.  This was odd to realize; I have had the phone for a month, and when I see a reversed selfie it looks normal to me ... I part my hair on the left, and I didn't notice that all of my avatars for things had my hair parted on the wrong side.  I was reviewing some Facebook photos and it was very obvious that some of my pics have my hair parted on the wrong side.  It was kind of weird figuring out that the ones that looked right were the wrong ones...
    So I played around a bit.  With the built in camera app, when I am framing a selfie, it sure would be awkward to try to center yourself in the picture if the image wasn't reversed.  I've had devices with front-facing cameras where you could un-reverse the image, and it is quite disorienting to try to center yourself.  So I get WHY the image is reversed (one of the reasons at least).  I noticed too that when I snap the selfie with the built-in camera app, that the picture un-mirrors as it takes.  There is a brief animation as the image flips side-to-side.
    For me and my phone/situation, it is when I use Instagram to take pictures from the front-facing camera.  Instagram just seems to grab the actual image from the screen, and not do the un-mirroring that the built in photo app uses.  So, my solution is to not use the Instagram app to snap the actual selfie, but to use the built in phone app to take it, then afterwards I open the photo in instagram and do my tweaking.  Just slightly less than elegant for now, I am hoping that a future Instagram update will give you control on whether to un-mirror the front-facing camera.  But I see this as my phone working correctly, and the app itself being the thing that is buggy.  In my case.
    -Steve

  • My iPhone 4s keeps showing more space being used for photos than i have - i have deleted cache folders, unselect and reselect in iTunes and nothing appears to work my iPhone still shows 6.5 gig use of photos when i only have the  camera roll listed

    my iPhone 4s keeps showing more space being used for photos than i have -
    i have deleted cache folders, unselect and reselect in iTunes I read one post
    where they said keep syncing and in a couple days it would correct itself, that
    hasnt happened.  I have see others have the same issue but no solution and nothing
    appears to work my iPhone still shows 6.5 gig use of photos when i only have the camera roll listed

    i thought the photo stream only holds 1000 i usuaaly take each month and save them to iphoto but if thats the my ipad should say the same amount and it doesnt - it shows 2.5 gig which is correct for iphoto.  and i havent ever had that much but if for some reason icloud has that much saved how do i delete and again if it does why doesnt ipad show that amount _ HELP!

  • Issues with acquiring from multiple GigE cameras

    Hi,
    I'm trying to build a simple app where three cameras are running simultaneously and can optionally record AVIs with timestamped data appended to each frame. I'm not having the recognition issue (all three cameras are seen through either a network bridge on the PXI system I'm using or an external GigE switch), but they seem to be failing during the grab process. When I have more than one running, green noise in the form of horizontal lines appear on the images, and usually all but one of the cameras will eventually drop out. No such problem exists when triggering only one camera. It seems a lot like the frames are colliding somehow; can grabs from multiple cameras not occur in the same loop?
    As for the program set up, it's mainly a modified version of the "write" case in the AVI Read/Write with Data example. The user is prompted to save the avi's and a text file, three camera and IMAQ sessions are opened (with unique names), and then the program loops until the stop is hit, with a true/false case for actually recording the data. Frame/sample rate is controlled by the millisecond timer wait function. The problem happens regardless of acquisition speed (even at 1 frame/sec), and the CPU nor the network link seem to be anywhere near fully taxed. 
    Thanks,
    Brian

    Thanks for the suggestions guys.  I put the packet size back to 8000 on both cameras.  So far, I'm still seeing green horizontal lines.  Here's what I've tried and what I've learned.
    1.  Set Acquisition Mode in VBAI to Continuous - Immediate
    2.  Tried to reduce the bandwidth demand of the cameras by setting Acquisition Frame Rate (Abs) to 3.0
    3.  Checked the Device Max Throughput under Transport Layer in MAX
    a. Color Pilot camera is 30.4 MB/sec
    b. Mono Pilot camera is 11.1 MB/sec
    4.  Checked the Bandwidth Assigned under Transport Layer in MAX, and it is 125 MB/sec
    5.  Add 30.4 to 11.1 and get 41.5 MB/sec so there is 83.5 MB/sec bandwidth available.
    6.  Subtract 5 MB/sec for overhead and 6 MB/sec for each camera for Bandwidth Reserve (set at 5%) and there is still 66.5 MB/sec left over
    7.  Open VBAI, and then open an inspection in which the Mono camera is configured (mad sure to load the defaults that were saved in MAX)
    8.  Launch MAX and try a Grab from the Color camera
    9.  See green lines of death.... 
    So, I've narrowed my experimentation down to just two cameras and I still have acquisition problems.  I've got to be missing something else.  Note that there is no camera attribute section called "Advanced Ethernet" only "Transport Layer".  Perhaps that was camera-specific.
    I think I'm going to have to use dedicated Ethernet ports for each camera.  It is disappointing since this architecture should work given those bandwidth concessions made for frame rate.
     - Dan

  • GiGe camera waits till there is a TTL signal takes a picture and then waits again for another TTL signal (IMAQdx)

    Hello , I have a problem with a GIgE AVT camera.
    All I want to do is make the camera wait and each time there is a TTL signal snap a picture and save it to the disk.
    I have spent hours and hours trying to make this work but I had no luck !
    Could someone with knowledge of the IMAQdx drivers help me please !?
    I really can't find a solution to this problem!

    Hello LaThoS, 
    thanks for your reply .
    What i am trying to do is use an AVT GS660 which actually has a hardware trigger input and all i am trying to do is put it in a while loop and make it wait untill there is an external ttl signal, then take a picture , save it and then wait for another ttl signal !
    I 've seen the examples but i cannot see how they are going to be usefull to me since there is no hardaware ttl signal on the cam( https://decibel.ni.com/content/docs/DOC-15346)
    I am attaching my sample code.
    Could you please help me figure it out ?
    Thanks in advance,
    yannis.
    ps:the problems that i am facing is that on ttl the camera starts saving the same image continisously till i stop the loop !
    Attachments:
    AVT_v5_NI.vi ‏75 KB
    enum.ctl ‏4 KB

  • Trying to detect GigE camera(TM-​1405GE) in MAX

    My company recently bought a new camera.  It is the TM-1405GE by pulnix.  This camera is a GigE camera and I have already installed the software that comes with the camera and can aquire images with that software.  My problem is that when I try to use labview or MAX I cannot detect the camera.  Under the software section of MAX it says I have IMAQdx software but under the Devices and Interfaces folder there is no NI-IMAQdx Devices tab.  I have also tried just righting a simple VI using IMAQdx to aquire an image but the camera isn't being detected.  Any suggestion would be much appreciated.

    Well, MAX is the place to look for the cameras.
    We had issues with Dalsa cams and I kept nagging with the local reseller until it was fixed. The problem was that the camera wasn't fully GigE compliant, the same be with yours.
    See here for more info
    Maybe you have to switch the camera for another software backend?
    Ton
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

  • Multiple channels from GigE camera

    Hello NI Folks,
    I am using a GigE camera for my Machine Vision application. I have to save data from all three channels coming out of Camera.
    I am using Example VI from National Instruments 'Grab and Setup attributes.vi' to get attributes and save Image. But the problem is this example VI has capability only to grab data from one channel. Anyone please give an idea for Which part of thIS example VI should I edit to grab all the three channels ??
    I checked this issue even in MAX. I selected all three channels in MAX and tried to take a snap from camera, but there is only one image captured, there is no option in MAX to view all three channels. I am attaching the MAX scrrenshot below which shows all the channels from my GigE are activated
    How to make Labview to read all the three channels from camera ??
    Regards
    Neo.

    Hello Mr.Alexander Glasner,
    This is the camera I am using
    http://www.automationtechnology.de/cms/index.php?id=243&L=1
    It is used for Laser triangulation technique. this camera gives out  3D data in one channel, Intensity data in other channel, grey scale Image in third channel. All these these channels comes out ofcamera through a single Gigabit Ethernet.Camera manufacture provided a software with which streaming of desired channels is possible. But I want to do it in Labview. Is there any block in IMAQ library to isolate these channels from GigE Interface ?
    My point with MAX is, MAX is able to grab all the attributes including its channels names DC0,DC1,DC2. But it is not able to display three channels seperately when selected.
    Regards
    Neo

  • Problems acquiring and saving multiple camera images using a switch with GigE cameras

    Hi Folks,
    We are having an issue with connecting 6 GigE cameras via an Ethernet switch. We can acquire and store individual cameras but once we increase the number of cameras we end up with jumpy avi files.
    Each camera has been physically labelled and attached to the switch, so camera 1 is attached to port 1, which then corresponds to Cam1 in MAX. When recording multiple files what appears to happen is that the avi file from cam1 actually has images from multiple cameras, as if cam1 is being renamed/allocated on each frmae and each time a different camera is allocated. How can we fix this?
    We are new to this so any help or advice would be much appreciated.
    Thanks in advance,
    Cathy
    Attachments:
    Camerad.png ‏60 KB
    Camera.vi ‏91 KB

    I think your problem is caused by using the same image name on each instance of Imaq create. "Grab and Save to AVI Acq" being the string you are using. I am pretty sure If you make each image name unique you wont get image referance problems.
    Senior Software Engineer
    www.Adansor.com

  • Triggering a GigE camera

    Newbie question for you all.  Hope this makes sense:
    At the moment, we are using a Dalsa area scan camera and a NI PCI-1424 frame-grabber with a parallel digital interface.  We use LabVIEW and IMAQ software.  Our software creates an IMAQ session that sits and waits for a single external trigger on the PCI-1424 board.  When it receives the trigger, we acquire a series of frames at a given frame rate.
    Now we want to upgrade the whole system and are considering a GigE camera from Basler (Pioneer piA640-210gm).   If decide to do this, how would we configure the triggering? 
    I noticed that NI's GigE board (PCIe-8231) does not have any trigger inputs.  So I guess the only way to trigger the acquisition is to use the camera's trigger input?  But that doesn't even seem possible.  The user manual on the camera indicates that external triggering is used when you have a pulse train that triggers every frame.  We want the camera to wait for just one rising-edge which then triggers a pre-determined acquisition that is setup in the software.  Any ideas how to do that with GigE?
    Also, we use NI-IMAQ software right now.  If we upgrade to GigE, then we are going to have to totally re-write our software to use NI-IMAQdx, right?
    - John

    Hi John,
    With Firewire and GigE cameras the triggering is generally* done on the camera rather than the interface into the PC. The reasoning is that the interfaces into the PC do not have low-latency, deterministic methods to trigger the camera except via a separate external trigger wire linking the PC and camera. (*With Firewire since you are bound to the distance limits of the bus, it is generally easy to make this connection than GigE). NI does sell products like the 8255R (a firewire interface combined with reprogrammable I/O suitable for use with triggering cameras via an external cable, but there is no device that combines this functionality with GigE ports (but no reason why you can't combine with a separate GigE network card). However, as I'll desribe below, GigE Vision has its own tricks that reduce/eliminate the need for this...
    With the triggering moved to the camera, it is up to the camera vendor to decide the complexity the triggering methods they implement. On GigE Vision cameras, because they use GenICam XML files to allow the cameras to self-describe their features, any capabilities the camera manufacturer can dream up will be exposed through the driver. We are starting to see GigE cameras on the market with very complex triggering capabilities (including built-in pulse-generation capabilities, complex input and output interactions, etc) that can rival features on many framegrabbers. You can configure all of these features within MAX or your application just like you can control any other feature of the camera. Note that while there is flexibility to implement any feature desired, there is a "Standard Features Naming Convention" that, among other things, includes complex triggering definitions. This list aims to ensure that cameras that implement the same features (such as common triggering modes) use the same names and behavior for their features.
    As to whether the Basler Pioneer will support what you want, I am unsure. I checked the triggering capability here: http://www.baslerweb.com/downloads/17785/pioneer_manual.pdf. According to their docs, they support an "AcquisitionStart" trigger, meaning you should be able to trigger the start of a single-frame, multi-frame, or continuous acquisition when that trigger comes in (and the source can be varied, including external I/O pins). However, I tried this on a Basler Scout that we have and only a single frame was generated in this mode when triggered via a software trigger. Its possible I have an earlier firmware that is behaving incorrectly, but in theory the Basler camera should be able to do what you want if they named it correctly. I would confirm the expected behavior with Basler to be certain. As I mentioned, there should be plenty of other cameras on the market that do support this triggering mode if the Basler does not.
    With regards to re-writing your software for IMAQdx, its true that you would have to make the translation from IMAQ code. However, the API's are very similar for most things and code porting shouldn't be too bad.
    Please let me know if you have any more questions regarding this,
    Eric G

  • Triggering GigE Camera with Hardware Trigger

    Hello,
    Here is an outline of what I want to accomplish:
    -LabView program starts running and waits for GigE camera to output frames
    -Hardware trigger leads to GigE camera outputting frames
    -Some simple arithmetic is done on each frame to generate the average pixel value--> this average value is plotted for each frame
    -Repeat the above three steps
    Please see the attached VI. I have successfully set my camera's settings in MAX to make it wait for an external hardware trigger. However, the output of IMAQdx Grab2.vi inside the While Loop is only a single frame (even though in MAX I have set the Acquisition Mode to MultiFrame - 255 Frames).
    Any help would be appreciated!
    Thank You.
    Solved!
    Go to Solution.
    Attachments:
    ImageGrab.vi ‏57 KB

    The "problem" that you are having is the frame rate of video acquisition, which you think is about 20 Hz.  Take the very simple VI I posted and run it with your camera -- all it does is continuously take frames (and display them) -- does this have an acceptable rate?  I suspect it will.
    If so, then "start with what works and add to it", rather than trying to "fix what is broken".  First, let's consider how to (better) control the Start and Stop of frame acquisition.  I like your idea of using the 6009, but I recommend (if you are using a 3V signal as the trigger) that you wire the trigger to one of the Digital I/O ports (as 0 and 3V are acceptable TTL levels for False and True).
    Your Video loop will be "clocked" by the Camera at its frame rate, so you might consider using the same loop to clock the DIO.  Take a Digital sample of the line to which you've wired your TTL signal, and as long as it is True, run the loop.  [You'll need to think about how to get the loop started ...].  It should, I think, be possible to read from your USB 6009 within a 60th of a second -- if it is too slow, there are other ways of handling this with a separate parallel loop, but let's not go there until we see it is a problem.
    So now, in principle, you've gone from a simple loop showing frames at 60 Hz to a loop controlled by a TTL signal showing frames at 60 Hz.  All we need now is to process those frames.
    Here is where you want to use a Consumer/Producer pattern -- you don't want to do processing inside this loop (because the loop cannot run faster than all of its parts, taken together, and if you are processing incoming data, you have to get the data, then do the processing).  Instead, you have have two loops running in parallel -- the Producer loop acquiring the videos, and then "exporting" them to a Consumer loop that processes them.
    Are you familiar with this pattern?  There are numerous examples around (look in File/New/From Template/Framework/Design Patterns, and at some of the Sample Projects).  It uses a Queue, with data put onto the Queue by the Producer and removed by the Consumer.  You might need to increase the number of buffers for your camera, but you should be able to do quite a bit of processing in 1/60 of a second.
    Bob Schor

Maybe you are looking for