Communication Problem with K8000

Hello,
I’m trying to write a on my computer XP pro (SP2) a VB6 (SP5) program to control the K8000 interface board by myself. My problem is: my program doesn’t work; I mean there is no communication between the PC and the K8000. Once a while (not every time) LD18 blinks shortly and that’s it.
When I try your example program, there is no problem, everything’s works fine.
What am I doing wrong?
Thank you in advance.

There is not enough information in your question to say what might be wrong with your program. Please copy and paste your source code here.

Thanks for your fast replay.
I have a full parallel cable (25 wires) that goes from the PC to the interface board, there is no printer connected to the board. There is no other electronics attached to the interface, I mean the K8000 is by itself.
By running your example program you se LD17, LD18 and LD19 blinking all the time. With my program nothing happens (see my code).

Option Explicit

'Declare use of the DLL
'K8D.DLL interfaces

'IO CONFIGURATION PROCEDURES
Private Declare Sub ConfigAllIOasInput Lib “k8d.dll” ()
Private Declare Sub ConfigAllIOasOutput Lib “k8d.dll” ()
Private Declare Sub ConfigIOchipAsInput Lib “k8d.dll” (ByVal Chip_no As Long)
Private Declare Sub ConfigIOchipAsOutput Lib “k8d.dll” (ByVal Chip_no As Long)
Private Declare Sub ConfigIOchannelAsInput Lib “k8d.dll” (ByVal Channel_no As Long)
Private Declare Sub ConfigIOchannelAsOutput Lib “k8d.dll” (ByVal Channel_no As Long)

'OUTPUT PROCEDURES
Private Declare Sub IOoutput Lib “k8d.dll” (ByVal Chip_no As Long, ByVal Data As Long)
Private Declare Sub UpdateAllIO Lib “k8d.dll” ()
Private Declare Sub ClearAllIO Lib “k8d.dll” ()
Private Declare Sub SetAllIO Lib “k8d.dll” ()
Private Declare Sub UpdateIOchip Lib “k8d.dll” (ByVal Chip_no As Long)
Private Declare Sub ClearIOchip Lib “k8d.dll” (ByVal Chip_no As Long)
Private Declare Sub SetIOchip Lib “k8d.dll” (ByVal Chip_no As Long)
Private Declare Sub SetIOchannel Lib “k8d.dll” (ByVal Channel_no As Long)
Private Declare Sub ClearIOchannel Lib “k8d.dll” (ByVal Channel_no As Long)

'INPUT FUNCTIONS AND PROCEDURES
Private Declare Function ReadIOchip Lib “k8d.dll” (ByVal Chip_no As Long) As Long
Private Declare Function ReadIOchannel Lib “k8d.dll” (ByVal Channel_no As Long) As Boolean
Private Declare Sub ReadIOconficArray Lib “k8d.dll” (Array_Pointer As Long)
Private Declare Sub ReadIOdataArray Lib “k8d.dll” (Array_Pointer As Long)
Private Declare Sub ReadDACarray Lib “k8d.dll” (Array_Pointer As Long)
Private Declare Sub ReadDAarray Lib “k8d.dll” (Array_Pointer As Long)
'How to use these calls:
’ ReadIOconficArray IOconfig(0)
’ ReadIOdataArray IOdata(0)
’ ReadDACarray DAC(1)
’ ReadDAarray DA(1)

'6 BIT DAC CONVERTER PROCEDURES
Private Declare Sub OutputDACchannel Lib “k8d.dll” (ByVal Channel_no As Long, ByVal Data As Long)
Private Declare Sub ClearDACchannel Lib “k8d.dll” (ByVal Channel_no As Long)
Private Declare Sub SetDACchannel Lib “k8d.dll” (ByVal Channel_no As Long)
Private Declare Sub ClearDACchip Lib “k8d.dll” (ByVal Chip_no As Long)
Private Declare Sub SetDACchip Lib “k8d.dll” (ByVal Chip_no As Long)
Private Declare Sub ClearAllDAC Lib “k8d.dll” ()
Private Declare Sub SetAllDAC Lib “k8d.dll” ()

'8 BIT DA CONVERTER PROCEDURES
Private Declare Sub OutputDAchannel Lib “k8d.dll” (ByVal Channel_no As Long, ByVal Data As Long)
Private Declare Sub ClearDAchannel Lib “k8d.dll” (ByVal Channel_no As Long)
Private Declare Sub SetDAchannel Lib “k8d.dll” (ByVal Channel_no As Long)
Private Declare Sub ClearAllDA Lib “k8d.dll” ()
Private Declare Sub SetAllDA Lib “k8d.dll” ()

'8 BIT AD CONVERTER FUNCTION
Private Declare Function ReadADchannel Lib “k8d.dll” (ByVal Channel_no As Long) As Boolean

'GENERAL PROCEDURES
Private Declare Sub SelectI2CprinterPort Lib “k8d.dll” (ByVal port As Long)
Private Declare Sub Start_K8000 Lib “k8d.dll” ()
Private Declare Sub Stop_K8000 Lib “k8d.dll” ()

Const LPT1 As Long = 1

'COMMON USED GLOBALS
Const MaxIOcard As Long = 3
Const MaxIOchip As Long = 7
Const MaxDACchannel As Long = 32
Const MaxDAchannel As Long = 4

'Declare variables
Dim IOconfig(0 To MaxIOchip) As Long
Dim IOdata(0 To MaxIOchip) As Long
Dim DAC(1 To MaxDACchannel) As Long
Dim DA(1 To MaxDAchannel) As Long

Dim o_test As Boolean
Dim dac_out(9) As Boolean
Dim card_nr, n As Integer

Private Sub cmdConnect_Click()
Dim lonLPT As Long
Dim intI As Integer

 For intI = 0 To 2
      If optLPT(intI).Value = True Then
           lonLPT = intI
      End If
 Next intI
 
 Start_K8000
 SelectI2CprinterPort lonLPT
 ConfigAllIOasOutput

 cmdConnect.Enabled = False
 cmdDisconnect.Enabled = True
 cmdExit.Enabled = False
 cmdOutput.Enabled = True
 cmdOutput.Caption = "Output ON"

End Sub

Private Sub cmdDisconnect_Click()
Stop_K8000

 cmdConnect.Enabled = True
 cmdDisconnect.Enabled = False
 cmdExit.Enabled = True
 cmdOutput.Enabled = False

End Sub

Private Sub cmdExit_Click()
End
End Sub

Private Sub cmdOutput_Click()
If cmdOutput.Caption = “Output ON” Then
cmdOutput.Caption = “Output OFF”

      SetAllIO
 Else
      cmdOutput.Caption = "Output ON"
      
      ClearAllIO
 End If

End Sub

Your code looks OK.
In the example program the LEDs are blinking all the time due to the timer function. The example program updates and polls all the time the status of the K8000 card I/Os.
In your program the LEDs should flash when you click the cmdConnect button and then every time you click the cmdOutput button. If no LED flashes then there is no communication. Reason to this may be that wrong LPT port is selected.
BTW: Have you copied both the K8E.EXE and the K8D.DLL to your application folder and/or to Windows SYSTEM32 folder?

Thanks replay,
Those both drivers K8E.EXE and K8D.DLL I had them already copied to the application folder and to the Windows SYSTEM32 folder.
What I found out was : when I was trying to install the DLPortIO.sys (thru Install_drv.exe) it gave me always an error. To solve the problem I must first delete the file DLPortIO.sys (in the folder Windows/system32/driver) and then run the installation program Install_drv.exe.
And after that the communication problem was solved.
Thanks again for your help.

Marc

Nice that you got your software running.
Thank you for your comment concerning the driver installation problem and its solution.