DX-2300 Series Industrial Ethernet Cloud Router
5-12
function(val)
function(val) is used for convert the register value, and the
grammar of function-supported JavaScript is similar.
There are two examples for “function (val)”.
Example 1 : If you want to show the wind speed as 10m/s. (Data +unit, such as: speed 10m/s).
1. Input the code: return val+“m/s” in function (val){…} as the following picture.
2. Save the configuration.
Example 2: If you want to convert the register value to the text such as the register value of 1 shows the text as ‘NO’;
register value of 2 shows the text as ‘OFF’
1. Input the code in function (val) {…} as the following picture.
2. Save the configuration.