K8096/K8097: problem with API DLL calls using in Free Pascal

Hello.

I have the same problem and I’m very interested in programing mi onw api for the card. Please, send my the comunication protocol.

Thank you.

Sorry, documenting the complete protocol would be too timeconsuming.
We are looking into the possibility of supplying the source code, which would allow you to figure out how communication is handled.

This is the Motors unit used by the DLL and demo application:
velleman.eu/downloads/files/ … Motors.txt

The source code of the DLL illustrates how it uses the Motors unit:
velleman.eu/downloads/files/ … rapi32.txt

It should be fairly easy to see what packets are sent and received. Don’t try to compile it since you probably won’t succeed.

(Careful: Both cards have different packets)

Could you post a table of values ​​of the parameter speed (0 … 255) with reference to the actual velocity (speed)?

Sorry, such a table is unavailable.

Keep up to date

Thanks for the MotorDLL.pas. It is very helpful.
Although I don’t get the Motor to run.
Do have a short example in Delphi to turn left or right the motor a given count of steps?

Thank you in advance.

stpie

What do you have so far? And what does not work about it?

[quote=“stpie”][quote=“VEL448”]
To help you out I’ve created a correct Delphi unit for mtrapi32.dll:
MotorDLL.pas (download as zip)
[/quote]
Thanks for the MotorDLL.pas. It is very helpful.
Although I don’t get the Motor to run.
Do have a short example in Delphi to turn left or right the motor a given count of steps?

Thank you in advance.

stpie[/quote]

Try to use 0 (zero) as number of (first) motor channel.