Azzera filtri
Azzera filtri

Programming error calling map2qquad. SampleInterval not positive.

1 visualizzazione (ultimi 30 giorni)
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 Commento
Ishan
Ishan il 3 Gen 2023
Your model seems to be working fine with the following output. Can you provide more information on what you are trying out?

Accedi per commentare.

Risposte (2)

Gianluigi
Gianluigi il 3 Gen 2023
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 Commenti
Ishan
Ishan il 3 Gen 2023
Modificato: Ishan il 3 Gen 2023
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 il 3 Gen 2023
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?

Accedi per commentare.


Gianluigi
Gianluigi il 3 Gen 2023
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

Prodotti


Release

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by