Jump to content
OMRON Forums

_MATLAB_definitions.pmh is not being generated by MATLAB.


moha_sa

Recommended Posts

Hi All,

 

According to PMAC IDE page 394 (shown in the attachment too), when we use MATLAB to generate C code, in particular when we want to set up a tunable parameter as shown in the attachment, after clicking on *create files* button it is expected to see that “…_MATLAB_definitions.pmh” is being generated where ... is the name of a Simulink model, but this file is not created. I am using MATLAB R2021b and I see the following error appearing on MATLAB workspace as soon as I click that *create files* button.

 

Error using Simulink.BlockDiagram.createVarStruct

Too many output arguments.

 

Error in CreateStructuredModel

 

Error in PPMAC_param3

 

Error in gui_mainfcn (line 95)

feval(varargin{:});

 

Error in PPMAC_param3

 

Error in matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)PPMAC_param3('pushbutton1_Callback',hObject,eventdata,guidata(hObject))

 

Error while evaluating UIControl Callback.

 

Any idea how I can successfully generate “…_MATLAB_definitions.pmh” or what is wrong?

 

Thanks.

_MATLAB_definitions.pmh is missing.pdf

Link to comment
Share on other sites

The issue is the MATLAB version. Are you able to use 2020b or 2016a?

 

Thanks Eric for your suggestion. Back to your comment we installed MATLAB 2020b on our windows 10. Still we are receiving the same error as before and do not see that the *..._MATLAB_definitions.pmh* file is being created. Please see attachments which shows the content of ppmactarget folder and our model files inside the *stepMDL__traj_ppmac* folder.

 

Any idea how we can create *..._MATLAB_definitions.pmh* based on the manual?

 

Thanks a lot.

ppmacTarget folder.pdf

no _MATLAB_definitions.pmh file is created.pdf

Link to comment
Share on other sites

  • 2 weeks later...

The issue is the MATLAB version. Are you able to use 2020b or 2016a?

 

I tried older MATLAB versions like 2020b and 2017b to generate [put simulink model name here]_MATLAB_definitions.pmh, but it did not work and still gives the same error as noted in the first message. We do not have license for older versions like 2016a. Any idea how we can solve this dependency file problem to take care of tunable gains in the matlab generated c-code? Thanks.

Link to comment
Share on other sites

  • 1 month later...

  

I already tried with 2019b and 2016a (which I guess it is the last compatible version on older IDE versions).

It generated different files and I have the same problem of tunable gains.
Apparently, Simulink substitutes the parameters with the gains defined in the workspace.

I would suggest identifying the desirable tunable parameter in the C code and manually changing with "phsm->P[1]", for example. I never tried that, so it's just a guess

  

  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...