Why do the "To xPC Target" and "From xPC Target" blocks in xPC Target 2.0.2 (R13SP1+) have the wrong number of arguments?

3 views (last 30 days)
Models with the "To xPC Target" and "From xPC Target" blocks always lead to an error message related to the block initialization commands. It says there are too many arguments for "getsignalid" or "getparid".
The error message looks like this:
"Error in block 'model_name/From xPC Target ': Block
initialization commands cannot be evaluated. MATLAB error message:
Error using ==> getsignalid Too many input arguments"

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
"To xPC Target" and "From xPC Target" blocks in xPC Target 2.0.2 (R13SP1+) do not work because of a problem with the initialization script. You can modify the existing library to fix this (only in xPC Target 2.0.2 (R13SP1)).
1. Type "xpclib" at the MATLAB prompt.
2. Choose from pull down menu "Edit\Unlock Library".
3. Choose Misc blocks
4. Right click on the "To xPC Target" block
5. Choose "Edit mask" and choose the "Initialization" tab
6. In line 6, make the following replacement:
paramid=xpcgate('getparid',blockpath, paramname,appname);
to
paramid=xpcgate('getparid',[appname,'/',blockpath], paramname);
7. Edit the "From xPC Target" block mask in the same way
and make the following replacement:
id=xpcgate('getsignalid',blockpath,appname);
to
id=xpcgate('getsignalid',[appname,'/',blockpath]);
8. Save and close the xpclib library.

More Answers (0)

Products


Release

R13SP1

Community Treasure Hunt

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

Start Hunting!