Hi,
I’m working on my final project for certification as a technican.
For this I need about 20 inputs (14 digital and 6 analog) and 16 outputs.
I’ve learned and worked with your K8055 at school and now I bought the K8061 and the K8055 from “Conrad” in Germany.
Both Kits works very good seperately.
But I doesn’t know, how I can connect both cards simultaneously to my pc.
I’m using Borland C++ Builder 6.0 under Windows XP.
I’ve tried to include every DLL in a seperate class in my project, but it did’t work
yes, this is exactly the problem.
This is why I included the both DLL´s in seperate classes. One class for the K8061 and one for the K8055.
But it doesn’t work…
I need the counter-function of the K8055, because the inputs of an incremental rotary encoder are too fast to use them directly with the K8061.
Or is there a counter-function at the K8061?
How could I count the pulses?
Delphi is one possible solution to this problem.
There you may use alias names if there are same function names in the two (or more) DLLs.
I understand that it is not easy to jump to other language - regardless of the similarity of the Borland C++Builder and Delphi…
One more alternative is to change the function names in the K8061.DLL.
—> This solution seems to work.
I added “X” to the K8061 function names.
You may download modified DLL, LIB, .h and a working demo project (in Borland C++Builder) that runs K8055 and K8061 simultaneously from: vel255.diinoweb.com/files/K8055_K8061_DLL_combined.zip
Please copy and paste this link to your browser to download the ZIP file.
[code]#ifdef __cplusplus
extern “C” { #endif
#define FUNCTION __declspec(dllimport)
FUNCTION long __stdcall OpenDeviceX();
FUNCTION __stdcall CloseDevicesX();
FUNCTION long __stdcall ReadAnalogChannelX(long CardAddress,long Channel);
FUNCTION __stdcall ReadAllAnalogX(long CardAddress, long *Buffer);
FUNCTION __stdcall OutputAnalogChannelX(long CardAddress, long Channel, long Data);
FUNCTION __stdcall OutputAllAnalogX(long CardAddress, long *Buffer);
FUNCTION __stdcall ClearAnalogChannelX(long CardAddress, long Channel);
FUNCTION __stdcall ClearAllAnalogX(long CardAddress);
FUNCTION __stdcall SetAnalogChannelX(long CardAddress,long Channel);
FUNCTION __stdcall SetAllAnalogX(long CardAddress);
FUNCTION __stdcall OutputAllDigitalX(long CardAddress, long Data);
FUNCTION __stdcall ClearDigitalChannelX(long CardAddress, long Channel);
FUNCTION __stdcall ClearAllDigitalX(long CardAddress);
FUNCTION __stdcall SetDigitalChannelX(long CardAddress, long Channel);
FUNCTION __stdcall SetAllDigitalX(long CardAddress);
FUNCTION bool __stdcall ReadDigitalChannelX(long CardAddress, long Channel);
FUNCTION long __stdcall ReadAllDigitalX(long CardAddress);
FUNCTION __stdcall OutputPWM(long CardAddress, long Data);
FUNCTION bool __stdcall PowerGood(long CardAddress);
FUNCTION bool __stdcall Connected(long CardAddress);
FUNCTION __stdcall ReadVersionX(long CardAddress, long *Buffer);
FUNCTION long __stdcall ReadBackDigitalOut(long CardAddress);
FUNCTION __stdcall ReadBackAnalogOut(long CardAddress, long *Buffer);
FUNCTION long __stdcall ReadBackPWMOut(long CardAddress);
Since you’re using C++ you can use namespaces to prevent name collisions
namespace K8055
{
extern "C"
{
#define FUNCTION __declspec(dllimport)
FUNCTION long __stdcall OpenDevice();
FUNCTION void __stdcall CloseDevices();
FUNCTION long __stdcall ReadAnalogChannel(long CardAddress,long Channel);
FUNCTION void __stdcall ReadAllAnalog(long CardAddress, long *Buffer);
FUNCTION void __stdcall OutputAnalogChannel(long CardAddress, long Channel, long Data);
FUNCTION void __stdcall OutputAllAnalog(long CardAddress, long *Buffer);
FUNCTION void __stdcall ClearAnalogChannel(long CardAddress, long Channel);
FUNCTION void __stdcall ClearAllAnalog(long CardAddress);
FUNCTION void __stdcall SetAnalogChannel(long CardAddress,long Channel);
FUNCTION void __stdcall SetAllAnalog(long CardAddress);
FUNCTION void __stdcall OutputAllDigital(long CardAddress, long Data);
FUNCTION void __stdcall ClearDigitalChannel(long CardAddress, long Channel);
FUNCTION void __stdcall ClearAllDigital(long CardAddress);
FUNCTION void __stdcall SetDigitalChannel(long CardAddress, long Channel);
FUNCTION void __stdcall SetAllDigital(long CardAddress);
FUNCTION bool __stdcall ReadDigitalChannel(long CardAddress, long Channel);
FUNCTION long __stdcall ReadAllDigital(long CardAddress);
FUNCTION void __stdcall OutputPWM(long CardAddress, long Data);
FUNCTION bool __stdcall PowerGood(long CardAddress);
FUNCTION bool __stdcall Connected(long CardAddress);
FUNCTION void __stdcall ReadVersion(long CardAddress, long *Buffer);
FUNCTION long __stdcall ReadBackDigitalOut(long CardAddress);
FUNCTION void __stdcall ReadBackAnalogOut(long CardAddress, long *Buffer);
FUNCTION long __stdcall ReadBackPWMOut(long CardAddress);
}
}
int main()
{
K8055::OpenDevice();
return 0;
}
[quote=“VEL255”]The link to the K8055_K8061_DLL_combined.zip is now updated: box.com/s/ax5axtgwfucri1t7oznq[/quote]push button open k8061 ------> card not found
This DLL and the demo works only with the driver version 1.0.0.6.
You’ll find this driver in the “Complete software package edition 2011” here: velleman.eu/support/download … 8061&type=
[quote=“VEL255”]This DLL and the demo works only with the driver version 1.0.0.6.
You’ll find this driver in the “Complete software package edition 2011” here: velleman.eu/support/download … 8061&type=[/quote]Download all versions K8061.dll press the button open k8061 writes dots and all K8061 not respond to commands . is it possible to control K8061 and K8055 in one програме? may still have takiezhe program?
We are using C# programming language do you have any advices can you use the C dll from the link that you proposed are there aliases also in C#
Thank you have a nice day
Did all that was sugested but get error Keine Überladung for the ReadAllAnalog_K8055 Method takes one Argument
implemented the following code
[DllImport(“k8055d.dll”, EntryPoint = “ReadAllAnalog”)]
public static extern void ReadAllAnalog_K8055(ref int Data1, ref int Data2);
[DllImport(“k8061.dll”)]
public static extern void ReadAllAnalog(int CardAddress, int[] Buffer);
ReadAllAnalog_K8055(ref int Data1, ref int Data2);
Greetings
Found that the Card is easily disturbed by EMC pulses
1nF to ground could solve the Problem
had the Problem that usb was diconnected that was because of direct contact of cables with cables that have a distortion
there should be a hint in the Manual how to install the cables correct
May we ask how many cards of K8055 and K8061 your company sells each year
contacted your collegue one year ago and asked him if it is possibel to get a link from my company which is shown at your site
is it possibel to get a link for commercial software product
solved our question which we stated at the forum
forgot to open the connection to the card now everything works with both cards
thank you very much have a nice day greetings
P.S. is there a card planned with more output channels