MATLAB/Simulink komponentlarini loyihalash




Download 462,66 Kb.
Pdf ko'rish
bet4/6
Sana13.07.2024
Hajmi462,66 Kb.
#267505
1   2   3   4   5   6
Bog'liq
Glava-11.-Interfeys-podprogrammy-MATLAB (1)

MATLAB/Simulink komponentlarini loyihalash
! MODUL: Simulink bilan Matlab interfeysi
!
I_CNT = 1
!
!
! PSCAD MATLAB INTERFEYSI
#LOCAL
INTEGER I_CNT, M_CNT
#REAL
SAQLASH:12
! ni ishga tushirish uchun *.m fayllariga qo'ng'iroq qiling
muhit...(Atrof muhitni ishga tushirish uchun *.m fayllarni chaqirish)
!
!
M_CNT = 0
Machine Translated by Google


#IF
($OPTSEC == 0 )
! Kirishlarni EMTDC STORF massiviga o'tkazing
MLAB_INT
("$Path","$mName2","" ,
STORF(NSTORF + 1) = DELT
DO
I_CNT = 1, $#DIM(kirish)
AGAR
(TIMEZERO)
SHUNDA
#ENDIF
#ELSE
TUGATISH
MLAB_INT
("$Path", "$mName1", "", "")
!
!
!
M_CNT = 1
!
#IF
"$mName2" != ""
STORF(NSTORF) = VAQT
!
!
"")
M_CNT = 2
STORF(NSTORF + M_CNT + I_CNT-1) = $sig_in(I_CNT)
ENDIF
STORF(NSTORF) = VAQT
M_CNT = M_CNT + I_CNT - 1
#ENDIF
! PSCAD MATLAB INTERFEYSIGA QO'NG'IROQ
#IF
"$mName1" != ""
! *.m yoki *.mdl modulini ishga tushirish uchun TIME ma'lumoti (*.m yoki *.mdl modulini ishga tushirish
haqida ma'lumot)
#ENDIF
Machine Translated by Google


Komponent ta'rifi kodda ishlatiladigan o'zgaruvchilarni belgilaydigan parametr sahifalaridan foydalanadi. Kategoriyalar
sahifasi quyidagi sahifaga o'xshaydi:
#ELSE
!
I_CNT = I_CNT + 1
NSTORF = NSTORF + M_CNT + I_CNT - 1
I_CNT = 1
!
#IF
$OPTSEC == 0
!
! Saqlash qatorini yangilang
! MATLAB chiqish o'zgaruvchilarini uzatish
!
SIMULINK_INT
("$Path","$simfile","R(5)")
TUGATISH
#ENDIF
!
QILISH
(I_CNT .LE. $#DIM(chiqish))
CALL
MLAB_INT("$Path","$mfile","R(6)","R($#DIM(chiqish))")
$sig_out(I_CNT) = STORF(NSTORF + M_CNT + I_CNT - 1)
Machine Translated by Google



Download 462,66 Kb.
1   2   3   4   5   6




Download 462,66 Kb.
Pdf ko'rish

Bosh sahifa
Aloqalar

    Bosh sahifa



MATLAB/Simulink komponentlarini loyihalash

Download 462,66 Kb.
Pdf ko'rish