Hi All
I’ve built and tested the K8062 USB-DMX interface, and this works fine when I use the supplied “DMX Lightplayer” software which tells me the interface and external DMX lamps are all OK. (This lamp is a 4 channel lamp - Red, Green, Blue and Intensity)
The problem is that I get no response when I try to use the supplied DLL in a Visual Basic programme.
I’ve tried a simple project with four buttons: “StartDevice”, “StopDevice” and two others each of which outputs a simple display using the “SetData” command. (The visual basic code is below).
The problem is that I’m getting nothing from the lamp at all.
When I click “StartDevice”, I can see a “k8062e.exe” process start in Windows Task Manager, and this disappears when I click “StopDevice”. Problem is that nothing happens when I click “setPattern1” or 2.
Can anybody point me in the right direction at all?
The computer setup is WindowsXP, and I’m using Visual Basic Express 2008. No errors are being thrown at all.
Best regards
Paul COULSON
VB Code:
Public Class Form1
Private Declare Sub StartDevice Lib “k8062d.dll” ()
Private Declare Sub SetData Lib “k8062d.dll” (ByVal Channel As Long, ByVal Data As Long)
Private Declare Sub SetChannelCount Lib “k8062d.dll” (ByVal Count As Long)
Private Declare Sub StopDevice Lib “k8062d.dll” ()
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click //StartDevice button
StartDevice()
SetChannelCount(8)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click //setPattern1 button
SetData(0, 100)
SetData(1, 0)
SetData(2, 100)
SetData(3, 100)
SetData(4, 100)
SetData(5, 100)
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click //setPattern2 button
SetData(0, 100)
SetData(1, 100)
SetData(2, 100)
SetData(3, 0)
SetData(4, 100)
SetData(5, 100)
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click //StopDevice button
StopDevice()
End Sub
End Class