The following DAQ tags allow users to change the run-time Datalog Trend definition in View/ViewDAQ using Keymacros and scripts. Please use SETVAL to the following DaqTags to make changes to Data Log Trend Displays.
%TDTRDCGN: Datalog Trend Group Number (See note below on %TDTRDCGN).
%TDTRDCGD was added to allow users to change the description of a Datalog Trend Group which is defined by %TDTRDCGN. Please note that the change is local to ViewDAQ/View client and will not be written back to Database.
%ADTRDDT(: Datalog Trend Data Type, range is 0 to 3
%ADTRDH: Datalog Trend Tag Highlighted, range is 0 to 11
%ADTRDST: Datalog Trend Span Type, range is 0 to 23
%ADTRDXP: Datalog Trend X Tag Pos for XYPLOT, range is 0 to 11
%DDTRDON(: Datalog Trend Group Tag On/Off, 1 is on and 0 is off
%TDTRD1(: Datalog Trend Tagname
%TDTRD4(: Datalog Trend Display Low
%TDTRD5(: Datalog Trend Display High
For example:
To change the run-time definition of trend group 111 (see note below on %TDTRDCGN),
<SETVAL>%TDTRDCGN=111
To set the initial highlighted position to the 2nd tag for trend group 111,
<SETVAL>%ADTRDH=1
To set the X tag position of XYPLOT to the 6th tag for trend group 111,
<SETVAL>%ADTRDXP=5
To set the display span to 24-hour for trend group 111,
<SETVAL>%ADTRDST=9
To set the data type to minimum for the 7th tag for trend group 111,
<SETVAL>%ADTRDDT(6)=2
To turn off trend display for the 1st tag for trend group 111,
<SETVAL>%DDTRDON(0)=0
To add/replace tag name as abc for the 3rd tag for trend group 111,
<SETVAL>%TDTRD1(2)=abc
To set display low to -1000.0 for the 12th tag for trend group 111,
<SETVAL>%TDTRD4(11)=-1000.0
To set display high to 1000.0 for the 9th tag for trend group 111,
<SETVAL>%TDTRD5(8)=1000.0
The following examples illustrate the syntax used in scripts.
To change the run-time definition of trend group 234,
TCL Script:
SETVAL %TDTRDCGN =234
VB Script:
SETVAL “%TDTRDCGN=234”
JAVA Script:
SETVAL(“%TDTRDCGN=234”);
Please note that the value of %TDTRDCGN is always set to the current trend group number when Datalog TREND/XYPLOT is displayed. Any SETVAL to %TDTRDCGN will be ignored. That means the change of the run-time definition can only be made to current trend group if it is performed inside Datalog TREND/XYPLOT display.s: