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
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