Why does the COM API xPCScopes.AddHostScope method from xPC Target 2.6.1 (R14SP1) always return zero?

1 visualizzazione (ultimi 30 giorni)
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.

Risposta accettata

MathWorks Support Team
MathWorks Support Team il 27 Giu 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

Più risposte (0)

Prodotti


Release

R14SP1

Community Treasure Hunt

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

Start Hunting!

Translated by