Programming - First steps
P.
39 of 349
Once again if
Comments?
A note on the
if
-statement:
The query condition of the
if
-statement must be of data type b01, i.e. binary with length 1 bit. This is
verified by the integrated compiler of the Enertex
®
EibStudio. Our variable "Switch-1/0/0" is of data
type b01. Therefore, the query
if ("Switch-1/0/0"==ON) then \\
is superfluous (but not wrong). In this case,
if ("Switch-1/0/0") then \\
can be programmed. However, it would be wrong
if ("Switch-1/1/2") then \\
because "Dimmer-1/1/2" represents an unsigned integer. The compiler notices this fact and returns
an error.
You can comment your programming. There are two possibilities:
1.
Comments begin with “//“ and are at the beginning of a line.
2.
Instead
of a statement, comments can be inserted at any point (semi-colon are sensitive),
which are surrounded by /* */, e. g.
/* This is a comment */
u=5;/* This is second in the comment */; u4=5
Congratulations.
Now, you have already understood the most important basics and realized how easy it is to program
the Enertex
®
EibPC.
Below we will show you:
Timer modules, time switches, special functions, variables - The versatility of the Enertex
®
EibPC.
HandbuchEibPC_USA-30.odt, 2017-05-11
Enertex
®
Bayern GmbH - Erlachstraße 13 - 91301 Forchheim - [email protected]