Internet PLC Forum

General => Technical support => Topic started by: cjohnsoon on December 06, 2003, 02:23:27 PM

Title: TRi-ExcelLink
Post by: cjohnsoon on December 06, 2003, 02:23:27 PM
How would I get TRi-ExcelLink to write to a spreadsheet at a precise time of day?  I am trying to log the daily energy production from a photovoltaic array and also the total daily energy use of the building.  The PLC (TM1001616+) resets daily quanity to zero at midnight.  The data logging interval varies by a few minutes each day when set to 86,400 seconds.
Title: Re: TRi-ExcelLink
Post by: support on December 08, 2003, 07:11:53 PM
The TRi ExcelLink writing interval is not meant to be very precise since it is based on a Java thread sleep time which can be affect by the execution of other application.

What you can do is to use the ExcelLink as a DDE server and then write a VB Script (Excel macro) that monitor the PC's internal clock and at the precise moment where you want to capture the data, you can activate the ExcelLink action that have been defined to capture the data into the spreadsheet. You can obtain more info about how to use the ExcelLink DDE server function from the ExcelLink help file or from the following link:

http://www.tri-plc.com/ExcelLink/ddecontrol.htm

There is a sample Excel spreadsheet file called "testmacro.xls" in your ExcelLink folder. You can open it and find out how to trigger the ExcelLink action from within Excel program.