Project

General

Profile

Javascript » History » Version 5

Torbjorn Carlqvist Admin, 09/01/2021 02:19 PM

1 2 Torbjorn Carlqvist Admin
h1. Javascript guide for DTXr code IDE
2 1 Torbjorn Carlqvist Admin
3 4 Torbjorn Carlqvist Admin
h2. print - Prints a message to footer log window as well as the automation.log file
4 1 Torbjorn Carlqvist Admin
5 2 Torbjorn Carlqvist Admin
<pre><code class="javascript">print("hello");</code></pre>
6 1 Torbjorn Carlqvist Admin
7 4 Torbjorn Carlqvist Admin
h2. readProperty - Reads an object property value
8 3 Torbjorn Carlqvist Admin
9 4 Torbjorn Carlqvist Admin
<pre><code class="javascript">
10
//Reads a present value from analog input object 0.
11
Controller.readProperty(85343,analogInput,0,presentValue);
12 5 Torbjorn Carlqvist Admin
13
//Use the result to print and in logic
14
res = Controller.readProperty(85343,analogInput,0,presentValue);
15
print(res);
16
if ( res > 0 ){
17
  print("value larger than 0!");
18
}
19 4 Torbjorn Carlqvist Admin
</code></pre>