I have two k8055n and they function realy good alone, but i will use both of them to getter can you write me what the DDL(Visual Basic) is ? (I have adress it and when I change de number of the card adress in the program and resatrt it it works but not only still the programm works)
I need 5V on the digital outputs is that possible?? Where I need to put the 5V in?
Kind regards Nils Anderer
Auf Deutsch:
Ich möchte zwei K8055n betreiben, mein Problem ist das ich keine DDL finde mit der die zwei gleichzeitig angesteuert werden können.
Ich bräuchte 5v an den digitalen Ausgängen ist das machbar wo muss ich das Board mit 5v speisen?
[quote]1. I have two k8055n and they function realy good alone, but i will use both of them to getter can you write me what the DDL(Visual Basic) is ? (I have adress it and when I change de number of the card adress in the program and resatrt it it works but not only still the programm works)[/quote]At the beginning of your program use SearchDevice to “open” all the K8055N cards.
Then use SetCurrentDevice to select the card you like to control and read.
For more details please see: viewtopic.php?f=3&t=7427
[quote]2. I need 5V on the digital outputs is that possible?? Where I need to put the 5V in?[/quote]The digital outputs are open collector.
Add pull up resistor between the K8055N digital output and +5V of external supply (or +5V of the board).
You’ll find the +5V from the upper pin of SK2 and SK3 on the K8055N board.
Be careful - do not overload or short circuit this internal +5V supply !
For more details please see: viewtopic.php?f=3&t=2020 viewtopic.php?f=3&t=4057 viewtopic.php?f=3&t=4224
[quote]I don’t now i have tried the SerachDevice() but i have not found the solution.
Where must i the SearchDevice() declare? And what is the first part(Private Sub Form1_Load)?[/quote]If you have cards coded to addresses 0 and 1, you can use this code to set the digital outputs on (Button1_Click) and then off (Button2_Click) for both of the cards:
[code]Public Class Form1
Private Declare Function OpenDevice Lib “k8055d.dll” (ByVal CardAddress As Integer) As Integer
Private Declare Sub CloseDevice Lib “k8055d.dll” ()
Private Declare Function Version Lib “k8055d.dll” () As Integer
Private Declare Function SearchDevices Lib “k8055d.dll” () As Integer
Private Declare Function SetCurrentDevice Lib “k8055d.dll” (ByVal CardAddress As Integer) As Integer
Private Declare Function ReadAnalogChannel Lib “k8055d.dll” (ByVal Channel As Integer) As Integer
Private Declare Sub ReadAllAnalog Lib “k8055d.dll” (ByRef Data1 As Integer, ByRef Data2 As Integer)
Private Declare Sub OutputAnalogChannel Lib “k8055d.dll” (ByVal Channel As Integer, ByVal Data As Integer)
Private Declare Sub OutputAllAnalog Lib “k8055d.dll” (ByVal Data1 As Integer, ByVal Data2 As Integer)
Private Declare Sub ClearAnalogChannel Lib “k8055d.dll” (ByVal Channel As Integer)
Private Declare Sub SetAllAnalog Lib “k8055d.dll” ()
Private Declare Sub ClearAllAnalog Lib “k8055d.dll” ()
Private Declare Sub SetAnalogChannel Lib “k8055d.dll” (ByVal Channel As Integer)
Private Declare Sub WriteAllDigital Lib “k8055d.dll” (ByVal Data As Integer)
Private Declare Sub ClearDigitalChannel Lib “k8055d.dll” (ByVal Channel As Integer)
Private Declare Sub ClearAllDigital Lib “k8055d.dll” ()
Private Declare Sub SetDigitalChannel Lib “k8055d.dll” (ByVal Channel As Integer)
Private Declare Sub SetAllDigital Lib “k8055d.dll” ()
Private Declare Function ReadDigitalChannel Lib “k8055d.dll” (ByVal Channel As Integer) As Boolean
Private Declare Function ReadAllDigital Lib “k8055d.dll” () As Integer
Private Declare Function ReadCounter Lib “k8055d.dll” (ByVal CounterNr As Integer) As Integer
Private Declare Sub ResetCounter Lib “k8055d.dll” (ByVal CounterNr As Integer)
Private Declare Sub SetCounterDebounceTime Lib “k8055d.dll” (ByVal CounterNr As Integer, ByVal DebounceTime As Integer)
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
SearchDevices()
End Sub
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
SetCurrentDevice(0)
SetAllDigital()
SetCurrentDevice(1)
SetAllDigital()
End Sub
Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click
SetCurrentDevice(0)
ClearAllDigital()
SetCurrentDevice(1)
ClearAllDigital()
End Sub
End Class[/code]
[quote]And with the digital outputs i don’t understand it, because i’m not professional person, can you draw a schematic? I need 0V or 5V on the outputs and i can’t go over the ground because of the Motor Driver (Pololu A4988).[/quote]Here is how you can get 0V to 5V output: