3
« on: July 09, 2008, 10:44:55 PM »
Further testing completed.
1) The ArrayIndex error occurs more often when dCusF functions are called often. The error rate is nearly eliminated when a minimum time between any dCusF function call is set to 5 seconds (timer value of 50). Prior arrangement triggered various dCusF calls based upon the special bits 0.5 sec, 1sec and utilized timers and logic conditions. There is a hard relationship between the ArrayIndex error and the time between dCusF calls. When the minimum time between calls is reduced, the arrayindex error quickly returns. When the time is increased, the arrayindex error is nearly eliminated (or takes more than a day to occur).
This test was conducted by allowing dCusF calls to only occur in a specific order and only after a minimum time interval completed since the last dCusF completed. Only then would the next dCusF function be called.
2) In response to the previous post: The SAVE_EEP and LOAD_EEP statements have not be executed on the most recent tests (as related to the recent blog entries). The dCusF functions containing these instructions are inactive and never triggered (never executed).
3) SOLUTION IMPLEMENTED - ARRAYINDEXOUTOFBOUNDS ERROR:
ExcelLink data recording utilizing the ExcelLink Run/Pause/Stop buttons has been abandoned. Excel macros have been developed to start/stop ExcelLink actions. The macros also monitor data recordings using the TimeStamp features of ExcelLink compared to the NOW() Excel function. If the time between NOW() and the most recent ExcelLink data entry exceeds a predefined setpoint, the following command sequence occurs:
1) DDE STOP command issued to ExcelLink
2) The current Excel sheet is copied to a new sheet
3) The original sheet is cleared of all recorded data
4) DDE RUN command is issued to ExcelLink
5) Data recording continues at the top of the cleared Excel sheet.
Special Conditions:
ExcelLink must not be started for at least 1 minute following the error, otherwise the RUN command may fail. I am guessing this corresponds to the "Suspended for 1 minute" message from ExcelLink. The Excel Macro command "OnTime" is utilized to send the DDE RUN command following a 1.5 minute delay.
Further details of the Macro design are available if desired.