PDA

View Full Version : ACCESSING Triggered iMAGE bUFFER



Unregistered
May 30, 2002, 15:42:48
I am doing a trigger grab with the following code

Dim ImageData as Variant
IcImagingControl1.MemorySnapTimeout=1000
IcimagingControl1.DeviceTrigger=true
IcImagingControl1.LiveStart
' now retrieve pixel data
ImageData=IcimagingControl1.MemoryGet Data


WHy doesnot the program stop after LiveStart and wait for trigger?
the code proceeds through without storing the pixel data in the ImageData array
This array only contains zeros.
how do I cause it to save image data of the triggered event. in a file accessible in an x,y array?


Is a more descriptive book available of your called functions when you purchase software?

thanks, Bill


This message was originally posted by BILL in the old IC Imaging Control Support Forum.

Unregistered
May 31, 2002, 23:34:28
I am doing a trigger grab with the following code that now works.The IC control
didnot have LIVECAPTURECONTINUOUS

Private Command1_Click()
IcimagingControl1.DeviceTrigger=true
IcImagingControl1.LiveStart ' tiggered by sensor going ttl high
end sub
' now retrieve pixel data
Private Command2_Click()
Dim ImageData as Variant
IcimagingControl1.stoplive


ImageData=IcimagingControl1.MemoryGet Data

IcimagingControl1.MemorySaveImage("c:\bill.bmp")

end sub

WHY DOES THIS NEED LIVECAPTURECONTINUOUS=true


This message was originally posted by BILL in the old IC Imaging Control Support Forum.

Unregistered
June 20, 2002, 17:43:43
Hi Bill,

LIVECAPTURECONTINUOUS=true means, that every grabbed frame will be copied to memory.
You tried to use the implicit behavior of stopLive to grab a frame.
stopLive tries 2 seconds to grab a frame if the property CaptureLastFrame is True (default). If no trigger signal occurs within this two seconds, the memory is empty an you will save only empty bmp files.

The following code solves the problem:

Private Sub cmdStopLive_Click()
' this will wait until MemorySnapTimeout 5000 milliseconds timeout occurs
' or a frame has been grabbed.
IcimagingControl1.MemorySnapTimeout = 5000
IcimagingControl1.MemorySnapImage

' this will not snap anything
IcimagingControl1.LiveStop

' this should save the image for whitch the trigger occured
IcimagingControl1.MemorySaveImage ("c:\bill.bmp")
End Sub

Best regards
Stefan
IC Support


This message was originally posted by IC Support in the old IC Imaging Control Support Forum.