필터 지우기
필터 지우기

How does matlab handle activex variant function calls?

조회 수: 4 (최근 30일)
Steven
Steven 2015년 1월 26일
댓글: Steven 2015년 1월 26일
I am calling an activex control that interfaces with a usb device. I can get as far as to see the function calls but I can't seem to get data back and forth like I do in python. The first thing I do is pass in text of the usb device id and then I get a handle string back that I pass into the openpipe function, then I can access the usb device via the read functions. In matlab it returns an NAN when I try GetConnectedDevices. In python it has to build a com wrapper file to translate the data, is matlab not translating the data it gets back right?
>> device = actxserver('USBommited.ommited.1'); >> invoke(device) GetConnectedDevices = Variant GetConnectedDevices(handle, string) OpenPipe = uint32_T OpenPipe(handle, string) ClosePipe = void ClosePipe(handle) ReadPipe = [uint32_T, Variant(Pointer)] ReadPipe(handle, uint32_T) ReadPipeBytes = Variant ReadPipeBytes(handle, uint32_T)
>> iscom(device)
ans =
1
>> ismethod(device,'GetConnectedDevices')
ans =
1
>> device.GetConnectedDevices('CC476332-BBC1-4737-8376-B237C00199C0')
ans =
NaN
>>
  댓글 수: 1
Steven
Steven 2015년 1월 26일
>> invoke(device)
GetConnectedDevices = Variant GetConnectedDevices(handle, string)
OpenPipe = uint32_T OpenPipe(handle, string)
ClosePipe = void ClosePipe(handle)
ReadPipe = [uint32_T, Variant(Pointer)] ReadPipe(handle, uint32_T)
GetDeviceDescriptor = [uint32_T, Variant(Pointer)] GetDeviceDescriptor(handle, string)
GetStringDescriptor = [uint32_T, string] GetStringDescriptor(handle, string, char, uint16_T)
GetParentDeviceInstanceID = string GetParentDeviceInstanceID(handle, string, string)
ReadPipeBytes = Variant ReadPipeBytes(handle, uint32_T)

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 ActiveX에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by