Comparing K8055 and K8055N: how about the speed?

I bought a K8055 a few years ago and it works like it should.
Because of the projects I wanted more speed; the possibility to make smaller steps between the commands I give to the card.
At your site I compared the specs from the K8055 with the new model K8055N and discovered a change:
The old one: general conversion time: 20ms per command, the new one general conversion time: 2ms per command.
I expected that this would make the card ten times faster, so I decided to buy.
After the soldering I tested the differences, and discovered that the new card isn’t any faster than the old one.
I am very disappointed.
Questions:
-Are there any possibilities to speed up the card?
-If not so: is there a money back guarantee? I know I soldered the K8055N, but this is far beyond my expectations, Velleman suggests that it should be faster.

Kind Regards,

Wim

Have you updated the K8055D.DLL to the latest 5.0 version? I didn’t do too much testing with the K8055N firmware (pretty much replaced the PIC with my own right after assembly). But I believe that if the K8055N is used with a 4.0 DLL, it emulates the K8055 and only switches to the “faster” protocol with the new DLL.

Regards,
Jan

Please see also the last post of this thread for more info:
viewtopic.php?f=3&t=8630

I read some other threads and that brings me to this question:
Can you explain me the difference between the cards with the speeds of 20ms (K8055) and 2ms (K8055N), and that this results in the same speed?

[quote]Can you explain me the difference between the cards with the speeds of 20ms (K8055) and 2ms (K8055N), and that this results in the same speed?[/quote]If you use Visual Basic, you can use this simple software to test the speed of the card:

[code]Public Class Form1
Private Declare Function OpenDevice Lib “k8055d.dll” (ByVal CardAddress As Integer) As Integer
Private Declare Sub ReadAllAnalog Lib “k8055d.dll” (ByRef Data1 As Integer, ByRef Data2 As Integer)
Private Declare Function GetTickCount Lib “kernel32.dll” () As Integer

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim Start_time As Integer
    Dim Stop_time As Integer
    Dim i As Integer
    Dim Data1 As Integer
    Dim Data2 As Integer
    OpenDevice(0)
    Start_time = GetTickCount
    For i = 0 To 999
        ReadAllAnalog(Data1, Data2)
    Next
    Stop_time = GetTickCount
    Label1.Text = CStr((Stop_time - Start_time) / 1000) + " ms"
End Sub

End Class[/code]
The result Label1.Text is the For-Next loop time in milliseconds.
There is a little processing overhead, but mainly the result is the time of the data conversion function ReadAllAnalog(Data1, Data2).
There should be visible difference between K8055 and K8055N cards.
The result is about 8ms with K8055 and about 2ms with K8055N using the DLL version 5.0.0.0.
The results are about 8ms and about 1ms respectively with the DLL version 4.0.0.0.

How are you testing the speed?

Hi again,

I think I haven’t been digging deep enough before.
I use Delphi 6 and my timer component is the issue.
My software was too slow to see the difference between the old and new kit.
Apologees for my first post.
I think I have to rewrite, but first I have to find the right way to create shorter time intervals.
I come back when I have some more results.

Wim

Ok, I did my homework now.
First: thanks for the code.
I never wrote Visual Basic, but I do use Delphi since 2002.
So I tried to change your code into something in Delphi, but did not succeed. I got zeros all the time. (That would have been nice!)
So I tried some other code from the internet, with QueryPerformanceCounter (counting at processorspeed) and succeeded in getting out some numbers:
K8055 with v4.0 dll: 7.74ms
K8055 with v5.0 dll: 7.74ms
K8055N with v5.0 dll: 2.96ms
K8055N with v4.0 dll: 0.97ms (wow!)
Here is my code:

[code]unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;

type
TForm1 = class(TForm)
Button1: TButton;
Label1: TLabel;
Label2: TLabel;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}
function OpenDevice(CardAddress: Longint): Longint; stdcall; external ‘K8055d.dll’;
procedure ReadAllAnalog(var Data1, Data2: Longint); stdcall; external ‘K8055d.dll’;
function ReadAllDigital: integer; stdcall; external ‘K8055d.dll’;
procedure WriteAllDigital(Data: Longint);stdcall; external ‘K8055d.dll’;

procedure TForm1.Button1Click(Sender: TObject);
var i,Data1,Data2:Integer;
var Freq, StartCount, StopCount: Int64;

begin
QueryPerformanceFrequency(Freq);
QueryPerformanceCounter(StartCount);
For i := 0 To 999 DO
begin
ReadAllAnalog(Data1, Data2);
end;
QueryPerformanceCounter(StopCount);
Label1.Caption := '1000 reads = ’ + floattostr((StopCount - StartCount) / Freq) + ‘ms’;
end;

procedure TForm1.FormCreate(Sender: TObject);
var h,CardAddr:longint;
begin
CardAddr:= 0;
h:= OpenDevice(CardAddr);
case h of
0…3: label2.caption:=‘Card ‘+ inttostr(h)+’ connected’;
-1: begin
label2.caption:=‘Card ‘+ inttostr(CardAddr)+’ not found’;
Label2.Font.Color := clRed;
end;
end;
end;

end.[/code]

My project has to do with speed:
I shoot with an air gun (first trigger moment) and then capture the results with my camera (second trigger moment)
(see for results my stockphoto website detailimages.com)
Because the code above is about reading from the card I had to do another test with writing:
I changed the ReadAllAnalog to:

WriteAllDigital(32); WriteAllDigital(0);
Changing this I have the situation for one port to switch on and of for a thousand times.
This gives me the result: 4.00ms together so 2ms for one command.
The TTimer component from Delphi has 1ms as minimum value, so my software (after corrections as mentioned above) still will do the trick.
Thanks for your help.

Wim

Thank you for the feedback and for the Delphi code snippets.
The speed results seem to be OK.
Here an alternative “test loop” for Delphi:procedure TForm1.Button10Click(Sender: TObject); var Data1, Data2, i: integer; start, stop: DWORD; begin start := GetTickCount; for i:= 0 to 999 do begin ReadAllAnalog(Data1,Data2); end; stop := GetTickCount; label12.caption:=floattostr((stop-start)/1000); end;

Ah, that was what I was looking for, as I said before, I wasn’t able to get this working.
Probably because of punctuation marks, most of the time I write in vbscript.
The pro for QueryPerformanceCounter is that it is more precise.

Thanks,

Wim

[quote]The pro for QueryPerformanceCounter is that it is more precise.[/quote]Yes, indeed the GetTickCount value is updated every 16ms.
en.wikipedia.org/wiki/GetTickCount