Programming error calling map2qquad. SampleInterval not positive.

조회 수: 4 (최근 30일)
Gianluigi
Gianluigi 2022년 12월 30일
답변: Gianluigi 2023년 1월 3일
Hi,
I am developing a simple circuit with simulink that I have attached to this mail. I get the error:
  • Programming error calling map2qquad. SampleInterval not positive.
I have no idea what this means or how to solve it. I suppose it is related to the Operational Amplifier block which, in this circuit, is the default.
Thank you, gianluigi
  댓글 수: 1
Ishan
Ishan 2023년 1월 3일
Your model seems to be working fine with the following output. Can you provide more information on what you are trying out?

댓글을 달려면 로그인하십시오.

답변 (2개)

Gianluigi
Gianluigi 2023년 1월 3일
Hi Ishan,
thank you for the answer.
It maybe I have not some setting correctely set. Here is my configuration and a screenshot of what it happens when I try to run the simulation.
gianluigi
MATLAB Version: 9.13.0.2049777 (R2022b)
MATLAB License Number: 566431
Operating System: Microsoft Windows 10 Pro Version 10.0 (Build 19045)
Java Version: Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
-----------------------------------------------------------------------------------------------------
MATLAB Version 9.13 (R2022b)
Simulink Version 10.6 (R2022b)
Curve Fitting Toolbox Version 3.8 (R2022b)
DSP System Toolbox Version 9.15 (R2022b)
Data Acquisition Toolbox Version 4.6 (R2022b)
Instrument Control Toolbox Version 4.7 (R2022b)
Mixed-Signal Blockset Version 2.3 (R2022b)
Optimization Toolbox Version 9.4 (R2022b)
Signal Processing Toolbox Version 9.1 (R2022b)
Simscape Version 5.4 (R2022b)
Simscape Electrical Version 7.8 (R2022b)
Spreadsheet Link Version 3.4.8 (R2022b)
Symbolic Math Toolbox Version 9.2 (R2022b)
  댓글 수: 2
Ishan
Ishan 2023년 1월 3일
편집: Ishan 2023년 1월 3일
This error is caused if you set the sample time of any of your blocks to be negative. Try out the attached model file if it works for you. Logging your signals might also help you find out the error.
Gianluigi
Gianluigi 2023년 1월 3일
Hi Ishan,
I tied your version and I have obtained the same error. The only sampling I see is that of the amplifier block, see attachement, that is 10 ns in both your and my design.
The only difference I see is that your project is from the R2023a release, while I am using the R2022b.
Could it depend on this?

댓글을 달려면 로그인하십시오.


Gianluigi
Gianluigi 2023년 1월 3일
I navigated the errors. All starts from the attachement. To sts.SampleTime is assigned the value of 0, while I think the value should be 1e-8.
If I invoke getSampleTime(obj), which is where sts = getSampleTime(obj);, the naswer in the coomand window is:
getSampleTime(obj)
ans =
SampleTimeSpecification with properties:
Type: 'Fixed In Minor Step'
which looks quite strange
gianluigi

카테고리

Help CenterFile Exchange에서 Simulink에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by