Functions for Trend
Type | Format | Description |
Subroutine | ResetTrend(“YT Trend Name”, Pen number) | Resets min/max values of the pen to the default value in the YT trend. |
Subroutine | SetPenStatus(“YT Trend Name”, Pen number, Option) | Shows or hides a pen from the YT trend. |
Subroutine | SetTrendRatio(“YT Trend Name”, Pen number, Min value ratio to set, Max value ratio to set) | Changes min/max values ratio of the pen in the YT trend. |
Subroutine | SetTrendZoom(“YT Trend Name”, Pen number, Min value to set, Max value to set) | Changes min/max values of the pen in the YT trend. |
Subroutine | TrendCsvWr(“TrendName”, Location) | Saves the trend data as a CSV file. |
Function | TrendGetPenVal(“YT Trend Name”, Pen number, Set value) | Returns set value from the min/max value of the pen in the YT trend. |
Function | TrendSetPenVal(“YT Trend Name”, Pen number, Set value, min/max value to set) | Sets description or min/max value of the pen in the YT trend. |
ResetTrend | Resets min/max values of the pen to the default value in the YT trend. |
Subroutine | ResetTrend(“YT Trend Name”, Pen number) |
Description | You can reset the minimum and maximum value of a specified pen to the default value. YT trend name: The name of the YT trend object. Pen number: Pen number to reset min/max value (1~16). |
Example | Resets the min/max value of the first pen to the default value in the YT trend object named “Trend”. ResetTrend(“Trend”, 1); |
SetPenStatus | Shows or hides a pen from the YT trend. |
Subroutine | SetPenStatus(“YT Trend Name”, Pen number, Option) |
Description | You can show or hide the specified pen from the YT trend. YT trend name: The name of the YT trend object. Pen number: Pen number to show or hide (1~16). Option: Show 1, Hide 0. |
Example | Shows the first pen in the YT trend object named “Trend”. SetPenStatus(“Trend”, 1, 1); |
SetTrendRatio | Changes min/max values ratio of the pen in the YT trend. |
Subroutine | SetTrendRatio(“YT Trend Name”, Pen number, Min value ratio to set, Max value ratio to set) |
Description | Changes the minimum and maximum value ratio of the pen by assigned set values. Changed values can be reset by using the ‘ResetTrend’ subroutine. Each parameter has the following criteria: YT trend name: The name of the YT trend object. Pen number: Pen number to change min/max value ratio (1~16). Min value ratio to set: A ratio of minimum value (0~99). Max value ratio to set: A ratio of the maximum value (1~100). The minimum value ratio cannot be bigger than the maximum value ratio. |
Example | Changes the min/max value ratio of the first pen in the YT trend object named “Trend” as 20% and 80%. SetTrendRatio(“Trend”, 1, 20, 80); |
SetTrendZoom | Changes min/max values of the pen in the YT trend. |
Subroutine | SetTrendZoom(“YT Trend Name”, Pen number, Min value to set, Max value to set) |
Description | Changes the minimum and maximum values of a pen by assigning set values. Changed values can be reset by using the ‘ResetTrend’ subroutine. Each parameter has the following criteria: YT trend name: The name of the YT trend object. Pen number: Pen number to change min/max value (1~16). Min value to set: A value larger than the current minimum value but smaller than the current maximum value. Max value to set: A value larger than the current minimum value but smaller than the current maximum value. The minimum value to set cannot be bigger than the maximum value to set. |
Example | Changes the min/max value of the first pen in the YT trend object named “Trend” as 30 and 100. SetTrendZoom(“Trend”, 1, 30, 100); |
TrendCsvWr | Saves the trend data as a CSV file. |
Subroutine | TrendCsvWr(“TrendName”, Location) |
Description | Saves the assigned TrendName to the assigned location in CSV file format. When you assign 0 at Location, it means the local. The value 1 means the SD/MMC and the value 2 means the USB. You can also assign the Location as shown below. 0: _LOCAL_ 1: _SDMEM_ 2: _USBMEM_ The file is saved as “Trendname_MMDDHHmmss.CSV”. |
Example | Saves the trend object named “Trend” as a CSV file in the USB memory. TrendCsvWr(“Trend”,2); |
TrendGetPenVal | Returns set value from the min/max value of pen in the YT trend. | |
Function | N = TrendGetPenVal(“YT Trend Name”, Pen number, Set value) | |
Description | Returns min/max value of the specified pen. YT trend name: The name of the YT trend object Pen number: Pen number to return min/max value (1~16) Set value | |
2 | Minimum value | |
3 | Maximum value | |
7 | Current value in historical mode | |
8 | Current time in historical mode (Numerical value, time_t format) | |
9 | Minimum value of the current frame in historical mode | |
11 | Maximum value of the current frame in historical mode | |
15 | Current time in historical mode (String value, YYYY-MM-DD hh:mm:ss) | |
Example | Returns the maximum value of the first pen in the YT trend object named “Trend”. N = TrendGetPenVal(“Trend”, 1, 3); |
TrendSetPenVal | Sets the description for the min/max value of pen in the YT trend. |
Function | N = TrendSetPenVal(“YT Trend Name”, Pen number, Set value, min/max value to set) |
Description | Configure the settings of the specified pen in the YT trend. YT trend name: The name of the YT trend object Pen number: Pen number to change the settings. Set value: Description 1, minimum value 2, maximum value 3 The function returns 1 when the value set is successful. Otherwise, the function returns 0. |
Example | Set the minimum value of the first pen in the YT trend object named “Trend” to 10. N = TrendSetPenVal(“Trend”, 1, 2,10); |