Why do I receive "??? Error: Catastrophic failure" when I try to drive SCAPS SAMLight using the ACTXSERVER function within MATLAB 7.2 (R2006a)?

6 次查看(过去 30 天)
I want to drive the SCAPS SAMLight software from MATLAB. This laser scanner interface software is described on the SCAPS website listed below.
To install SAMLight software demo on my computer I follow these steps:
1. Download the executable:
2. Download the project in C :
3. Unzip and install the executable.
When I excecute the following code:
a = actxserver('SCAPS.ScSamlightClientCtrl');
liste = a.interfaces;
c = a.invoke('_DSamlight_client_ctrl_ocx');
c.get
c.invoke
state_of_sam = c.ScIsRunning()
I get the following result:
ERROR: ??? Error: Catastrophic failure

采纳的回答

MathWorks Support Team
编辑:MathWorks Support Team 2021-6-23
Since the SCAPS.ScSamlightClientCtrl is an ActiveX control and not an ActiveX server,
you can access this program using ACTXCONTROL:
a = actxcontrol('SCAPS.ScSamlightClientCtrl');
liste = a.interfaces;
c = a.invoke('_DSamlight_client_ctrl_ocx');
c.get
c.invoke
state_of_sam = c.ScIsRunning()
For more information, refer to the SCAPS documentation.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Use COM Objects in MATLAB 的更多信息

产品


版本

R2006a

Community Treasure Hunt

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

Start Hunting!

Translated by