From: Kate J. on
bump
From: Gordon Weast on
Kate,

I don't know why you're getting the 'cannot be added' error. That seems
strange. Do you still have the previous model of the same name open
or did you close it before you ran xpcsliface? When I've tried it,
I didn't have the tgmdlsimxpc model open from the previous try.
I created my model pairs in R2007b, the same version you said you're
using.

This isn't my area of expertise. Other members of the group could
help more since they know more about how its all implemented. Have
you been working through our tech support group? They should be
contacting the correct person in our group to help.

When I get busy, I may not check this newsgroup for a few days
so you will get better response by contacting tech support directly.

Gordon Weast
xPC Target Development
The MathWorks

Kate J. wrote:
> Thanks for your latest response, Gordon. You said:
>
>>> Note, in the to and from blocks if you don't use xpcsliface but work
>>> directly with them, the first parameter is populated with two single
>>> quotes. That really is an error.
> Great, this confirms what I discovered myself; trying to use the single
> quotes surrounding the filename didn't seem to work... glad to have
> confirmation.
>
>
>>> Using the tagging mechanism and xpcsliface is the easy way to get the
>>> signal and parameter names correct.
> ok, thanks for the clarification. My game plan is to try to get your simple
> model working, and then decide if I should also use the xpcsliface function
> for my own model as well. However, if there are only 4 parameters in the Mask
> Parameters box of the To and From xPC Target blocks, I'm still not sure why
> I'm apparently having so many problems getting these values right, when I
> verified twice with my Mathworks engineer that I had the right values for
> them... what other values could I enter??
>
> Just to reiterate, here are my Mask Parameter values for:
>
> To xPC Target block: application name = Target_model (my target model's name)
> Path to Block in target application = FromHost (the block in Target that
> receives Host's value) Parameter name = value Specify target name = TargetPC2
>
>
> From xPC Target block: 1st & 4th parameters from To block repeated here
> Signal name (block name) = TargetOut1 (name of desired output signal in
> Target model) Observer sample time = 1
>
>
> I corrected my capitalization error (xPCTag(1) = ...), and you were right,
> this solved that particular error. However, now when I execute
> xpcsliface('tgmdl'), I get the error: Error using ==> add_block A new block
> named 'tgmdlsimxpc/sinewave' cannot be added.
>
> ans = taggedSrcBlks: {tgmdl/Sine Wave'} taggedPortObjs: 272.0010
>
>
> I executed xpcsliface('tgmdl') both before and after I added the
> "xPCTag(3,4,5)=amp bias freq;" tag to the sine wave block; however, both
> times, the output/error above was identical.
>
> Also, in your earlier post, one of your suggested steps was:
>>> Run xpcsliface('tgmdl') creating tgmdlsimxpc.mdl with a from xPC block
>>> with attachment to 'tgmdl' and the signal 'sine'.
> When I execute xpcsliface('tgmdl'), in addition to the output/error above,
> this new model with this same name (tgmdlsimxpc.mdl) is indeed created;
> however, it only contains a single block, named 'sinewave', that has 2
> visible values within the block icon, 'Sine Wave' and 'SineType'. Again, this
> is the same both before and after I added the tag "xPCTag(3,4,5)=amp bias
> freq;" to the tgmdl's Sine Wave block -- i.e., I don't appear to get either
> the From or To blocks that you said I should...
>
> Ever seen these problems before? Your advice is appreciated... thanks.
From: Kate J. on
>> I don't know why you're getting the 'cannot be added' error. That seems
>> strange. Do you still have the previous model of the same name open
>> or did you close it before you ran xpcsliface?
No, only one model with that name is open at one time (I only have 1 copy, which I've modified as you suggest).

Thanks for the tip, I will also consult with a Mathworks support engineer on this.