Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Transfer Data to DLL

Status
Not open for further replies.

mapei2

Automotive
Sep 13, 2005
1
Hi, i want do connect a USB Board by using MATLAB. I'm able to Open the Board (card Adress), and to Read an Inputchannel of the Board. Now I'd like to set a Output Channel. But I've not managed to do this, could somebody give me a tipp?
I tried Calllib and libpoint but nothing works.

addpath('C:\01_IVM\02_Modellauto\DLL');
loadlibrary('K8055D.dll','K8055D.h');
libfunctionsview('K8055D')

%% Opening the Card
ChannelAdress = 0;
calllib('K8055D', 'OpenDevice',ChannelAdress);
%% Read Analog Channel
ans = calllib('K8055D', 'ReadAnalogChannel',1)
%% Set Analog Channel
calllib('K8055D','SetDigitalChannel',3)
calllib('K8055D', 'CloseDevice');

Error Message:
Segmentation violation detected at Thu Sep 29 14:51:53 2005

thx mario
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor