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

7 views (last 30 days)
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

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 1 Jul 2022
Edited: MathWorks Support Team on 23 Jun 2021
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.

More Answers (0)

Products


Release

R2006a

Community Treasure Hunt

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

Start Hunting!