Thread Subject: integrator sample time

Subject: integrator sample time

From: John reilly

Date: 15 Sep, 2008 12:03:01

Message: 1 of 2

i have a custom library block with a component (C) that contains a continuous time integrator. i have a model that contains a switch case, and one of the cases runs component C. i am trying to build my model for xPC Target, so i set the solver type to fixed-step. if i use a discrete solver, i get a build error because C's integrator has states. if i use an ode4 solver, i get an error that says:

   Sample time [0 0] of 'WindTunnelTestOct08_4xpc/Plant/C/Integrator' does not match the sample time [0.001288659793814433 0] of the SwitchCase block ' ' controlling its execution.

the sample time of my SwitchCase block is -1. integrator has no sample time parameter. how can i fix this? or must i switch to a discrete integrator?

i am using R2007b, xPC target 3.3, Simulink 7.0.

thanks.

reilly.

Subject: integrator sample time

From: Omur Bas

Date: 16 Sep, 2008 14:52:02

Message: 2 of 2

Switching to a discrete-time integrator is probably your best bet.

Omur

"John Reilly" <jrhokie1.nospam@yahoo.com> wrote in message <galitl$c70$1@fred.mathworks.com>...
> i have a custom library block with a component (C) that contains a continuous time integrator. i have a model that contains a switch case, and one of the cases runs component C. i am trying to build my model for xPC Target, so i set the solver type to fixed-step. if i use a discrete solver, i get a build error because C's integrator has states. if i use an ode4 solver, i get an error that says:
>
> Sample time [0 0] of 'WindTunnelTestOct08_4xpc/Plant/C/Integrator' does not match the sample time [0.001288659793814433 0] of the SwitchCase block ' ' controlling its execution.
>
> the sample time of my SwitchCase block is -1. integrator has no sample time parameter. how can i fix this? or must i switch to a discrete integrator?
>
> i am using R2007b, xPC target 3.3, Simulink 7.0.
>
> thanks.
>
> reilly.
>

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us at files@mathworks.com