Applies To:
  • CitectSCADA 1.00 1.01 1.10 1.11 1.20 2.00 2.01

Summary:
If you configure a report to send more than one record to a dBase file, you will get blank records between the valid records. For example if your report has the following format:

{Date()}{Time()}{Tag1}
{Date()}{Time()}{Tag2}
{Date()}{Time()}{Tag3}

After generating 2 reports, the dbf file appears like:

13/04/94 15:20:49 1000

13/04/94 15:20:49 2000

13/04/94 15:20:49 3000
13/04/94 15:20:55 1000

13/04/94 15:20:55 2000

13/04/94 15:20:55 3000

This occurs because the report format contains a carrage return after the last }. This carrage return will cause a blank record to be inserted into the database.

 

Solution:
You can avoid this problem by only sending one record to the dBase file in a report, and writing three reports. You can also put all the fields on one line as shown below:

{Date()}{Time()}{Tag1}{Date()}{Time()}{Tag2}{Date()}{Time()}{Tag3}

Another solution is to use Cicode to write the data to the dBase device directly. For example:

{CICODE}
hDev = DevOpen("Log", 0);
DevAppend(hDev);
DevSetField(hDev, "DATE", Date());
DevSetField(hDev, "TIME", Time());
DevSetField(hDev, "VALUE", Tag1);
DevAppend(hDev);
DevSetField(hDev, "DATE", Date());
DevSetField(hDev, "TIME", Time());
DevSetField(hDev, "VALUE", Tag1);
DevAppend(hDev);
DevSetField(hDev, "DATE", Date());
DevSetField(hDev, "TIME", Time());
DevSetField(hDev, "VALUE", Tag1);
DevClose(hDev);
{END}

See also Q1142

 

Keywords:
 

Attachments