6/23/2018 2:10 AM | |
Joined: 4/9/2018 Last visit: 8/31/2022 Posts: 16 Rating:
|
Hi all. Im having trouble with the scl compiler. It returns "period not allowed". Anyone know what this mean? Im thinking it may got something to do with the structured arrays used in the code (i relly want to keep these). If you have any ideas im happy for some input. Note. Block is alpha version, be kind:) Code; //Build DP state structure, and timestamp changes in state for tiCt:=1 to 128 do //Trigger oneshots for time monitoring tbRtrigHealthy[tiCt] := tbDPHelathy[tiCt] and not sDPstate[tiCt].Healthy; //Healthy pos edge tbRtrigFaulty[tiCt] := (sDPstate[tiCt].Configured and not sDPstate[tiCt].Healthy); //Scratch tbRtrigFaulty[tiCt] := tbRtrigFaulty[tiCt] and not sDPstate[tiCt].Failure; //Failure pos edge //Update static vars sDPstate[tiCt].Configured := tbDPConf[tiCt]; sDPstate[tiCt].Healthy := tbDPHelathy[tiCt]; sDPstate[tiCt].Failure := sDPstate[tiCt].Configured and not sDPstate[tiCt].Healthy; IF tbRtrigHealthy[tiCt] OR tbRtrigFaulty[tiCt]THEN sDPstate.TSFOR[tiCt] := T#0s; //Reset timer sDPstate.TSTAMP[tiCt] := ttNow; //Time stamp event END_IF; sDPstate.TSFOR[tiCt] := ttNow - sDPstate.TSTAMP[tiCt]; if (sDPstate.TSFOR[tiCt] < T#0s) then sDPstate.TSFOR[tiCt] := sDPstate.TSFOR[tiCt] + dint_to_time(cdiMaxTimeValue); end_if; end_for; Attachment(Sys) Diag.zip (23 Downloads) |
L P#Problem |
|
Follow us on