I am wanting to fill a table with error codes so I can see the actual errors before the strategy crashes and causes a restart. The error log is cleared when this happens and simply using PAC Terminal or Message Viewer also initiates the crash.
How would I set it up to shift all table contents by table[x+1] and insert the newest error into table[0] so I get a FIRST IN, FIRST OUT setup?
Mary wrote this ages ago when we did not have that FIFO command;
// Add to the message log.
MsgLog_Messages[MsgLog_LastLogIndex] = MsgLog_NewMessage;
// Increment index and check for wrap around
MsgLog_LastLogIndex = MsgLog_LastLogIndex + 1;
if (MsgLog_LastLogIndex >= MSGLOG_LENGTH) then
MsgLog_LastLogIndex = 0;
endif
I am trying to log the errors in a table. The table is a string table and the variable is a string variable.
When I comment out the âShiftStringTableElementsâ command the errors stop.
Just a follow-up. The firmware on the controller was too old and did not support the new commands. I updated the firmware and easy peasy, everything is working.