Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

SignalOccurence problem

Dear All,
 
I'm using an IMAQ PCI-1405 card. The task I'd like to realize with a program is an asynchronous capture (started and stopped by software buttons - it works) and frame extracting initiated by an external trigger. I'm quite ready with it, but don't know how to use the SignalOccurrence event. I'm trying not to use the predefined trigger management(EveryLine, Everyframe etc...) but trying to assign a software event to the trigger. I've run through many examples, so I'm trying to use:
 
...

CWIMAQ1.EnableSignalOccurrence(CWIMAQControls.CWIMAQSignalSources.cwimaqExternalLine, CWIMAQControls.CWIMAQSignalPolarities.cwimaqActiveLow,

True, 0)

...

Private Sub CWIMAQ1_SignalOccurrence(ByVal Signal As Integer, ByVal SignalLineNumber As Integer, ByVal UserData As Object, ByVal StatusCode As Long, ByVal ContextID As Long, ByVal ContextDescription As String)

...

End Sub

But this code doesn't want to work at all, I tried everything so it is sure that the code in "Private Sub CWIMAQ1_SignalOccurrence.." never runs. I'm using Visual Basic 2005 Express edition, may I use other synthax?

The other quiestion I'd like to ask that how the CWIMAQSignalActions.cwimaqNoSignal influences the SignalOccurence definition.(because I'm using it, in addition not to stop the capture after extracting a single image)

CWIMAQ1.Signals.Item("TriggerLine1").Initialize(CWIMAQControls.CWIMAQSignalLines.cwimaqExternal, NationalInstruments.CWIMAQControls.CWIMAQSignalActions.cwimaqNoSignal, NationalInstruments.CWIMAQControls.CWIMAQSignalPolarities.cwimaqActiveLow, 0)

This could be a little baffling, so I mean setting the CWIMAQSignalActions to NoSignal means that I cannot use the actual signal without resolving in SignalOccurence? 

 

Thank You,

 

Martin Litkei

0 Kudos
Message 1 of 1
(2,936 Views)