DisableSignalOccurrences Method

NI Vision for Visual Basic

DisableSignalOccurrences Method

Syntax

CWIMAQ.DisableSignalOccurrences

Return Type

Long

This method returns 0 on success, a negative number on an error, and a positive number on a warning.

Purpose

Disables all signal I/O related events.

Remarks

Call this method to clear all events you set up with EnableSignalOccurrence.

Example

' This example requires you to have the following controls on the form:
' 1) A button named Acquire. 
' 2) A button named Stop.
' 3) A Text box named Counter.
' 4) A CWIMAQ control named CWIMAQ1
Private Sub Stop_Click()
    CWIMAQ1.Stop
    CWIMAQ1.DisableSignalOccurrences
End Sub

Private Sub Acquire_Click()
    CWIMAQ1.EnableSignalOccurrence cwimaqBufferComplete, cwimaqActiveHigh, TRUE, 0
    CWIMAQ1.Start
End Sub

Private Sub CWIMAQ1_SignalOccurrence(ByVal Signal As Integer, ByVal SignalLineNumber As Integer, UserData As Variant, ByVal StatusCode As Long, ByVal ContextID As Long, ByVal ContextDescription As String)
    Dim i As Long
    If Signal = cwimaqBufferComplete Then
        i = Counter.Text
        i = i + 1
        Counter.Text = i
    End If
End Sub

See Also

EnableSignalOccurrence

SignalOccurrence