Why does the COM API xPCScopes.AddHostScope method from xPC Target 2.6.1 (R14SP1) always return zero?
1 view (last 30 days)
Show older comments
I utilize the following statement in my code:
rtnvalue = xPCScopes.AddHostScope(scopeID)
where "scopeID" is the identification number of a host scope and "rtnvalue" is either -1 or 0, depending on the success of the function call. Here, -1 indicates success and 0 indicates failure.
When I set "scopeID" to the ID of an existing scope, I receive a return value of zero. I also obtain a return value of zero when I set "scopeID" to a unique Host Scope ID.
Accepted Answer
MathWorks Support Team
on 27 Jun 2009
We have verified that there is a bug in xPC Target 2.6.1 (R14SP1) in the way that the COM API xPCScopes.AddHostScope method returns error values.
To work around this issue, use the xPCTarget.isxPCError method to detect any errors from a call to the xPCScopes.AddHostScope method. For more information about this method, refer to the documentation accessed by issuing the following command at the MATLAB prompt:
doc xpctarget.isxpcerror
0 Comments
More Answers (0)
See Also
Categories
Find more on Target Computer Setup in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!