Help with a K8055 project? Thanks

Hi all :slight_smile:

this is my first post, i am doing a project on the K8055 and need some help, i have never used anything like this before and have very little experience writing code…

This project is to build a computer based Graphical User Interface (GUI) to monitor robot sensors and control robot actuators. The interface to the robotic hardware will be via a USB I/O ( k8055 )… and must contain Graphical User Interface (GUI) programming, interfacing the GUI to the USB I/O card and designing a GUI to monitor and control robot sensors and motors

i have matlab and visual basic to use,

if any one has any pointers, code, or anything to help me please let me know

do you know the basic code for k8055? if not here it is:

Option Explicit
Dim DoNothing As Boolean
Dim n As Integer
Private Declare Function OpenDevice Lib "k8055d.dll" (ByVal CardAddress As Long) As Long
Private Declare Sub CloseDevice Lib "k8055d.dll" ()
Private Declare Function ReadAnalogChannel Lib "k8055d.dll" (ByVal Channel As Long) As Long
Private Declare Sub ReadAllAnalog Lib "k8055d.dll" (Data1 As Long, Data2 As Long)
Private Declare Sub OutputAnalogChannel Lib "k8055d.dll" (ByVal Channel As Long, ByVal Data As Long)
Private Declare Sub OutputAllAnalog Lib "k8055d.dll" (ByVal Data1 As Long, ByVal Data2 As Long)
Private Declare Sub ClearAnalogChannel Lib "k8055d.dll" (ByVal Channel As Long)
Private Declare Sub SetAllAnalog Lib "k8055d.dll" ()
Private Declare Sub ClearAllAnalog Lib "k8055d.dll" ()
Private Declare Sub SetAnalogChannel Lib "k8055d.dll" (ByVal Channel As Long)
Private Declare Sub WriteAllDigital Lib "k8055d.dll" (ByVal Data As Long)
Private Declare Sub ClearDigitalChannel Lib "k8055d.dll" (ByVal Channel As Long)
Private Declare Sub ClearAllDigital Lib "k8055d.dll" ()
Private Declare Sub SetDigitalChannel Lib "k8055d.dll" (ByVal Channel As Long)
Private Declare Sub SetAllDigital Lib "k8055d.dll" ()
Private Declare Function ReadDigitalChannel Lib "k8055d.dll" (ByVal Channel As Long) As Boolean
Private Declare Function ReadAllDigital Lib "k8055d.dll" () As Long
Private Declare Function ReadCounter Lib "k8055d.dll" (ByVal CounterNr As Long) As Long
Private Declare Sub ResetCounter Lib "k8055d.dll" (ByVal CounterNr As Long)
Private Declare Sub SetCounterDebounceTime Lib "k8055d.dll" (ByVal CounterNr As Long, ByVal DebounceTime As Long)


Private Sub Connect_Click()
    Dim CardAddress As Long
    Dim h As Long
    CardAddress = 0
    CardAddress = 3 - (Check1(0).Value + Check1(1).Value * 2)
    h = OpenDevice(CardAddress)
    Select Case h
        Case 0, 1, 2, 3
            Label1.Caption = "Card " + Str(h) + " connected"
        Case -1
            Label1.Caption = "Card " + Str(CardAddress) + " not found"
    End Select
    If h >= 0 Then Timer1.Enabled = True
End Sub

Private Sub Form_Initialize()
    DoNothing = False
    n = 7
End Sub

Private Sub Form_Terminate()
    CloseDevice
End Sub

Or something like that. What are these robotic sensors? are they simple on/off switches or resistance sensors (LDR, THERMISTOR, ETC) Hope it helps, post on my open topic if you need to reply.

[quote=“kuytno18”]Hi all :slight_smile:

this is my first post, i am doing a project on the K8055 and need some help, i have never used anything like this before and have very little experience writing code…

This project is to build a computer based Graphical User Interface (GUI) to monitor robot sensors and control robot actuators. The interface to the robotic hardware will be via a USB I/O ( k8055 )… and must contain Graphical User Interface (GUI) programming, interfacing the GUI to the USB I/O card and designing a GUI to monitor and control robot sensors and motors

i have matlab and visual basic to use,

if any one has any pointers, code, or anything to help me please let me know[/quote]

if you ever find out let me know

its slim pickings here with info on what to do

on a positive note it might be velleman is working on something that teaches people how to use their product. for me its a little difficult becuase i have to travel around for significant periods fixing medical equipment.

one day someone might put something down to help poor saps like us.

actually Blitz, you seem to know what you are doing

starting from the very very beginning exactly how can i write a c++ programme to use the k8055??

for example how would i write a programme to make one led come on and off based on a keystroke or analogue signal???

if you could create a basic C++ programme and explain the code a little AND then explain all the things i need to do to make that C++ programme access all the programmes i need to make the C++ programme work, i’d be eternally grateful.

[quote=“bee”]actually Blitz, you seem to know what you are doing

starting from the very very beginning exactly how can i write a c++ programme to use the k8055??

for example how would i write a programme to make one led come on and off based on a keystroke or analogue signal???

if you could create a basic C++ programme and explain the code a little AND then explain all the things i need to do to make that C++ programme access all the programmes i need to make the C++ programme work, i’d be eternally grateful.[/quote]

Basically all you need is the source code (found here: velleman.eu/downloads/files/ … e_code.zip) that will give you the other to, but i used VB6.0 (dunno what you use) but if you use the source code provided, then all you do is modify the code, for example, if you look in the code it says somewhere:
check3(0) - check3(7) (that is th outputs of 1 - 8) then all you do is if you want to press a button to turn one led on, then another to turn all leds of you would want:

Command_on_1_Click()                  ' this is the on button for led 1
   Check3(0).value = 1                  ' this means the checkbox is checked (on)
End Sub

Command_on_2_Click()                 ' this is the on button for led 2
   Check3(1).value = 1                   ' this means the checkbox is checked for led2. etc.
End Sub

and then:

Command_off_all_Click()
Check3(0).value = 0
Check3(1).value = 0
Check3(2).value = 0                 ' these meen the checkboxes are all unchecked (off)
Check3(3).value = 0
Check3(4).value = 0

etc.

i’ve picked up a laptop so i can experiment and learn a bit about how to use the k8055. i’ve seen one of the few instructions as part of the downloads telling you to copy k8055.dll into the “system 32” folder in windows. for some reason you seem to need this dll file in “system32”.

when i’ve got things up and running i’ll be asking more questions!

hopefully if i can finally work out how the thing works i’ll post up a guide on how to make the k8055 work from scratch (this might take some time).

Since your software is using that DLL, it needs to be able to find it. The easiest way to do this is by copying it to the system32 folder, or by copying it into the folder where your application executable resides.

[quote=“bee”]
if you ever find out let me know

its slim pickings here with info on what to do

on a positive note it might be velleman is working on something that teaches people how to use their product. for me its a little difficult becuase i have to travel around for significant periods fixing medical equipment.

one day someone might put something down to help poor saps like us.[/quote]

Velleman provides a series of very nice PC-based programmable “real world” interfaces and instruments, accompanied by quite complete documentation of the PC interface utilities and libraries–in fact much more complete than many other vendors of similar and affordable products.

Combine the good documentation with the support available on this forum and it’s a winning combination.

However, I think it unreasonable to further expect them to provide basic PC programming lessons or instruction. Application and use of products such as these require that the user have a fairly high level of programming KSAs (Knowledge, Skills, and Abilities).

The support folks here are always quick responding and quite willing to assist in the understanding of the interfaces and libraries, and often provide full (but simple) example function and routines illustrating each product’s capabilities.

But, it is not their responsibility to teach someone to program in C++ (an atrocious language anyway), VB, Delphi, or any other language; explain simple constructs and syntax for each, or to create complete applications for every product.

In the last, please understand this is my position on all of this. In no way am I speaking for Velleman or any of their outstanding support team…

Well said Cliffy

all i’m asking is this

have an example

for example…

you have a simple c++ programme unmodified or changed so it could be used by the K8055

you then show what someone needs to do to allow the k8055 to use the programme

so then you do this

then you do that

and then after doing all these things your programme can use the k8055

i am totally amazed that a company that makes this product is so totally against showing anyone let alone their customers how to use that product.

i suppose i might just use the k8055 as a paperweight i suppose

its like pushing a rock up the hill

i’m asking for very little

who knows, they might even sell more of these things

should start looking into arduino i suppose

[quote=“bee”]i suppose i might just use the k8055 as a paperweight i suppose

its like pushing a rock up the hill

i’m asking for very little

who knows, they might even sell more of these things

should start looking into arduino i suppose[/quote]
Okay, I have been looking at you complaining about this for some weeks now, and others have been trying to tell you, in a nice way that theres nothing wrong with the way Velleman provides support. Actually they provide more support than most other. The problem is yourself.

Velleman provides a DLL with the functions needed so you can start communicating with the K8055, and documentation on what the different functions inside works.

When you buy a new car, you can read in the manual how to put the key in, how to lock the doors, and so on. But its not their job to actually learn you how to drive.

Same thing here, they provide the info for you to get going, but you need to actually be able to program something before you can use it.
I went through exactly the same while i was learning c# and i am still learning. I only used the demo programs, looked in the source, then closed it again because i didnt understand much of it. Then started with the basic functions, slowly adding more and more to it.

But the bottom line is, that nothing is wrong here, it is you choosing a fuel not supported by the creator of your car, and then expecting them to teach you how to make it run on it.

They could just point you to their download page, where there are some files you can download and look at, which many actually does, but instead Velleman is trying to help you, if they can, if you made something that isnt working as planned.

[quote=“bld”][quote=“bee”]i suppose i might just use the k8055 as a paperweight i suppose

its like pushing a rock up the hill

i’m asking for very little

who knows, they might even sell more of these things

should start looking into arduino i suppose[/quote]
Okay, I have been looking at you complaining about this for some weeks now, and others have been trying to tell you, in a nice way that theres nothing wrong with the way Velleman provides support. Actually they provide more support than most other. The problem is yourself.

Velleman provides a DLL with the functions needed so you can start communicating with the K8055, and documentation on what the different functions inside works.

When you buy a new car, you can read in the manual how to put the key in, how to lock the doors, and so on. But its not their job to actually learn you how to drive.

Same thing here, they provide the info for you to get going, but you need to actually be able to program something before you can use it.
I went through exactly the same while i was learning c# and i am still learning. I only used the demo programs, looked in the source, then closed it again because i didnt understand much of it. Then started with the basic functions, slowly adding more and more to it.

But the bottom line is, that nothing is wrong here, it is you choosing a fuel not supported by the creator of your car, and then expecting them to teach you how to make it run on it.

They could just point you to their download page, where there are some files you can download and look at, which many actually does, but instead Velleman is trying to help you, if they can, if you made something that isnt working as planned.[/quote]

^+1, well said…

[soapbox]
BTW and FWIW–this pretty much sums up my opinion of C++, it’s a bit longer than I would write, but it says it all.

I have had to pick up the pieces and/or takeover maintenance of C++ apps more than a few times in my career–one of the most time-consuming tasks there can be, especially is custom or non-standard poorly documented libraries have been incorporated.
[/soapbox]

its ok you won’t hear me complaining here any more. i realise i’ve wasted my time. sometimes you just have to admit defeat and realise that you can go no further.

a simple set of instructions to allow people to get going very quickly with c++ and the k8055 is never going to happen.

i will however find out who the boss is at velleman and ask him/her why he doesn’t want to sell more product - when i meet this kind of obstinate refusal to give out information that would make the use of the product clear, i am always interested in the psychology.
(its not much to ask)

eg do this do that

as far as i can see it its some kind of weird power and control thing, because i am not an expert in programming i am unworthy - i get it.

by the way

the box that the k8055 comes in, refers to c++, this is why i thought i’d have half a chance. why would velleman even give instructions of what to solder and when? surely this is also pandering to people who should know how to solder? wouldn’t it be better to give no instruction on soldering or directions on the PCB itself about what to solder as surely anyone should be able to deduce the locations of the components by a circuit diagram alone? you could just throw the components into a blank box and never tell anyone whats inside as obviously anyone could deduce whats inside.

all machines in the modern world come with instructions on use - believe it or not (direct or not).

the k8055 just like any machine should come with instructions not some vague references that would baffle sherlock holmes.

i notice that not one reply has offered any instructions and whats more theres little in the way of what people have done with the k8055. its obvious that most people get these things then give up.

[quote=“bee”]its ok you won’t hear me complaining here any more. i realise i’ve wasted my time. sometimes you just have to admit defeat and realise that you can go no further.

a simple set of instructions to allow people to get going very quickly with c++ and the k8055 is never going to happen.

i will however find out who the boss is at velleman and ask him/her why he doesn’t want to sell more product - when i meet this kind of obstinate refusal to give out information that would make the use of the product clear, i am always interested in the psychology.
(its not much to ask)

eg do this do that

as far as i can see it its some kind of weird power and control thing, because i am not an expert in programming i am unworthy - i get it.

by the way

the box that the k8055 comes in, refers to c++, this is why i thought i’d have half a chance. why would velleman even give instructions of what to solder and when? surely this is also pandering to people who should know how to solder? wouldn’t it be better to give no instruction on soldering or directions on the PCB itself about what to solder as surely anyone should be able to deduce the locations of the components by a circuit diagram alone? you could just throw the components into a blank box and never tell anyone whats inside as obviously anyone could deduce whats inside.

all machines in the modern world come with instructions on use - believe it or not (direct or not).

the k8055 just like any machine should come with instructions not some vague references that would baffle sherlock holmes.

i notice that not one reply has offered any instructions and whats more theres little in the way of what people have done with the k8055. its obvious that most people get these things then give up.[/quote]

Gentleman the underlying problem here is that we are standing on the shoulders of giants. The k8055 is a powerful piece of kit, and the ability to automate our own creations is a power comparable to that of legendary sourcerers.

I jest.

Although I agree that the documentation could be of a higher standard… i.e - “What can this interface do, and can you give us a couple of examples?”, I have managed to hack together this little bot:

youtube.com/watch?v=sL1fQmTJWRI

I sidestepped the programing by using the Roborealm software (link on vid)