Project

General

Profile

Javascript » History » Revision 5

Revision 4 (Torbjorn Carlqvist Admin, 09/01/2021 02:15 PM) → Revision 5/28 (Torbjorn Carlqvist Admin, 09/01/2021 02:19 PM)

h1. Javascript guide for DTXr code IDE 

 h2. print - Prints a message to footer log window as well as the automation.log file 

 <pre><code class="javascript">print("hello");</code></pre> 

 h2. readProperty - Reads an object property value 

 <pre><code class="javascript"> 
 //Reads a present value from analog input object 0. 
 Controller.readProperty(85343,analogInput,0,presentValue); 

 //Use the result to print and in logic 
 res = Controller.readProperty(85343,analogInput,0,presentValue); 
 print(res); 
 if ( res > 0 ){ 
   print("value larger than 0!"); 
 } 
 </code></pre>