Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simulink: Two simulation steps within one

Status
Not open for further replies.

oldskier

Electrical
Joined
Apr 29, 2011
Messages
1
Location
DE
Hello everyone,

Here is the problem: I have a simulink block-diagram scheme which represents a simple stepper motor control system. It consist of two parts - first is stepper itself with power source and controlled H-bridge, second part prepares control signals for that bridge. Input for the whole scheme is a sequence (1xN vector) of rotation values in degrees. Now how it should work: having the stepper motor step size (0.045 deg for example) system should compute how many steps should be done by stepper to achieve next position (next rotation value in sequence) and (let's say 2 steps should be done) output 2 corresponding control signals to H-bridge. The problem is, that if on let's say first simulation step motor should do two steps, that means that within one simulation step motor should do two simulation steps...

I tried to do that with For Loop, but it seems that For Loop performs all its iterations within one simulation step, which is not suitable in my case. Is it possible to solve such problem?

Many thanks in advace for an answer!

Best regards, Peter.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top