Hello I have a couple basic questions about the IDE in the ewon flexy 205.
-
I am running the following scripting in the cyclic section. The code scans a bunch of statuses and then gives an flag if ANY are in alarm. It also adds them up. I need to know should I run this scripting in INIT with a timer or leave in the cyclic section. It needs to scan at least every second
$NumRows = 16
For i% = 1 To $NumRows
A$ = “BPRO_DIA_R” + STR$(i%)
B$ = “BPRO_SOV_R” + STR$(i%)
C$ = “BPRO_LL_R” + STR$(i%)
J% = GETIO A$
k% = GETIO B$
L% = GETIO C$
If j% = 1 THEN q% = q% + 1
IF q% > 0 THEN DIA_STATUS_FAIL@ = 1 ELSE DIA_STATUS_FAIL@ = 0
If k% = 1 THEN r% = r% + 1
IF r% > 0 THEN SOV_STATUS_FAIL@ = 1 ELSE SOV_STATUS_FAIL@ = 0
If l% = 1 THEN s% = s% + 1
IF s% > 0 THEN LL_STATUS_FAIL@ = 1 ELSE LL_STATUS_FAIL@ = 0
Next i%
If i% >= 16 THEN i% = 1
SETIO “DIAP_NUM_ALMS”, q%
SETIO “SOV_NUM_ALMS”, r%
SETIO “LL_NUM_ALMS”, s%
q% = 0
r% = 0
s% = 0
$NumAlms = 96
For t% = 1 To $NumAlms
D$ = “BPRO_ALM_” + STR$(t%)
M% = GETIO D$
If M% = 1 THEN V% = V% + 1
Next t%
If i% >= 16 THEN i% = 1
SETIO “TOT_NUM_ALMS”, V%
V% = 0 -
Im trying to log a tag value only when the value changes either from a 0 to a 1. Im trying to use the following scripting but it says syntax error. Again I need to know if Im to use the INIT section - alot of people online are saying not to use the cyclic section - but doesnt INIT run only once once the IDE is running??
this is not working -
ONCHANGE “BPRO_SC_RMS_RESULT”, LOGIO “PRO_SC_RMS_RESULT”
ONCHANGE “BPRO_SC_TEMP_RESULT”, LOGIO “BPRO_SC_TEMP_RESULT”
ONCHANGE “BPRO_SC_UPSCALE_RESULT”, LOGIO “BPRO_SC_UPSCALE_RESULT”
ONCHANGE “BPRO_SC_ZERO_RESULT”, LOGIO “BPRO_SC_ZERO_RESULT”