0

Error: Cannot propagate frame-based signal through input 'MATLAB Function5' because this input

expects a sample-based signal. The frame-based signal originates from 'mzmzmzcpy/MATLAB

Function5/ SFunction '. Consider inserting an Unbuffer in the signal path.

I am using frame based processing, I save a whole frame in memory and want to read this frame

at the time I need it at the input of same block but every time I get this error, I have tried

both "memory" and "data store memory" blocks, can anybody help me to know how can I change

sampling mode of input as I have tried using "converter" block to change output of "data read

memory" block to frame output even then i found the same error(Cannot propagate frame-based

signal through input 'MATLAB Function5' because this input expects a sample-based signal), then

i tried using buffer but then i found the error given at the beginning of this note.

Saira Bashir
  • 17
  • 1
  • 5

1 Answers1

0

Have you defined the output(s) of your MATLAB Function block "MATLAB Function5" to be frame-based rather than sample-based? See MATLAB Function Block Editor in the documentation for more details.

EDIT: If I understand correctly, from your picture, it looks like the problem is with the signal coming out of the memory block. I think memory blocks do not support frame-based signals (or at least, from what I can see in the documentation). As suggested in the comments, try inserting a Signal Specification block before feeding the signal to the MATLAB Function block to enforce a frame-based signal. Failing that, I am not sure, you may want to contact MathWorks for help.

am304
  • 13,758
  • 2
  • 22
  • 40
  • Yes, previously I'd defined only data frame output as frame-based but now I i have tried using all outputs as frame-based although they were either flags or numbers even though I get the same error:MATLAB Function Interface Error:- Cannot propagate frame-based signal through input 'MATLAB Function2' because this input expects a sample-based signal. The frame-based signal originates from 'mzk/MATLAB Function2/ SFunction '. Consider inserting an Unbuffer in the signal path. – Saira Bashir Sep 05 '13 at 11:31
  • It would help to see the code in your various MATLAB Function blocks. I suspect some of the functions you use in there do not support frame-based signals. – am304 Sep 05 '13 at 11:46
  • Also, have you tried the Signal Specification block? http://www.mathworks.co.uk/help/simulink/slref/signalspecification.html – am304 Sep 05 '13 at 11:47
  • 1st block :function [packet,packetnum1,stp]= packetform(contdata, pass,packetnum, prevpack) %#codegen prevpack=zeros(1,256); if pass==1 || packetnum==0 && packetnum<1000 packetnum1=packetnum+1; packet=contdata; else packet=prevpack; packetnum1=packetnum; end if packetnum>=1000 stp=1; else stp=0; end – Saira Bashir Sep 05 '13 at 12:30
  • can I send you whole model it's a simple one? – Saira Bashir Sep 05 '13 at 12:31
  • I don't have access to Simulink anymore unfortunately, but a screenshot would be useful, showing which signal(s) is/are causing the problem – am304 Sep 05 '13 at 12:33
  • Here is link of model picture, actually last signal of marked block is causing problem,http://i43.tinypic.com/k1uupt.png – Saira Bashir Sep 05 '13 at 16:27