UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor cosmonayt
Visitor
7,127 Views
Registered: ‎12-04-2014

MCode block ports problem

Jump to solution

Hello, everyone ! Could you please help with some problem.

I'm trying to make Simple Detector example from System Generator User Guide. I created a function file for MCode block with following code

 

function z = xlmax(x, y)
if x > y
z = x;

else
z = y;
end

 

But after applying this function to MCode block in Simulink model block's input and output ports just vanished ! So I cant wire other block to it. There is no error report or something. Function m-file and model file are in the same directory. I'm working in MATLAB 2013b and System Generator from Vivado Design Suite 14.3. Please, help.

0 Kudos
1 Solution

Accepted Solutions
Xilinx Employee
Xilinx Employee
12,352 Views
Registered: ‎02-06-2013

Re: MCode block ports problem

Jump to solution

Hi

 

Do you see the issue with other examples too.

 

Try below steps

 

1.Create the M file file save in the directory and then just create a new model and add Mcode Block it should detect the m file and should show the inputs and out ports.

 

2.If one doesn't work,trying clearing cache,closing matlab and repeat the above steps in a different directory and check if there is any issue with the path of directory.

 

Regards,

Satish

--------------------------------------------------​--------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful.
--------------------------------------------------​-------------------------------------------
0 Kudos
2 Replies
Xilinx Employee
Xilinx Employee
12,353 Views
Registered: ‎02-06-2013

Re: MCode block ports problem

Jump to solution

Hi

 

Do you see the issue with other examples too.

 

Try below steps

 

1.Create the M file file save in the directory and then just create a new model and add Mcode Block it should detect the m file and should show the inputs and out ports.

 

2.If one doesn't work,trying clearing cache,closing matlab and repeat the above steps in a different directory and check if there is any issue with the path of directory.

 

Regards,

Satish

--------------------------------------------------​--------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful.
--------------------------------------------------​-------------------------------------------
0 Kudos
Visitor cosmonayt
Visitor
7,076 Views
Registered: ‎12-04-2014

Re: MCode block ports problem

Jump to solution

Thanks a lot ! It seems that cache clearing was useful.

0 Kudos