MATLAB SIMULINK 7 - DEVELOPING S-FUNCTIONS Podręcznik Użytkownika Strona 77

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 210
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 76
Overview of the C MEX S-Function Routines
3-33
either 1 or N.YoucanusessGetInputPortWidth in the routines called during
the simulation loop to determine the actual port width being used.
You canalso specifythat input and/or output signals aredynamicallysized(via
the
DYNAMICALLY_SIZED define). Simulink determines the corresponding
widths when it propagates vector widths throughout your model. You can
influence the vector width propagation via the
mdlSetInputPortWidth and
mdlSetOutputPort width routines. If your S-function doesn’t specify these
routines, then the default scalar expansion rules apply.
The best way to understand the default scalar expansion rules is to consider a
an S-function implementing a sum block with three input ports. The block has
an overall width, called the block width, equal to the width of the output port.
Eachinputport can have a width of 1 or the blockwidthproviding thatat least
one input port has a width equal to the b lock width. Each dynamically sized
work vector will be set to the block width. See
matlabrooot/simulink/src/
sfun_multiport.c
for an example.
If this handling of dynamically sized input and output signals doesn’t meet
your needs, then you need to use the optional routines
mdlSetInputPortWidth
and mdlSetOutputPortWidth.
Note You must correctly specify the number of ports before setting a ny
properties. If you attempt to s et a property of a port that doe sn't exist, you wi ll
be accessing invalid memory and S imulink will crash.
mdlSetInputPortSampleTime
This routine is c al le d wi th the candidate sample time for a n inherited sample
time input p ort . If the propose d s amp le time is acceptable , t he ro utine should
go ahead and set the actual port sample time using
ssSetInputPortSampleTime. I f the s ample time is una ccep ta ble an error
should gene rated via ss Se tErrorStatus. No te th at any o th er inh e rited in p u t or
output ports whose sample times are implicit ly defined by the sample time of
the given port can also have t heir widths set v ia calls t o
ssSetInputPortSampleTime or ssSetOutputPortSampleTime.
Przeglądanie stron 76
1 2 ... 72 73 74 75 76 77 78 79 80 81 82 ... 209 210

Komentarze do niniejszej Instrukcji

Brak uwag

Privileg 283.820 9/20015 podręczniki

Instrukcje obsługi i podręczniki użytkownika dla Pralki Privileg 283.820 9/20015.
Dostarczamy 1 pdf podręczników Privileg 283.820 9/20015 do pobrania za darmo według typów dokumentów: Instrukcja Użytkownika






Więcej produktów i instrukcji dla Pralki Privileg

Modele Rodzaj dokumentu
118.907 5/20263 Instrukcja Użytkownika   Privileg 118.907 5/20263 Benutzerhandbuch, 48 strony
266.471 2/20064 Instrukcja Użytkownika   Privileg 266.471 2/20064 Benutzerhandbuch [de] [en] , 44 strony
34512 Instrukcja Użytkownika   Privileg 34514 Benutzerhandbuch [en] , 52 strony
53615 Instrukcja Użytkownika   Privileg 53615 Benutzerhandbuch, 52 strony
27614 Instrukcja Użytkownika   Privileg 27614 Benutzerhandbuch [ja] [zh] , 48 strony
59614E Instrukcja Użytkownika   Privileg 59614E Benutzerhandbuch [de] [es] [fr] [it] [nl] [pt] , 52 strony
6255 Instrukcja Użytkownika   Privileg 6255 Benutzerhandbuch [en] , 48 strony
269.159 0/20093 Instrukcja Użytkownika   Privileg 269.159 0/20093 Benutzerhandbuch [ja] , 48 strony
360.614 2/20287 Instrukcja Użytkownika   Privileg 360.614 2/20287 Benutzerhandbuch, 48 strony
PRIVILEG9482, 20420 Instrukcja Użytkownika   Privileg PRIVILEG9482, 20420 Benutzerhandbuch, 48 strony
00899187_21350 Instrukcja Użytkownika   Privileg 00899187_21350 Benutzerhandbuch, 52 strony
126.006 6/20309 Instrukcja Użytkownika   Privileg 126.006 6/20309 Benutzerhandbuch, 48 strony
639.863 0/20021 Instrukcja Użytkownika   Privileg 639.863 0/20021 Benutzerhandbuch, 44 strony
83512 Instrukcja Użytkownika   Privileg 83514 Benutzerhandbuch, 52 strony
775.600 0/20306 Instrukcja Użytkownika   Privileg 340.593 3/20307 Benutzerhandbuch, 48 strony
266.471 2/20064 Instrukcja Użytkownika   Privileg 266.471 2/20064 Benutzerhandbuch, 44 strony
30716 Instrukcja Użytkownika   Privileg 30716 Benutzerhandbuch [en] , 52 strony
503.663 7/20310 Instrukcja Użytkownika   Privileg 775.542 4/20312 Benutzerhandbuch [bs] [hr] [sk] , 48 strony
00396536_21121 Instrukcja Użytkownika   Privileg 00396536_21121 Benutzerhandbuch, 52 strony
268.027 0/20289 Instrukcja Użytkownika   Privileg 268.027 0/20289 Benutzerhandbuch [pl] , 46 strony