05-25-2012 08:05 AM
I have an application in which I am using Ethernet/IP to communicate from a VBAI program to an Allen-Bradley ControlLogix PLC. Currently, the ControlLogix PLC sets a bit in its memory which the VBAI software uses as a signal to trigger an image capture from a FLIR A315 camera. This works, but is not always fast enough, as the part feaure that the camera is monitoring is only stationary for a short period of time. Due to the timing jitter on the Ethernet/IP network, the VBAI software is only capturing the images correctly for 80% of the captured images. The other 20% of the time, it captures only part of the feature I am interested in examining - as the part is motion and leaving the field of vision of the camera.
The Flir A315 camera has 24 VDC inputs on the camera, which the manual states can be used to trigger an image capture. Can this be set up to work with the VBAI software?
What I would like to do is implement the following:
1) Trigger an image capture by setting a 24 VDC output from the ControlLogix PLC that is wired to an input on the Flir A315 camera
2) At the same time that the ControlLogix sets its 24 VDC output high, it sets a bit that tells the VBAI program to capture an image
3) The VBAI software grabs the image from the Flir A315 camera (which was captured in time as a result of the camera receiving the hard-wired signal from the PLC).
4) The rest of my program works as before - analyzing the image and writing the pass/fail status of the analysis to the PLC via Ethernet/IP (plenty of time for this, as only the image capture portion is time-critical due to the short time available for image capture).
Can this be done? If so, some pointers on how to do it would be appreciated.
Thanks!
Nick
05-25-2012 09:44 AM
Yes. In fact there's a template in VBAI 2010 or higher that is specifically geared towards solving this type of triggered acquisition. From the splash screen if you select New Inspection from Template and select Acquire Image (1394 GigE USB) with Trigger Template, this will illustrate how you can keep polling on the acquisition step and if there's a timeout error (i.e. camera hasn't been triggered yet), it goes back and tries to acquire again. It's important to have the acquisition mode set to Immediate (this is what the template does) so you don't miss an image. If the mode was set to wait for next, you could miss an image if the camera happened to be triggered immediately after the step times out and before it tries to acquire again. This way, you don't even need to wait for the PLC to tell VBAI an image is available...it will know when the camera sends an image.
Hope this helps,
Brad