Dear all,
Im using Allen Bradley Compact Logix L36ERM as a PLC.
and facing a problem where I need to create a FIFO buffer that fills an ARRAY[200] that are REALs.
Background: Running Fast Frequency Response (FFR) as a service by our energy management system requires rapid logging for Transmission Line Operator (Electric).
Task:
If action A is triggered, the Variable X needs to be pushed into an ARRAY that is later collected in an IPC and out as a response in an API query. The API response is the ARRAY[200]
Logging interval of each REAL shall be 100mS. I just see that i might will run into scan time and timer issues with this method. Do you agree that an external logger of type PLX51-DL-232 would be better fitted for this purpose or has anyone succeeded with the task above.
Some example code that does it purpose for now, however greatly affected by ScanTime/Task/Timers
FFR_CTD_Array.PRE:=199;
FFR_Timer_Log.TimerEnable:= FFR_Triggered;
TONR (FFR_Timer_Log);
CTUD(FFR_CTD_Array);
IF FFR_Timer_Log.DN AND FFR_Triggered AND NOT FFR_CTD_Array.DN THEN
FFR_Data_Buffer_Frequency[FFR_CTD_Array.ACC] := IV_HZ.Value;
FFR_Timer_Log.Reset:=1;
FFR_CTD_Array.CUEnable:=1;
FFR_BR:=1;
else
FFR_Timer_Log.Reset:=0;
FFR_CTD_Array.CUEnable:=0;
FFR_BR:=2;
END_IF;
IF NOT FFR_Triggered THEN
FFR_CTD_Array.Reset:=1;
FFR_Timer_Log.EnableIn:=0;
FFR_BR:=3;
else
END_IF;
Im using Allen Bradley Compact Logix L36ERM as a PLC.
and facing a problem where I need to create a FIFO buffer that fills an ARRAY[200] that are REALs.
Background: Running Fast Frequency Response (FFR) as a service by our energy management system requires rapid logging for Transmission Line Operator (Electric).
Task:
If action A is triggered, the Variable X needs to be pushed into an ARRAY that is later collected in an IPC and out as a response in an API query. The API response is the ARRAY[200]
Logging interval of each REAL shall be 100mS. I just see that i might will run into scan time and timer issues with this method. Do you agree that an external logger of type PLX51-DL-232 would be better fitted for this purpose or has anyone succeeded with the task above.
Some example code that does it purpose for now, however greatly affected by ScanTime/Task/Timers
FFR_CTD_Array.PRE:=199;
FFR_Timer_Log.TimerEnable:= FFR_Triggered;
TONR (FFR_Timer_Log);
CTUD(FFR_CTD_Array);
IF FFR_Timer_Log.DN AND FFR_Triggered AND NOT FFR_CTD_Array.DN THEN
FFR_Data_Buffer_Frequency[FFR_CTD_Array.ACC] := IV_HZ.Value;
FFR_Timer_Log.Reset:=1;
FFR_CTD_Array.CUEnable:=1;
FFR_BR:=1;
else
FFR_Timer_Log.Reset:=0;
FFR_CTD_Array.CUEnable:=0;
FFR_BR:=2;
END_IF;
IF NOT FFR_Triggered THEN
FFR_CTD_Array.Reset:=1;
FFR_Timer_Log.EnableIn:=0;
FFR_BR:=3;
else
END_IF;