Graphics

 View Only
  • 1.  [SOLVED] GPI + SDK + VB6

    Posted 07-26-2013 07:24
    Hi,

    How to get the GPI trigger in my VB6 application?

    Can I Use withevents (is VB6 not .NET) in order to get the trigger, or I have to query the GPI status (eg every 10 ms)?

    Is any helpful sample?

    Thanks in advance


  • 2.  RE: [SOLVED] GPI + SDK + VB6

    Posted 07-26-2013 18:25
    SOLVED

    Dim WithEvents TriggerEngine As xpEngine

    Dim GPI As xpGPIBoard

    Private Sub Form_Load()

    Set Eng = New xpEngine

    Set GPI = New xpGPIBoard

    If Eng.GPIBoardCount > 0 Then

    Eng.GetGPIBoard 0, GPI

    Else

    MsgBox "no gpi boards found"

    End If

    End Sub

    Private Sub Eng_OnGPI(ByVal BoardID As Long, ByVal PinID As Long, ByVal PinState As Boolean)

    msgbox PinID & "-" & PinState

    End Sub

    #XPression