Answers

Feb 02, 2021 - 06:06 PM
So you can't use the selector component?
#BEGIN
RTCI(NRTCI) = $A
NRTCI = NRTCI + 1
#ENDBEGIN
#STORAGE RTCI:1
IF ($Ctrl .EQ. RTCI(NRTCI)) THEN
$Out = $InA
ELSE
$Out = $InB
ENDIF
NRTCI = NRTCI + 1
!
#BEGIN
RTCI(NRTCI) = $A
NRTCI = NRTCI + 1
#ENDBEGIN
#STORAGE RTCI:1
IF ($Ctrl .EQ. RTCI(NRTCI)) THEN
$Out = $InA
ELSE
$Out = $InB
ENDIF
NRTCI = NRTCI + 1
!
By
You should not hash with IF and ELSE IF. For your custom parameters, use simple IF and ELSEIF not #IF ....
By
it did not worked what must I have been doing wrong?
By
#LOCAL REAL iref
#LOCAL REAL iup
#LOCAL REAL ilow
#LOCAL REAL gate
iref = $Imax*SIN(TWO_PI*60*TIME)
iup = iref+iref*0.1
ilow = iref-iref*0.1
IF ($I>iup) THEN
gate = 0
ELSE
gate = 1
ENDIF
$gate1 = gate
By
Thank you Jan, now it worked just fine !
Add New Comment