18.01.2015 Views

Technical Reference Manual - InduSoft

Technical Reference Manual - InduSoft

Technical Reference Manual - InduSoft

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Appendix: Built-in Scripting Language<br />

strStartDate<br />

strStartTime<br />

numDuration<br />

numGroup<br />

strTargetFile<br />

The start date of the data.<br />

The start time of the data.<br />

Numerical tag containing duration of the data in hours.<br />

Numerical tag containing trend group number.<br />

String tag containing path and name of the file to be written.<br />

optStrSeparator<br />

Optional The data separator character for file. If omitted, the function uses the TAB character<br />

(\t) to separate the values in the text file.<br />

optNumMilliseconds<br />

optStrFormat<br />

Optional numeric tag. If this parameter is false (0), the text file created will not show milisecondprecision<br />

on the timestamp of each history sample.<br />

String tag, which specifies the order of the Month (M), Day (D), and Year (Y) for the time-stamp<br />

format exported to the text file:<br />

• "DMY": Day, Month, Year<br />

• "MDY": Month, Day, Year<br />

• "YMD": Year, Month, Day<br />

If omitted, the function uses the format DMY for the timestamp in the text file.<br />

optNumInterval<br />

Optional numeric tag specifying the sampling interval. Only line itmes at this interval are written<br />

as text to the target file; all other line items in the Trend history are discarded.<br />

For example, if optNumInterval has a value of 10, then only every tenth line item is written<br />

out.<br />

Returned value<br />

−3<br />

Invalid number of parameters<br />

−2<br />

Dll functions not found<br />

−1 InStudiot.dll not found<br />

0 Function was executed successfully<br />

1 Error. Previous execution of the HST2TXT has not yet been completed<br />

Examples<br />

Tag Name<br />

Expression<br />

Tag HST2TXT( "04/14/2002", "06:30:00", 0.1, 3, "C:\Studio\data.txt", "\" )<br />

Tag HST2TXT( "04/14/2002", "06:30:00", 0.1, 3, "C:\Studio\data.csv", "," ,<br />

"MDY" )<br />

Tag HST2TXT( "04/14/2002", "06:30:00", 0.1, 3, "C:\Studio\data.csv", "," ,<br />

"MDY", 10 )<br />

Page 638<br />

<strong>InduSoft</strong> Web Studio

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!