# SAMPLE

<figure><img src="https://lh7-us.googleusercontent.com/slidesz/AGV_vUfzGt5Xz744qDrakYCaXU0qCqT4h4B9NTfFJebUbS51apo8RY1Rq66G6HOqOGVxOo3ixFo30wPtoL32RDD-ZaXmAcD8qTU3ls1Lv5_S6V-AFxtZ1PDy8Z0Ybg4Vk4sPPwsvwuB6nmguuTNbUfVTYhMTEZqYWkc=s2048?key=npIi8zOHIy81LrwrrhJT2w" alt=""><figcaption></figcaption></figure>

**The** **Thermostat Lock** object is connected in series between the UI and the VRF system. Additionally, if the air conditioner has its wired controller, the output points from the VRF are also connected to the **Thermostat Lock** object. This configuration ensures that even if a command is issued from the air conditioner via the remote, the lock function will still be enforced.

To activate the **Thermostat Lock** object, it must be enabled via the **Enable** input.

### SCRIPT SAMPLE

<figure><img src="https://lh7-us.googleusercontent.com/slidesz/AGV_vUccM4-gIvD0fubZNs4Nbbd5MaaEf3U-gyhdRXgnlWcenFCBKfCuV58MoFoh50NGPELnp6L6twWhw1vL_MBTD2SPRFPkjU_KUijpISBryGROsV-WcAUqUqoiBUqjswhmAsVVfPOSST3nPGO6n10nw3bxCvOOfept=s2048?key=npIi8zOHIy81LrwrrhJT2w" alt=""><figcaption></figcaption></figure>

In this example, the values from **Value 1** and **Value 2** inputs are multiplied together, and the result is provided to the **Output**.

```javascript
/*Example java script base schema*/
(
  Class.extend({
      /*Port defination*/
      INPUT_1:{ value:0/*required*/,
                connections: {}/*required*/,
                name: 'INPUT_1'/*unique name required*/,
                order: 1/*required*/,
                portType: 'input'/*required*/,
                titles: {default: 'Value1'} /*required*/},
      INPUT_2:{ value:0/*required*/,
                connections: {}/*required*/,
                name: 'INPUT_2'/*unique name required*/,
                order: 2/*required*/,
                portType: 'input'/*required*/,
                titles: {default: 'value2'} /*required*/},
      OUTPUT_1:{ value:0/*required*/,
                connections: {}/*required*/,
                name: 'OUTPUT_1'/*unique name required*/,
                order: 1/*required*/,
                portType: 'output'/*required*/,
                titles: {default: 'output-1'} /*required*/},
      /*Example 'run' function.*/
      run:function(){
          /*Sample operation.*/
          _this_.setOutputValue('OUTPUT_1',this.INPUT_1.value * this.INPUT_2.value);
      },
      /*All input changed events.*/
      onInputChanged:function(input,value){
          /*Sample operation.*/
          _this_.setOutputValue('OUTPUT_1','Name:'+input.name+' value:'+value);
      }
	})
);
```
