Do you have a question about the EibPC and is the answer not in the manual?
Questions and answers
Roger De Backer
April 4, 2025
How can one manually adjust the time and date of the EIBPC2
1 comments:
Mr. Anderson
April 4, 2025
To manually adjust the time and date on the Enertexbayern EibPC2, open the "TIME OF DAY AND DATE" dialog. Enter the current date and time manually in the dialog and press OK. Alternatively, you can press the button "Use system time" to set the EibPC time equal to the time on the PC running Eibstudio.
This answer is automatically generated
Summary of Contents for enertexbayern EibPC
Page 1
Enertex ® EibPC Manual ® Requirements Enertex EibPC: Patches 3.000 or higher Enertex ® EibStudio: 3.000 or higher Note Without prior written approval by Enertex ® Bayern GmbH, the contents of this document may not be reproduced, transferred, distributed or stored in any form, either in whole or in part.
Quick start - Enertex® EibStudio ....................................20 Configure the Interface........................................22 The further structure of the manual....................................23 Functional block..............................................23 Introduction programming..........................................23 Complete description of the Enertex® EibPC..................................... 23 Self-defined functional blocks..........................................23 Using pre-assembled functional blocks......................24 Macros/Functional blocks..................................24 Standards............................................24 Staircase lighting...........................................25...
Page 3
4 of 349 Separate Power On and Off......................................42 A hallway light control..................................44 A hallway with time control....................................47 A release button and the validation scheme............................50 A staircase lighting....................................52 Variant 1: No Re-triggering......................................52 Variant 2: Press again........................................55 Date control......................................57 Shading........................................58 Dew-point calculation..................................59 Monitoring of bus services (Monitor)....................................60 Storing messages..........................................60...
Page 4
Factory settings........................................... 137 E-Mail settings (Option NP) ......................................137 Configuration of the KNXTM Interface..................................138 KNXTM bus errors........................................139 The bus monitor of the Enertex® EibPC ..................................140 Connection status feedback......................................140 Two bus monitors........................................140 Save bus data..............................................140 Current bus communication..........................................140 Autolog................................................141 Filter with wildcards............................................
Page 5
OR-links............................................170 Exclusive-OR-links........................................171 Comparison operators.........................................172 Hysteresis-comparison........................................172 Inverting............................................173 Shift..............................................173 System time.......................................174 Setting the time and date of the Enertex® EibPC manually............................174 Synchronization with an Internet timeserver (NTP)..............................174 Synchronization with the KNX™ bus..................................174 Synchronization with the application program................................174 HandbuchEibPC_USA-30.odt, 2017-05-11 Enertex ®...
Page 6
Reset of the date of the Enertex® EibPC ...................................176 Writing the date of the Enertex® EibPC to the KNX™ bus............................176 Reset of the time and the date of the Enertex® EibPC...............................177 Writing the time and the date of the Enertex® EibPC to the KNX™ bus........................177 Hour.............................................177 Minute............................................178 Second............................................178...
Page 8
9 of 349 Address............................................230 Readknx............................................230 Readrawknx..........................................231 GetAddress..........................................234 Gaimage............................................234 Getganame..........................................234 Network functions....................................235 Activation codes...........................................235 Name resolution...........................................235 Standard-Ports..........................................235 UDP telegrams..........................................235 UDP Ports................................................ 235 Readudp................................................235 Sendudp................................................236 Sendudparray..............................................237 TCP server and client........................................238 Server and client.............................................. 238 TCP ports................................................. 238 Connecttcp...............................................
Page 9
10 of 349 Pbutton............................................261 picture............................................262 plink..............................................262 Setslider............................................263 Setpslider............................................. 263 Seteslider............................................. 263 Setpeslider...........................................264 HTTPS............................................264 Configuration of the web server................................265 The design of the web server......................................265 Elements of the web server......................................267 Configuration..........................................271 compact................................................271 Button................................................274 Design................................................274 Mobilezoom..............................................275 Mbutton................................................275 Pbutton................................................
Page 10
11 of 349 Definition............................................313 Special characters........................................314 Runtime errors and syntax errors....................................314 Macro wizard..........................................314 Local Variables and Return Values.....................................314 Online debugging at runtime.......................................316 Technical specifications..........................317 Keywords - reference..................................318 Keywords - reference - alphanumeric order............................329 Predefined variables............................339 Questions and answers............................341 ErrorCode Eventlog...................................341 Problems and solutions..................................344 Changelog.................................345 Version 30 (from Patch 3.100, EibStudio 3.103)..........................345...
Standard support is via the e-mail address: eibpc@enertex.de. At http://knx-user-forum.de Support separate area for support of the Enertex ® EibPC is set up. You will also find direct advice from expert users and professionals. Please send us the following information at any inquiry: ●...
KNX bus system. The Enertex ® EibPC is a scene actuator, a calculator, a logic center, a PLC, a time switch, a LAN and Internet connection as well as a web and e-mail client in one device. With the supplied software Enertex ®...
By means of the Enertex® EibStudio as a configuration program a home automation is provided via the LAN interface of the Enertex® EibPC to a Windows®, Mac® OS X or Linux® PC. This ensures that the Enertex® EibPC can be programmed easily without the ets.
Thus each code can be tested also without bus connection. Against it a defined handshake has the IP interface. The EibPC waits then for the feedback, before it sends telegrams away.
The KNXnet/IP Router is powered via Power over Ethernet or via an external 20-30V AC/DC power supply. The Enertex® EibPC is able to share the power supply with the Enertex® KNXNet/IP Router, if it is ensured that this provides ca. three Watt.
Enertex ® EibPC. The Info LED simplifies the When the EibPC is starting, the RS-232 interface must be already connected to the switched-on bus. commissioning: To ensure this, proceed as follows: Switching on: Wiring as described above.
EibPC can be simultaneously switched on, if the connection to Enertex ® EibPC already exists. It may not be connected after booting the Enertex ® EibPC, because the RS-232 interface can not be properly initialized by the Enertex ® EibPC. HandbuchEibPC_USA-30.odt, 2017-05-11 Enertex ®...
LAN subscriber). The Enertex ® EibPC uses the so-called tunneling mode of the IP interface. During the power up the green Info LED is on continuously. Then the Info LED is blinking every second for 3 seconds. Only during this 3s phase the reset button is active.
EibPC must be accessible via a LAN connection via an IP address. The default setting of the Enertex ® EibPC is the configuration by a DHCP server, i.e. if a DHCP enabled router is enabled, it assigns the Enertex ®...
Page 20
® EibPC the IP address. If your Enertex ® EibPC doesnot find any DHCP server, it assigns itself an IP address after booting. This can be useful if the Enertex ® EibPC is directly connected to the PC. In this case, however, at least a LAN crossover cable between the PC and the Enertex ®...
The Enertex ® EibPC uses the so-called tunneling mode of the IP interface. Thereby, it is exclusively occupied, i.e. you can not address the interface in this mode from the ETS. Nevertheless, in order to allow a short-term access to the interface you can separate the...
23 of 349 Brief instruction The further structure of the Once you have configured the operational network setup, you can start to use the Enertex® EibPC within the KNX -network. manual You can use this manual in different manners: The various sections are constructed to be largely self-contained.
CHGLibrary_FritzBox.lib Fitzbox Coupling (tested User-Library) Sonos.lib Sonos Music player (tested User-Library) Before the Enertex ® EibPC is ready to use, you must perform the basic installation of the Enertex ® EibPC: Installing the Enertex ® EibPC (see page 17). Configuring the Enertex ®...
Using pre-assembled functional blocks Staircase lighting By means of an example, we want to explain the Enertex® EibPC: You should parametrize your customers a staircase lighting. The light duration is less 300 then seconds, the installation is depicted by in Figure 1...
Page 25
26 of 349 Using pre-assembled functional blocks Figure 2: Enertex ® EibStudio Look for the white left and still empty region "Application Program". This region of the Enertex® EibStudio represents an integrated text editor. The necessary information for your program is stored here.
Page 26
Your project should now be completed as shown in Figure 1. Click on the highlighted button to transfer your program to the Enertex ® EibPC in order to finish your automation. Figure 5: Your automation is done The automation is done HandbuchEibPC_USA-30.odt, 2017-05-11...
28 of 349 Using pre-assembled functional blocks Shading of a house You want to implement the shading of a house. To this end, you can use macros from the library "EnertexBeschattung.lib. The orientation of the house is about in the main direction of the compass. The windows are provided with simple blinds.
Page 28
Now press the labeled button of Figure 7. In this case, a dialog opens and you can add libraries. Choose "EnertexBeschattung.lib" (in the download area of www.eibpc.com). Subsequently, the macros are shown, which are stored in the library (cf. Figure 9).
Using pre-assembled functional blocks Visualization with the iPhone If you have an Enertex® EibPC with software option NP at your disposal, you can visualize your home automation with the Enertex® EibPC also via iPhones or similar devices. However, you need an additional tool, e.g.
Page 30
31 of 349 Using pre-assembled functional blocks Now you can click the macro "BeschattungRolloOstZeit" for the east window, and afterward parametrize it (see Figure 1). Select macro Figure 9: Die Macros of the library EnertexBeschattung.lib Now this macro is parametrized for all three windows. The complete automation of the three windows is shown in Figure 10.
Example 1: A switch, a dimmer and a switch actuator A simple program with no As shown in Figure Figure 1, the EibPC is connected to the KNX™bus via an RS-232 interface with group address import FT1.2 protocol. In addition, there is a switch which sends on the address '0/0/1' a on or off signal, a switch actuator for a lamp which receives on address '1/1/1', and a dimmer which receives a percentage value on the address '1/1/2'.
Page 32
By means of the Enertex ® EibPC, this task is simple to solve. We presume you have the documentation of the KNX network at hand (so you know which actuator is configured with which address), but you have no access to the ets or the original records.
Page 33
® EibStudio and subsequently transferred to the Enertex ® EibPC. To do this, press the selected button (Figure 3), or click into the menu “P “ on ROGRAM the appropriate button or use the shortcut "CTRL-SHIFT-B". You can see the syntax highlighting in Figure 4: The Enertex ®...
Page 34
35 of 349 Programming - First steps Therefore, a value of 1 is the binary data type or data type assigned to the percentage. When we write 1b01, we are referring to the binary, when we write 1%, we mean the percentage data. “One“...
Enertex ® EibPC 'knows' the group addresses from your ets programming. Now, all addresses of the ets appear in the upper right area designated "addresses". By simply drag and drop, or CTRL+C or CTRL+V you can now use the addresses in the application program (to represent the group address, see next page).
Page 36
Programming - First steps Back to the problem: One switch - two telegrams, now with imported group addresses. Our implementation is the following: [EibPC] if ("Switch-1/0/0"==ON) then write("Lamp-1/1/1",EIN); write("Dimmer-1/1/2",80%) endif if ("Switch-1/0/0"==OFF) then write("Lamp-1/1/1",AUS); write("Dimmer-1/1/2",0%) endif Most of it is now expected to be known. But we highlight the group address once again.
Page 37
Statement{block}2 endif So, the implementation of the user program is [EibPC] if ("Switch-1/0/0"==ON) then write("Lamp-1/1/1",ON); write("Dimmer-1/1/2"u08,80%) else write("Lamp-1/1/1",OFF); write("Dimmer-1/1/2"u08,0%) endif You may wonder why this is written so small. The answer is: We want to suggest: A statement can not be simply interrupted by a newline ("RETURN").
Page 38
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 ®...
How is the program to be optimally designed? You might say: "Sometimes you can live with this fact, in such cases the user has to press again, until something happens. But, this could be done by the Enertex® EibPC much better. We have designed the function: systemstart()
\\ endif Also this program must be transferred to the EibPC. If you need to read more group addresses you can use the [InitGA] section as described at p. 166. In Initialization of many group this case, the reads of the group addresses in this section have been read before the program is processed.
42 of 349 Programming - First steps The Enertex ® EibPC copies the activities on the bus in its cache (from the process image). Typically, every ms the program is passed through again. The Enertex ® EibPC examines at which point the cache has been changed and processes the corresponding lines once again.
Page 42
It does not check whether the message has changed, what content it has or what type it is. Once a message arrives, this function goes to for a processing cycle of Enertex ® EibPC. In Figure 8, this is shown schematically. (For further details and more event-Functions see p. 169). // Everything is OK if event("ON-Switch-1/0/0") and ("ON-Switch-1/0/0"==ON) then and-function: Only when a telegram write("Lamp-1/1/1",ON);...
The dimmer is parametrized in such a way that it is selectively turned on and off by a switch object "Dimmer-1/1/1" (binary, i.e. data type b01). The brightness of the dimmer is transferred with the group address "DimmerValue-1/1/2. Figure 9 shows the basic structure. EibPC EibPC RS 232 “Switch-1/0/0“...
Page 44
ON (1b01) to the group address 1/2/0, then DimmVar is set to 30%. When the Enertex® EibPC receives the next telegram (and the value in the telegram is different from the current value), DimmVar is set to the new value containing in the telegram.
Page 45
Figure 10 shows the debugger button (alternatively, in the menu “Query of EibPC-value of an EIB-object“). When pressed, a window with variables appears, which you can now click on. For example, Figure 11 shows the query of the constant π. Please note the message window in the Enertex ®...
47 of 349 Programming - First steps A hallway with time control A time switch Example 4: A motion detector, switches and brightness depending on the time of day EibPC EibPC RS 232 “Switch-1/0/0“ “Lamp-1/1/1“ KNX-Bus “Dimmer–1/1/1“ “DimmerValue-1/1/2“ “Motion detector -1/2/0“...
Page 47
48 of 349 Programming - First steps Thus our application program is: [ETS-ESF] // The exported ESF-Data from the ets Time control EibPC/Haus.esf [EibPC] if (systemstart()) then MotionDetector=AUS; read("Switch-1/0/0") ; Motion detector write("Lamp-1/1/1",AUS); write("Dimmer-1/1/2"u08,0%) \\ endif // Variables Switch="Switch-1/0/0" MotionDetector=“MotionDetector-1/2/0“...
Page 48
Read more about this on page 189 and the following. If you want to use time switches, the Enertex ® EibPC has to be acquainted with the time. This is most conveniently achieved if the Enertex ®...
50 of 349 Programming - First steps A release button and the validation scheme EibPC RS 232 EibPC Switch ReleaseSwitch '1/0/1' '1/0/0' Lamp - binary KNX Bus '1/1/1' Dimmer – Percent '1/1/2' Figure 13: Block diagram of switch and release button We have a structure presented as shown in Figure 13.
Page 50
This program is not inherently flawed, but it will work differently than you might have thought. The Enertex ® EibPC processes only expressions which change. Therefore, it remembers the last state, which was sent via a group address. If an ON was sent at the group address "ReleaseSwitch-1/0/1" The Enertex ®...
First, we show the realization of Variant 1. This time without the use of imported group addresses. In this realization, the timer will not restart, if it is already running (no "re-triggering"). First, the Variant 1: No Re-triggering program: [EibPC] if systemstart() then write('1/1/1'b01,OFF) endif SwitchingOperation=OFF Counter=0u32...
Page 52
Enertex ® EibPC. Thus, the condition of the if statement is true and the instruction is executed. You have already got to know all special functions related to the communication via the KNX. Only by using these functions, you can take control the bus.
Page 53
Besides, at the programming of the Enertex ® EibPC, there are character strings with a length of up to 1400 characters. Later in this introduction, we will need these to handle LAN telegrams. With EmptyString=$ Still nothing! $c14...
55 of 349 Programming - First steps EmptyString for the convert function is not evaluated. It merely serves to define the data type for the conversion. Therefore, at this positions, write('1/2/2'c14,convert(Counter,$ $)) is also a possible solution. The following special feature in the program may still seem incomprehensible to you: if event('1/0/0'b01) and (SwitchingOperation==OFF) then \\ SwitchingOperation=ON;...
Page 55
56 of 349 Programming - First steps [EibPC] if systemstart() then write('1/1/1'b01,OFF) endif SwitchingOperation=OFF Counter=0u32 EmptyString=$ Nothing yet! $c14 if event('1/0/0'b01) and (SwitchingOperation==OFF) then \\ Variant 2: SwitchingOperation=ON; \\ Replace after by delay write('1/1/1'b01,ON); \\ Counter=Counter+1u32\\ endif if (delay(SwitchingOperation==ON, 180000u64)) then write('1/1/1'b01,AUS);...
1/2/3: If there is a birthday, this shall be displayed on the display element. In all other cases, the uptime of the Enertex ® EibPC shall be shown. Display birthdays To solve this problem, the macro Online() from the library Enertex.lib is used.
ShadingRolloWestTime(ShadePassing,"WindowWest-2/5/3",""WindowWestStop-2/5/6",4000) [MacroLibs] //Macro-Libraries EnertexBeschattung.lib [ETS-ESF] // From the ets exported ESF-Data Shading.esf [EibPC] ShadePassing=OFF if ("PassingShading-2/5/0"==ON) and ("Light-2/1/1">5000f16) and chtime(9,00,00) then \\ ShadePassing=ON endif // At sunset... if sun()==OFF then \\ write("Window-East-2/5/1",EIN); write("WindowSouth-2/5/2",ON); write("WindowWest-2/5/3",ON) endif Whether the arguments of macros may be variables or group of addresses, or both, depends on the implementation of the macro.
SDDT=6.1078f32 * pow(10f32,(a*T)/(b+T)) DDrT= r/100f32*SDDT v=log(10f32,(DDrT/6.1078f32)) TD=b*v/(a-v) You can use your Enertex EibPC like a calculator - other mathematical functions can be found on ® page 201. HandbuchEibPC_USA-30.odt, 2017-05-11 Enertex ® Bayern GmbH - Erlachstraße 13 - 91301 Forchheim - mail@enertex.de...
Thus each code can be tested also without bus connection. Against it a defined handshake has the IP interface. The EibPC waits then for the feedback, before it sends telegrams away.
You can set up filters so that only messages of certain group addresses or specified device addresses (senders) are displayed or stored. You must first set up the filter (see Figure 19), which you can set up within the menu item EibPC – C ONFIGURE...
Enertex ® EibPC, select the corresponding item in the menu EibPC. If you assign changed group addresses in the application Scene reconfiguration program to the scene actuators stored in the Enertex ®...
(max. 65,000), e.g. for two actuators: [EibPC] scene('1/0/0'u08, "Lamp-1/1/1“, "'Dimmer-1/2/2") scene('2/0/0'u08, "Lamp-1/1/1“, '1/3/2'u08, '5/8/8'f32, '4/4/56's16) The Enertex ® EibPC itself can also address scenes and initiate their storage. There are two functions storescene(GroupAddresseSceneBlock, SceneNumber{u08}) callscene(GroupAddresseSceneBlock, SceneNumber{u08}) Saving scenes Calling scenes...
– After four seconds, the Enertex ® EibPC shall send the string “Start Music“ to port 3807 of the music player via a UDP telegram. – Then, the music player sends a string “Play Music: Title“ to port 4806, in which “Title” is the currently playing track.
Page 64
Now, the rest is fairly quickly done - you are already very familiar with the syntax of the Enertex ® EibPC. What do you only need to know: What are the functions to the UDP and mail delivery? How do you handle and define larger character strings (more than 14 characters)?
Page 65
The Enertex ® EibPC itself always sends from port 4807. This port can not be changed. When sending, the receiver's port is specified on which the recipient receives the telegram. If your LAN device can be addressed by a name and DNS, you can also use the function...
Page 66
The function sendmail writes a message to the e-mail server defined above (see Figure 27). It should be noted that, caused by internal system characteristics, only 255 characters of the specified character string are considered. In particular, Enertex ® EibPC does not transmit more than the first 255 characters of Body of e-mail.
Therefore, we set ourselves the following problem, at which it must be taken into account that the Enertex ® EibPC itself receives only from its port 4806, and that its transmitting port is always 4807. Different The Enertex EibPC receives from port 4806 (port of the sender 5220, sender 192.168.22.22) ®...
Page 68
Command2 react (linked with CheckSender) at each telegram that 192.168.22.22 sends from its port 5220 (the destination port in Enertex ® EibPC is 4806). By linking with the variable Command, the desired telegram analysis is then performed. Accordingly, Command1 Command2...
Page 69
70 of 349 Programming - First steps [EibPC] // Variables Command=0u32;Number1=0u32;Number2=0u32; FloatingPoint=0f32 IP=0u32;Port=0u16 // The both telegram types CheckSender=(IP==192.168.22.22) and (Port==5220u16) Telegram=(event(readudp(Port,IP,Command, Number1, FloatingPoint, Number2 )) or event(readudp(Port,IP,Command, FloatingPoint, Number1))) and CheckSender // Sum back if Command==1000u32 and Telegram then...
If you operate the Enertex® EibPC as a server, a client has to register with the Enertex® EibPC. This is performed automatically by the operating system without your interaction, because the Enertex®...
Enertex® Bayern GmbH tested with the Mozilla Firefox. The webserver in the EibPC is called via the input of the IP in the address line of the browser. The surface can comfortable be created with the Enertex visualisation assistent.
Page 72
While saving the assistant proofs the existing links and warns of inconsistencies or missing group addresses. After connecting all elements with the group address the project has to be loaded into the EibPC- program. A dialog is leading through the necessary steps:...
Page 73
Should the situation arise it could come to delays after the transfer, because all statuses are requested for the webserver. The webserver in the EibPC will be called by the input of the IP in the address line of the browser. Picture: Webserver Example 33: If you wish to get in deeper into the surface programming, please read the following chapter carefully.
Programming - First steps Web server With the option NP, the Enertex EibPC may also carry out the visualization and control of your ® installation. The visualization requires the usage of an Internet browser. Mozilla Firefox has been tested on all PC Plattforms.
Page 75
76 of 349 Programming - First steps First the elements must be configured. This is done in the user program as follows: [EibPC] [WebServer] button(1)[CLOCK]$Time$ none button(2)[DATE]$Date$ line button(3)[INFO]$Rooming$ shifter(4)[PLUS,MINUS,UP,DOWN]$Timer Heating$ chart(5)[$16$,$20$,$24$] line button(6)[TEMPERATURE]$Indoor$ button(7)[TEMPERATURE]$Outdoor$ \\ button(8)[WIND]$Wind$ button(9)[WEATHER]$Light$ line button(10)[LIGHT]$Light$...
Page 76
47 calls, the values are shifted to the left. The x-axis label is specified by the arguments X1, X2 (data type c14) and can be adjusted at runtime. Thus, our application program reads as follows: [EibPC] // Webserver if stime(0) then webdisplay(21,settime(),CLOCK,INACTIVE,GREY) endif if stime(0) then webdisplay(22,setdate(),CLOCK,INACTIVE,GREY) endif // Display of the living room temperature if cycle(30,0) then webchart(10,convert(8.5*("RkLivingroomTemp-3/1/28"-16.0),0), $-25h$c14,$now$c14)
Page 77
HTML file. This response time depends on the utilization of the Enertex® EibPC and may increase slightly. In addition, the web server generates this update command every 30 seconds without user input on the web browser.
79 of 349 Programming - First steps Multiple-page version Multipage version blue-Design Figure 35: The web server – multipage-version, blue-Design Multipage version black-Design Figure 36: The web server – multipage-version, black-Design In figures 35 and 36 the two current desgin variations are shown. By default, the blue version is used.
Page 79
Figure 37: Page navigation To generate a page-oriented visualization, we need at first the page element in section [WebServer]. [WebServer] page(CentralHeatingRoomPageID)[$Basement$,$Heating$] Defining a page [EibPC] CentralHeatingRoomPageID=1 Working with IDs makes it easier later on A page is, therefore, generated by page(ID)[$GroupName$,$PageName$ This command generates the page assignment automatically.
Page 80
81 of 349 Programming - First steps The button with LightID is global, it is identical on every page. Therefore, if you change its status icon or status text line by display or webdisplay, respectively, it changes on all pages. This is different with the local element pbutton with PlugID.
Page 81
{ display(mPlugID,mText,mICON,mState,mDeco,mChoice) } endif Now the user already can operate the listbox, and the Enertex® EibPC „memorizes“ this setting. What is yet missing is task D) and E) of the explanations above. HandbuchEibPC_USA-30.odt, 2017-05-11 Enertex ®...
Page 82
83 of 349 Programming - First steps display It is conspicuous that passes a text, although page 267 states: No text can be displayed in the second line. In the present case indeed no text is displayed, but the element is not “bothered” by display() supplying another argument.
Page 83
Another element for web design is the pslider as a local page-oriented slider and the slider as the global variation thereon. [WebServer] // Page 3 page(SliderPageID)[$2nd floor$,$LivingRoom$] slider(SliderID)[LIGHT]$All dimmers$ pslider(pSliderID)[LIGHT]$TV illumination$ [EibPC] SliderPageID=3 SliderID=4 pSliderID=5 MySlider=getslider(SliderID) The current state is queried via...
Page 84
Icon and the text can be changed. With it, we reach two further important web elements for visualization with the Enertex® EibPC, the mchart. This element can be utilized for embedding external camera pictures or weather forecasts as mchart and picture well as for displaying up to four different graphs for the visualization of arbitrary runs.
[Macros] [EibPC] //// Declarations //// Functions To create our first page in the EibPC, a page ID is required. If possible, this should reflect the display component of the page and is written to the [EibPC] section. HandbuchEibPC_USA-30.odt, 2017-05-11 Enertex ®...
Page 86
GeneralWeatherPageID = 1 For the EibPC to find the background graphic also under the specified path, it must be exported. This is done with the aid of the EibStudio under the tab EibPC and the menu item Data transfer dialog. Upload pictures...
Page 87
88 of 349 Programming - First steps [EibPC] //// Declarations // Initializing the PageIDs for the Visualization Wizard GeneralWeatherPageID = 1 //Initialization of the web element IDs WindID = 1 WolkenID = 2 ClockID = 3 DateID = 4 In order to be able to work faster in the future, it is recommended to select function-oriented ID designations.
Page 88
89 of 349 Programming - First steps Examples: Good: $http://wetter.tagesschau.de/import/wetter-cms/vorhersagen/img/de-vs-tt_webL.jpg$ Bad: $http://www.wetteronline.de/? daytime=day&diagram=true&fcdatstr=20140916&iid=DL&pid=p_city_local&sid=Pictogram$ After selecting the two links, we must also integrate our picture functions in the section [ WebServer]. In order to achieve the framing of the logo on the sides, two none elements must be used between the picture functions.
Page 89
90 of 349 Programming - First steps Figure 45:Macro selection If the correct macro is applied for each Button / Shifter and the corresponding fields are filled in, the following lines are created in the [Macros] section [Macros] // Macros for the weather page in the category General: DateDisplayGlobal(DateID,"Date-7/0/0") TimeDisplayGlobal(ClockID,"Time-7/0/1") WindDisplayButtonGlobal(WINDID,"Wind-14/6/0")
Page 90
91 of 349 Programming - First steps The status statements must now be packaged in if statements in the [EibPC] sector and transferred with pdisplay. [EibPC] //// Functions /// Temperature display dynamic if change("Outdoor temperature-14/6/3") and "Outdoorr temperature-14/6/3">=27f16 then pdisplay(1,"Outdoor temperature-14/6/3",TEMPERATURE,BRIGHTRED,BLINKRED,GeneralWeatherPageID) endif...
Page 91
Winter time=month(01,10) and !month(30,04) Now we realize the display with the functions: webdisplay(ID,Text,Icon,Status,TextStyle) delay(Signal, Time) If we enter our conditions as an if statement in the section [EibPC], the following code is generated: [EibPC] //// Functions /// Weather //Summer time if ( Summer time == ON and "Rain message-14/6/1"== ON) then webdisplay(WolkenID, $It is...
Page 92
StatusHGID = 2 StatusNGID = 3 The linking of the new pages now works. In order to improve this visually, we use the function in the [EibPC] section: plink (ID, text, icon, icon state, PageID, PageSprungIndex) This can change the status of the icon by plink.
Page 93
94 of 349 Programming - First steps After everything has been written in the different sections and we successfully compiled the code, our web server main page is as shown in Figure 41. The status page of the main building is now being built. It should include switch-off facilities for all the lights on a floor as well as the entire main building and indicate whether a window is open on the respective floor.
Page 94
Cellar staircase$ //Fifth Line shifter(ClockID)[CLOCK] $Time$ pshifter(20)[SWITCH]$Turn off all lights$ shifter(DateID)[DATE]$Date$ [EibPC] //// Declarations // Initialization of the PageIDs for the visualization wizard GeneralWeatherPageID = 1 //Initialization of the web element IDs WINDID = 1...
Page 95
If you do not have windows which can be closed by a servomotor, the inclusion of a macro at the end is no longer necessary. The shifter thus serves only as a display. [EibPC] //// Declarations //Variables...
Page 96
2$] design $black$ header(0) footer(0) button(WINDID)[WIND]$Wind in km/h$ pbutton(14)[WEATHER]$Weather$ pbutton(25)[WEATHER]$Rain probability$ pbutton(24)[RAIN]$humidity$ pbutton(12)[TEMPERATURE]$Outer temp.: Min$ pbutton(13) [TEMPERATURE]$Outer temp.:Max$ [EibPC] ///Wounderworld Weather //Weather forecast today if after(systemstart(),3000u64) or change(WeatherForecast_Today_Wind_Max_Direction) then pdisplay(11,$aus$ + convert(WeatherForecast_Today_Wind_Max_Direction,$ $),WIND,ACTIVE,BLINKBLUE,WeatherPageID) endif if after(systemstart(),3000u64) or change(WeatherForecast_Today_Temperatur_Min) then pdisplay(12,convert(WeatherForecast_Today_Temperatur_Min,$$)+$ °C$,TEMPERATURE,ACTIVE,BLINKBLUE,WeatherPageID)endif...
Page 97
Daten) does this task. After the time series has been recorded for some time in the Enertex® EibPC, it must be ensured that these values are not lost even when the program is restarted or rebooted. The functions timebufferstore(ChartBufferID) timebufferread(ChartBufferID) are created for this task.
Page 98
99 of 349 Programming - First steps Now expand the timechart and the configuration as follows: [Webserver] mtimechart(8)[QUAD,NOAUTOSCALE,48,-10,45,-10,65]( $Outdoor temperature$,LEFTGRAF, ChartBuffer1,$Sun altitude$,RIGHTGRAF,ChartBuffer2 [EibPC] Len=35040u16 Datatyp=3.3f16 MemTyp=0 timebufferconfig(ChartBuffer1, MemTyp, Len,"Outdoor temperature-14/6/3" ) timebufferconfig(ChartBuffer2, MemTyp, Len,elevation() ) if mtime(0,0) or mtime(15,0) or mtime(30,0) or mtime(45,0) then {timebufferadd(ChartBuffer1,"Outdoor temperature-14/6/3");...
Page 99
100 of 349 Programming - First steps if mtime(36,05) then picture(4,$RainRadar$,WeatherPageID,URL8) endif if mtime(41,05) then picture(4,$RainRadar$,WeatherPageID,URL9) endif if mtime(46,05) then picture(4,$RainRadar$,WeatherPageID,URL10) endif if mtime(51,05) then picture(4,$RainRadar$,WeatherPageID,URL11) endif if mtime(56,05) then picture(4,$RainRadar$,WeatherPageID,URL12) endif With this code every five minutes the radar image is refreshed, but the URLs are still missing. For this we need the URL of the graphic, which is returned at 09.45 as follows: The numbers marked in bold are responsible for the date, italicized and underlined indicates the time.
Cycletime One of the most asked questions of the user is: How much time does the Enertex® EibPC in fact need for the processing? In principal it depends on the size of program respectively the kind of programming and occurring events.
102 of 349 Programming for experts In total the calculation of the cycle time as follows: // Berechnet die minimale und maximale Zyklusdauer // der Verarbeitung. Dabei ist die Performance-Angabe im EibStudio immer // als Offset dabei. Max=1000000000000000u64 Restzeit=0u64 And the entire code: StoppZeit=Max MaxZyklusZeit=0u64 MaxCycle is the maximum duration...
Perform various KNX actions on the bus Each of these conditions is at least in principle independently of the other i.e. the EibPC has to accept data while e.g. KNX telegrams arrive. In addition various states can “triggering” each other respectively the arrival of a KNX telegram encourage the data processing.
If the resident of a property e.g. goes on vacation the group telegrams will now be triggered by the Enertex® EibPC so that outsiders will have the impression of presence of the residents. There the play has to take place same day and time, so that e.g. the recording of Saturday is played on a Saturday again too.
Page 104
105 of 349 Programming for experts Determination of sending group address For this task you need the function readrawknx: readrawknx(Sim_Control {u08}, Sim_Sender{u08}, Sim_GA{u08}, Sim_IsGA{b01}, Raw information from the bus Sim_RoutingCnt {u08}, Sim_Len{u08}, Sim_Data{c1400}) If any KNX telegram is observed on the bus the function readrawknx updated its arguments. In this case the arguments of the function are “filled”...
Page 105
106 of 349 Programming for experts Determination of raw data of the telegrams Now it is necessary how the raw data of the telegrams on the bus can be determined. For this purpose Code-part 2 f event(readrawknx(Sim_Kontroll,Sim_Sender,Sim_GA,Sim_IsGa,Sim_RoutingCnt,Sim_Len,Sim_Data)) and Sim_Len!=0 and Sim_IsGa and !Sim_Play then { if !Sim_MyGA then Sim_Next=OFF endif;...
Page 106
107 of 349 Programming for experts Determination of telegrams arrival time The points of transmission time of the telegrams have to be determined relative, because a previously recorded simulation relative (time-shifted) to the starting point of the simulation have to take place.
108 of 349 Programming for experts After the preset time the recoding will restart in code-part 3. The first stored values are overwritten , the old values are preserved, which can disturb. Therefore in the above code-part 4 a possibly existing timestamp out of a previous recording is deleted.
Now EibStudio is not able to display the telegram e.g. in OSX because "ä" in UTF-8 would be an another character code as on the KNX bus. On bus the Enertex® EibPC sends the correct code, which can easily be shown based on the raw data.
Use this statement to reserve a 64 Kbyte buffer in Enertex ® EibPC. The transfer of the buffer occurs when either the buffer was completely filled (more on this below) or the number...
Page 110
} endif If no manual flushing or writing is done, the Enertex® EibPC is going to initiate the transfer independently. The transfer takes place when the buffer is full or the configured timeout elapsed (in seconds) since the last transfer.
The second weboutput field should also have its own graphic. At first a PNG or JPG data has to be uploaded at the Enertex® EibPC. This could be done ex ante with the Enertex® EibStudio, which is described on P. 200. The path of the graphic for the weboutput is /upload/ + data name.
Page 112
113 of 349 Programming for experts if systemstart() then { weboutput(Out2,$ <table border="1"><tr> <td class="oben"> <img src="/upload/effb.jpg" alt="Bild fehl"></td> <td class="mittig"><b>Das ist ziemlich wenig! </b><br> Super Sache, wenn wenig Energie im <br> Haus verbraucht wird. <br>Freut sich der Geldbeutel und der <br>...
Instead of the external links in header and footer (comp. p 287) you can now have a reference to the praphics that were saved in the Enertex® EibPC link. Instead of an external link, enter the graphic stored as a path /upload/ + filename in the configuration:...
Programming for experts Visualisation of time series With the EibPC (from V3.000)time series can be easily added, pemanently stored and visualised. For this purpose a (global) diagram element art (p. 279) is availabe on the webserver. As given in the definition on p. 279, diagrams can be labeled with two axes and the scaling can be Advanced Mtimechart (EXT) chosen automatically or by value range specification.
Page 115
The function writes the current value of the variable or group address (data) as well as the timestamp, which is derived from system time of the Enertex® EibPC, in the memory of the selected time series. So there a time series exists exactly out of a combination value-timestamp.
Page 116
This does not affect the other elements of the website. After the time series was taken over some time in the Enertex® EibPC it has to be ensured that these are not los even if reloading of program or restarting the values. The functions...
As indicated in Figure 10 “numbers” the Enertex® EibPC every space from 0 up to max. configured value n-1. In this case, n is the configured buffer length. Figure 10 shows a buffer with length 4000, start position 0 and end position 3999.
119 of 349 Programming for experts Change of the displayed buffer of a Of interest is the possibility to “separate” the pre-configured linking in the web element from time series to the graph and to display the graph in another buffer. mtimechart Here is another example: As shown in Abbildung 4 should be taken a selection via a mpshifter- webelement, which is displayed in the recorded timebuffer.
Page 119
120 of 349 Programming for experts If the user now changes the selection box the corresponding time buffer should be displayed: if mpbutton(SelectID,1,PageID)==255 then { mtimechartpos(TimeChartID,0,ChartBuffer0,0u16,30639u16); pdisplay(SelectID,$Es wird 2011 dargestellt$,DATE,DISPLAY,GREY,PageID,1) } endif Evaluate selection box if mpbutton(SelectID,2,PageID)==255 then { mtimechartpos(TimeChartID,0,ChartBuffer1,0u16,30639u16); pdisplay(SelectID,$Es wird 2012 dargestellt$,DATE,DISPLAY,GREY,PageID,2) } endif if mpbutton(SelectID,3,PageID)==255 then {...
100ms performance problems might not occur. However, this logic is not very flexible or powerful. The Enertex ® EibPC is not limited in this manner. In addition, it has the capability to work with TCP, UDP and any RS232 telegrams and also to carry out extensive calculations.
[EibPC] o=stime(19) Timing functions are not invalidated by their arguments, either. These are set by the timer (internal clock) of the Enertex® EibPC and are invalidated by it depending on the set time. Here, alternates to for a processing cycle each time after 19 seconds of the system timer.
(sending an ON telegram at '1/2/3'b01) after 12:00 and before midnight. The else-branch The else branch of an function is like a second stand-alone function with if-negated query condition: [EibPC] a=OM c='1/2/3'b01 if systemstart() then { if b==1 then { write('1/2/3'b01,OFF);b=2...
For some function calls (such as creating a TCP connection) it can not be guaranteed that they will update their Asynchronous processing return value within a processing loop of the EibPC. Therefore, these functions were implemented as separate threads within the firmware. These threads update their return values according to their own processing and is asynchronous to the main development loop.
● [InitGA] Initialize group adresses The user program (section [EibPC]) is your program for home automation. If you no longer want to get into the programming, a comprehensive library is available, which you can operate without any User program programming knowledge. Refer to page 24.
● if statements, see page 161. Comments, enclosed by /* and */ character (C-syntax) Possible comments: [EibPC] /* Super, this comment */ c=$$ z= 1 // a variable was defined /* Super, a comment also with semicolon */; c2=$$ // comment again...
127 of 349 Enertex® EibStudio Performance The application program is executed according to a so-called “validation scheme“. This means, a statement is only evaluated if a change occurs to its dependency. For further explanation see page 162. The application program is run through all 1 ms, i.e. incoming telegrams are processed in 1 ms intervals.
The compiler (EibParser) inserts the following lines of the section whose end is either defined by a new section or another #addto directive. Example 1 [EibPC] [Macros] mymacro(a) #addto [EibPC] b=a+1 Example 2 [WebServer] page(1) [$EG$,$Kitchen$] button(2) [LIGHT] $Text$ [EibPC]...
129 of 349 Enertex® EibStudio #define Directive ● #define String Effect A symbol (string) is defined for the preprocessor ● Note: The Compiler processes this symbol only with #ifdef directives #undef Directive ● #undef String Effect ● Un-define a symbol (string) for the Praeprocessor Directive #ifdef ●...
130 of 349 Enertex® EibStudio Desktop At a glance – clear and structured Figure 3: Desktop Enertex ® EibStudio for Windows XP ® Legend for Figure 2: Menu bar - access to all functions Toolbar - quick access to important functions Pane to import addresses - they can be inserted via copy and paste into your project Editor - with syntax highlighting and autocompletion...
131 of 349 /share/Texte/Projekte/InterneEntwicklung/1137-HausEmPC/Doku/HandbuchEibPC_USA-30.odt Menubar Menubar Short-Cut Description (Windows) File - New ... Ctrl+N Create a new application program and request an optional ETS export file Open ... Ctrl+O Open an existing user program Save Ctrl+S Overwrite the previously saved or opened file Save as ...
Page 131
The user program is compiled by the Enertex ® EibParser; in the message window a status report appears. Compile Program, send it to EibPC and run it The user program is compiled by the Enertex ® EIBParser, sent to the Enertex ®...
Page 132
The value of an object or a variable can be changed and written to the KNX™ bus Retrieve EIB-Messages ... EIB telegrams are retrieved from EibPC and exported as CSV file Retrieve EIB-Messages from FTP ... Binary files with stored EIB telegrams are retrieved from FTP server and exported as CSV file Retrieve EIB-Messages cyclically ...
Page 133
/share/Texte/Projekte/InterneEntwicklung/1137-HausEmPC/Doku/HandbuchEibPC_USA-30.odt Connection state Query the status of the connection of the Enertex ® EibPC to an EIBnet/IP interface Help Open the manual Pack information for support request Creates a compressed file containing all the necessary firmware and software data for efficent support...
DHCP server. When delivered, the Enertex ® EibPC is set to DHCP. If the Enertex ® EibPC finds a DHCP server, it assigns itself to a free IP address. For this, the Enertex ® EibPC must be connected with a cross-over cable to a PC.
“Automatic“, as shown in Figure 5. In the window “messages“ you will see the response of the Enertex ® EibPC which is entered directly into the dialog Figure 5. If you see an error message, please follow the instructions. Figure 5: Enter network settings If you want to configure the Enertex ®...
EibPC software package “Option NP”, you can also send e-mails with the Enertex EibPC. For this, the activation codes have to be imported (see page 235) and a ® SMTP access has to be set up. Also, you should have set up the DNS server (see above) and the Enertex ®...
The Enertex ® EibPC uses the so-called tunneling mode of the IP interface. Most IP Interfaces provide only one tunnel. Thereby, it is exclusively occupied, i.e. you can not address the interface in this mode from the ETS. Nevertheless, in order to allow a short-...
If the previously noticed faulty telegrams do not appear any more, you have achieved an error-free installation relating to the traffic of the KNX bus and are now able to connect the FT1.2 interface to the Enertex® EibPC. HandbuchEibPC_USA-30.odt, 2017-05-11 Enertex ®...
No PC needs to be connected while recording with the Enertex ® EibPC is performed. The second ring buffer for 10 telegrams is intended for the observation of the current bus traffic. Here you have the ability to filter for specific sender addresses (devices) and group address and to query only relevant data.
141 of 349 Enertex® EibStudio Figure 15: Viewing EIB telegrams If the Enertex ® EibStudio has been started, the bus messages can also be cyclically stored in a file. Autolog The cycle time can be 99 days at most, i.e. the data will be stored in a csv-file all 99 days. In this case the file name is fixed.
1 and subgroup 203 (and any middle group) are going to be processed . Enertex® EibPC can also store telegrams on a FTP server. In this case the telegrams will be stored in binary form at the FTP server. You can set the configuration of the FTP service in the menu S –...
Page 142
143 of 349 Enertex® EibStudio Binary data stored on the FTP-Server can be evaluated and exported into a CSV file by Enertex® EibStudio. Therefore use the Menu EibPC – R EIB M FTP. ETRIEVE ESSAGES FROM Remark For a correct conversion of the binary files on the FTP into a readable format the current loaded application program must be the same as the program, which has stored the binary telegram data on the FTP.
® EibPC and started. As depicted in the user program start of the user program takes 1 to 5 seconds. Figure 21: Compiling user program, send to EibPC and start ETS addresses The Enertex ® EibStudio is directly able to import addresses from the current ets project. For more details, see the description on page 151.
Page 144
When you debug group addresses, the value which is saved for the group address by the Enertex ® EibPC is displayed, (thus no read request on the bus). In the message window the retrieved or written value is displayed. For quick trouble-shooting When you select an object, i.
Page 145
146 of 349 Enertex® EibStudio Setting and querying of variables Figure 24: Debugger If you like to write a value to the EIB for the address “Light2-0/0/2“, as shown in Figure 24, you can choose between ON and OFF, since this is an address of the binary data type. With the option “Read value from bus“...
You can reset the user program in the Enertex ® EibPC. Thus, the present program is cleared and the Enertex ® EibPC is set to idle. The power supply must be interrupted, because this process requires a hardware restart of the Enertex ® EibPC. Proceed as follows: Select the item “Reset program of EibPC ...“...
148 of 349 Enertex® EibStudio Reset button If even this approach does not help, you can press the reset button (see p. 19 for usage). In this case, • the user program, data on the installation location and • • network settings are deleted or reset to default values.
Your time zone can be modified in the menu E PC at “Set Time Zone“. The Enertex EibPC can also be used as the “time master“ within your KNX installation, i.e. to ® periodically send the current system time and date as a KNX™ telegram to all bus users.
Enertex ® EibPC. Please note that during this time the Enertex ® EibPC is blocked. If you are connected with the Enertex® EibPC via the menu E PC → R EIB-M , you will see a status message in this...
In addition, it is possible to directly write to the group address without this import, and thus without the ets project. Page 161 shows the necessary action. Then, within the programming of the Enertex ® EibPC in section [EibPC] you can access the variables and group addresses by using the syntax on page 153.
152 of 349 Variables andKNX™ group addresses Import of group addresses into In order to use the exported group addresses of the ESF data of the ets-project, this file must be written with its complete path and name in the section [ETS-ESF] of the user program.
153 of 349 Variables andKNX™ group addresses Use of variables and group addresses in the user program of the Enertex ® EibPC Schematic configuration of a telegram Telegram structure Bit length Target address User data (of user data) Major gr.
154 of 349 Variables andKNX™ group addresses Numbers (Constants) By the help of the data type, numbers and constants can be declared in the Enertex ® EibStudio. For numbers, the number is preceded by the type of data, thus e. g. ●...
Page 154
155 of 349 Variables andKNX™ group addresses Special type: Character string Character strings are specified in the form ● $String$c14. Here, String represents any text. But this text consists of not more than 14 characters. This type is compatible to the KNX string (e. g.: display elements). ●...
156 of 349 /share/Texte/Projekte/InterneEntwicklung/1137-HausEmPC/Doku/HandbuchEibPC_USA-30.odt An overview of the data types Type Data type Example of a constant Usage Range EIS data type Binary 1b01 Switch actuator, sun-blind actuator 0, 1 EIS1/EIS7 2 bit 2b02 Lock objects 0,1,2,3 EIS8 4 bit 10b04 Dimming 0,1 ...
Page 156
The data types d24, t24, Y64 are KNX DTP types handled properly by their definition in Enertex ® EibPC. An input as a constant is not necessary and therefore not possible. These data types are needed only in connection with the functions getdate and gettime.
158 of 349 Variables andKNX™ group addresses Variables Variables start with letters, followed by any number and combination of letters or numbers, and the “_“ character. Variables are initialized with a value or function. Opposed to keywords and function names, upper and lower case is respected. Therefore, for example address Address...
159 of 349 Variables andKNX™ group addresses Predefined variables In order to make the creation of a user program as simple as possible, variables are predefined in the Enertex® EibStudio. These variables are listed in the Enertex® EibStudio within the window Definitions.
[ETS-ESF] with path and name (on this, see example page 151). Import of the ESF file Within the programming of the Enertex ® EibPC in section [EibPC] you can access the group address by using the following syntax: [EibPC] a="BasementWC-1/0/0"...
161 of 349 Variables andKNX™ group addresses “Manual“ group addresses Besides the possibility to use group addresses by using the ets project data, you can define any group address itself without having to resort to the ets Now, you must only use the following notation: Manual address: 'Group address'Data type...
The Enertex ® EibPC always saves the current state of the contents of the group address. If the Enertex ® EibPC is restarted, this must be taken into account. In this case, the Enertex ®...
Page 162
163 of 349 Variables andKNX™ group addresses Example: Assigning imports group addresses a="BasementWC-1/0/0" b="SaunaLight-1/0/1" c=max("BoilerRoom1-1/0/2","BoilerRoom2-1/0/3","BoilerRoom3-1/0/4") d=min(c,"BoilerRoom3-1/0/4") are allocations of imported group addresses, which are of the data type defined in the ETS. In order to process different numeric data types, you need the convert function (see page 208).
164 of 349 Variables andKNX™ group addresses Writing to the KNX™ bus: Writing information to the KNX bus is realized with the help of the write function. write() Definition ● write(GroupAddress, Value) Arguments 2 arguments of the same data type, but otherwise the data types are arbitrary.. ●...
165 of 349 Variables andKNX™ group addresses Read request of a group The read request of the value of an actuator using the corresponding group address from the KNX bus is realized by means of the read function. address: read() Note: The flag in the ETS program must also be set so that the actuator in the KNX network responds.
(see also gaimage() on p. 234). If started all group address images are set to 0, but as the KNX Bus is already running before the EibPC starts with processing, theses memory images will not hold the real state if they are different form zero (which will be most likely the case).
(p. 208) Data type result (Return) ● none Alternatively to the syntax above the following is possible, too: Example [EibPC] // Temperature manually defined initGA('2/3/4'f16) initGA(“Heating-2/3/4”) initGA(“Lights-2/3/2”) if “Lights-2/3/2” and '2/3/4'f16<10.0 then write(“Heating-2/3/4”,100%) endif Example 2 - comobject The following example shows the use in combination with the function comobject.
168 of 349 Variables andKNX™ group addresses Bus-Activity: This function always responds when a telegram is written for the monitored address on the bus. It does not respond to variables. Event In connection with UDP, TCPIP or RS232 telegrams, it reacts identically to the arrival of UDP messages (see page 235 and page 64, respectively) in the step-by-step introduction.
169 of 349 Variables andKNX™ group addresses EventRead Definition ● Function eventread(Group address) Arguments Group address: Imported or manual KNX group address ● ● The group address can be optionally negated using the !-Sign. Effect Return value: 1b01 (ON pulse) when a Read-telegram with the group address has been ●...
170 of 349 Commands and functions Commands and functions Note: For all arguments or functions, the group addresses can also be used directly instead of variables. Logical operators To create AND-links, the instruction is provided. This statement is constructed as follows: AND-links Definition ●...
171 of 349 Commands and functions Example: OR-link LightActuatorOn is the result of the OR operation of variable ButtonON and variable LightRelease The implementation is then: LightActuatorOn = ButtonOn or LightRelease TButtonOn is 1b01 or LightRelease is 1b01 or both are 1b01, then LightActuatorOn is 1b01, otherwise it is 0b01.
172 of 349 Commands and functions Comparison operators To create Comparison-Links the following instructions are provided Definition ● > greater < less ● ● B equal ● >= B greater than or equal ● =< B less than or equal ●...
173 of 349 Commands and functions Inverting For inverting binary values (data type b01), the following syntax is available Definition ● Arguments ● Argument is of the data type b01 Effect ● The variable is inverted. The result of the operation is 1b01, if the variable A is 0b01 The result of the operation is 0b01, if the variable A is 1b01 Data type result (Return) Data type b01...
OK. Alternatively, you can press the button Use system time to set the system time of the PC, on which Eibstudio runs, equal to the system time of the EibPC. Figure 1: Enter date and Time manually...
Effect ● The system time is read from the Enertex ® EibPC and assigned to a variable as a value. Return value is the current time in DPT format. Data type result(Return) ● Data type t24 Example 1: settime On the 1st of each month, the group address "WallClock-4/3/5"...
● none Effect ● The system date is read from the Enertex ® EibPC. The return value is the time in the format of type d24 Data type result (Return) ● Data type d24 Example: SetDate On the 1st day of each year, the address "Date-3/5/3" is to be synchronized with the date of the Enertex®...
Arguments KNX™ bus ● none Effect ● The system time and system date are read from the Enertex® EibPC and assigned to a variable as a value Data type result (Return) Data type y64 ● Example: SetDate On the 1st day of each year, the address "RadioClock-1/2/1" is to be synchronized with the system time and the system date of the Enertex EibPC and to be reset.
Here the implementation, at which the seconds can be found in the variable Stopper_time and the formatted output in Stopper. Cf.example Stop watch V2 on page 224). [EibPC] Stopper=$$ Stopper_start=0s32 Stopper_time=1s32 Stopper_Go=AUS // Start the stop watch (calculate offset)
Please note that the timer functions can be disturbed by setting or changing, respectively, ● the system time. ● If your Enertex® EibPC establishes an NTP connection, the time is reset again (cf. note on page 174). Data type result (Return) ●...
180 of 349 Commands and functions Definition ● function utc(Zeit) Arguments time as string in format $YYYY-MM-DD HH:MM:SS$, data type c1400 ● Effect ● Converts the time value in YYYY-MM-DD HH:MM:SS format back into a UTC-value. This value is compatible to the Unix time stamp, this value is shown instead of seconds in milliseconds.
181 of 349 Commands and functions Data control A date comparison is defined as follows: Date comparison Definition ● Function date(dd,mm,yyy) with: dd: Day (1..31) mm: Month (1=January, 12=December) yyy: Years Difference (0..255) from year 2000 Arguments All of the data type u08 ●...
182 of 349 Commands and functions Daily comparison A daily comparison is defined as follows: Definition ● Function day(dd) with: dd: Day (1..31) Arguments Argument of data type u08 ● Effect ● The output is 1b01 when the day is reached or already passed. If the day is before the set value, the output goes to 0b01.
183 of 349 Commands and functions Eastermonth Definition ● Function eastermonth(Offset) Arguments Argument Offset Data type s16 ● Effect ● Calculate the month of Easter Sunday. An offset for the calculation is indicated, e.g. Easter Sunday +40 days, Easter Sunday - 30 days.. Data type result (Return) ●...
● Function azimuth() Arguments ● None. However, the Enertex ® EibPC should know the longitude and latitude of the place. These can be entered in Enertex ® EibStudio (see page 184). Effect ● This function cyclically (time frame: 5 minutes) calculates the azimuth of the sun in degrees, north through east.
185 of 349 Commands and functions Elevation Definition ● Function elevation() Arguments None. However, the Enertex EibPC should know the longitude and latitude of the ● ® concerned location. These can be entered in Enertex ® EibStudio (see page 184). Effect ●...
186 of 349 Commands and functions Sunrisehour - hour at sunrise Definition ● Function sunrisehour() Arguments none ● Effect ● The hour (0 to 23) at sunrise is returned. Data type result (Return) ● Data type u08 Sunriseminute - minute at Definition sunrise ●...
Time switches are functions which change their return value from OFF to ON and then back to OFF upon entering the specified time of day for one processing cycle of the Enertex® EibPC. Time switches are objects which trigger regular activities, for example every night at 1:00 clock the garage lighting turns off etc.
● 1 argument is of data type u08 Effect The return value is 0b01, when the current second-time of the Enertex® EibPC's system ● clock is not equal to (hour and minute are not relevant). When the time is reached (and matches exactly), the output value is set to 1b01 (if the date is exceeded, it returns to 0b01).
4 arguments are of data type u08 Effect ● The return value is 0b01, if the current time and day of Enertex® EibPC's system clock are not equal to hh:mm:ss and dd. When the time is reached, the output value rises to 1b01 and remains at this value until the following Sunday, 00:00:00.
Effect ● The return value is 0b01, if the current minute-second-time of the Enertex® EibPC's system clock is not equal to mm:ss. When the time is reached, the output value is set to 1b01 and remains at this value until the next hour.
Effect ● The return value is 0b01, when the current second-time of the Enertex® EibPC's system clock is not equal to ss. When the time is reached, the output value is set on 1b01 and remains at this value until the next minute.
(light duration, debounce against restart) or certain control programmable delay algorithms. The Enertex EibPC responds even in the microsecond range. ® The minimum delay time is 1 ms, the maximum adjustable delay time is approximately 30 years.
193 of 349 Commands and functions Example: Switch off delay If the LightButton (data type b01) is OFF, the variable LightActuator is to go to after 4000 Then, the implementation in the user program reads: if (delay(LightButton==OFF,4000u64)) then LightActuator=0b01 endif Example: Different On- and Off-delay If LightButton (data type b01) is ON, the variable LightActuator (data b01) is to go to after...
194 of 349 Commands and functions After Definition ● Function after(Signal,Time) Arguments Argument Signal is of data type b01 ● ● Argument Time is of data type u64 Effect The function starts a timer at the transition of the variable signal from OFF to ON and sets ●...
195 of 349 Commands and functions Example: Different On- and Off-delay If LightButton (data type b01) is ON, the variable LightActuator (data type b01) is set to after 1300 ms, if LightActuator (data type b01) is OFF, the variable LightActuator (data type b01) is set to after 4000 ms.
196 of 349 Commands and functions Cycle timer - cycle Definition ● Function cycle(mm,ss) with: minutes (0...255) seconds (0..59) Arguments 2 arguments mm,ss of the data type u08 ● Effect Return mm:ss ● The return value is periodically set to 1b01 for one processing cycle, otherwise it is 0b01. The repetition time is defined in mm:ss (minutes:seconds).
To avoid errors in the file system of the Enertex EibPC ® , Enertex® Bayern GmbH provides the patch 1.100, which runs a checkdisk on the flash memory at each start of the EibPC. Because this patch re-initializes the flash memory, it can only be transferred into the Enertex EibPC ®...
198 of 349 Commands and functions [EibPC] a=$: No$ nr=0u16 read_nok=OFF write_nok=OFF new_r=ON new_w=ON TestGA='8/5/2'c14 if cycle(0,1) and nr<10u16 then write_nok=writeflash(convert(nr,$$)+a,nr); nr=nr+1u16;new_w=!new_w endif if cycle(0,1) and nr>9u16 then { read_nok=readflash(a,nr-10u16); nr=nr+1u16; if (nr<20u16) then new_r=!new_r endif } endif if write_nok then write('8/5/2'c14,$W-Err: $c14+convert(nr,$$c14)) endif...
These datas can be loaded and seperately saved by the Enertex® EibStudio of Enertex® EibPC. Project data If transmitting a program with the option “Uploading project datas shown as plain text to the EibPC” is crossed, so the whole datas will be archived including used macro datas and ESF etc. of the EibStudio to a separate directory in the flash.
Therewith you can upload e.g. pictures on the Enertex® EibPC, which you can use on the web server. The stored time series from the Enertex® EibPC can parallel be saved on a local pc in a backup data. Enertex® EibPC.
(“Calculations“) Not only (logical and temporal) processes can be programmed by Enertex ® EibPC, but also Basics mathematical expressions can be evaluated and hence appropriate responses to the KNX network, e.g. caused by sending of the corresponding addresses, can be produced.
202 of 349 Commands and functions Arc sine Definition ● Function asin(variable) Arguments 1 argument variable is of data type f32 ● Effect ● Calculation of the arc sine of the variable given in RAD If the argument is greater than 1f32 or smaller than -1.0f32, there is no calculation ●...
203 of 349 Commands and functions Division Definition ● variable1 variable2 [...] Arguments ● all arguments are of the same data type ● Data type: uXX, sXX and fXX, with arbitrary bit length defined on page 154 Effect ● Calculation of the quotient of Variable1 and Variable2 Data type result (Return) ●...
204 of 349 Commands and functions Exponential function Definition ● Function exp(variable) Arguments 1 argument variable of data type f32 ● Effect ● Calculation of the exponential function of variable Data type result (Return) ● Data type f32 Example exponential function: Variable b is the result of the exponential function of variable a.
205 of 349 Commands and functions Minimum value The minimum value of an arbitrary number of variables is calculated as follows: Definition ● Function min(variable1, variable2, [...] ) Arguments ● all arguments are of the same data type ● Data type: uXX, sXX and fXX, with XX arbitrary bit length defined on page 154 Effect ●...
206 of 349 Commands and functions Square root Definition ● Function sqrt(variable) Arguments 1 argument of data type f32 ● Effect ● Square root of variable. variable must be of data type f32. See Table 1 and the explanations there. ●...
207 of 349 Commands and functions Tangent Definition ● Function tan(variable) Arguments 1 argument of data type f32 ● Effect ● Tangent of variable Data type result (Return) ● Data type f32 Example tangent: Variable b is the tangent of variable a. Implementation in the user program: a=5f32 b=tan(a)
● Return value: ON, if a change of the supervised address or variable is detected. Reset to OFF after one processing pass of the Enertex ® EibPC. Data type result (Return) ● Data type b01 As a peculiarity, the change function must not depend on if statements with else branch.
Devicenr ● Function devicenr() Arguments ● none Effect ● Serial number inquery of EibPC Data type result (Return) ● data type u32 Example: devicenr The serial number should be assigned to the variable SNR. Implementation in the user program: SNR=devicenr()
210 of 349 Commands and functions Elognum Definition ● Function elognum() Arguments none ● Effect ● Returns the number of entries returned in the error memory. Data type result (Return) ● data type u16 Example: elognum Read the last event number and reset the memory by one. Implementation in the user program: EventInfo=$$ EventNr=elognum()
● none Effect ● The EibPC requires a certain amount of time for the processing of its program per cycle. This processing time is returned with this function in ms. Data type result (Return) ● Processing time in ms as data type u16.
Page 211
212 of 349 Commands and functions [WebServer] page(1) [$Test$,$Processingtime$] mtimechart(1)[EXTLONG,AUTOSCALE,256,0,10,0,1]($Time in ms $,LEFTGRAF, Buffer0) [EibPC] Buffer0=0 timebufferconfig(Buffer0, 0, 3600u16, t) // per Second t=0u16 if t < processingtime() then t=processingtime() endif // Maximum m=0u16 if m < processingtime() then m=processingtime() endif...
Implementation in the user program: if systemstart() then LightsOff=OFF; BlindsUp=DOWN endif There is no end of the program at the Enertex® EibPC. An Enertex® EibPC program is terminated End of program by either disconnecting the power supply or by the user entering a new program. In the latter case, Enertex®...
Without disrupting users or the program of another Enertex® EibPC, new programs can be tested (the web server can be accessed in the usual way). If the Enertex® EibPC is in passive mode, its internal program runs normally, i.e. variables are being calculated, states changed, the web server adjusted, etc.
The Enertex® EibPC internally works in the group message mode and therefore only logs group telegrams sent to a group address. Should other messages (e.g. sent to a physical address) is observed in the integrated bus monitor of EibStudio.
Page 215
The state of the input objects are copied to an KNX Telegram object. The individual address of the sender can not be given, as It will be set to the address of the bus access unit (= interface connected to the Enertex ® EibPC). Data type result (Return) ●...
Stored scenes also persist when interrupting the Enertex ® EibPC's power supply or after changing the application program. Only a change of the group addresses relevant to the scenes requires resetting the scenes (menu E PC → D ...).
218 of 349 Commands and functions Example: Lighting scenes with presetscene You want to realize a scene actuator for a dimmer and a lamp. Also variable Var1 and Var2 shall change. Scene actuator SceneActuator-1/4/3“u08, number 13 sould be preallocated like this: - scenes that have been already saved will be overwritten - the dimmer should be inactive in Szene-number 13 - the lamp an the two variables Var1 and Var2 should be active (send an ON signal to “Lamp-...
219 of 349 Commands and functions Recall a scene - callscene Definition ● Function callscene(GroupAddressSceneActuator, number) Arguments 2 arguments: GroupAddressSceneActuator and number of data type u08 ● Effect ● This function requires the parametrization of a scene actuator to this group address (either scene actuators or scene functions).
220 of 349 Commands and functions Stringfunctions Strings can be defined variable from 1 to 65534 bytes. Thereby the corresponding endpoint has to be specified behind the character string. E.g. a string with the length of 55 bytes will be defined as follows: string= $$c55 The data type c14 will be treated seperately by the compiler because he is compatible with the KNX data type EIS15 and has in contrast to all other strings any zero termination at the end, Gegensatz...
221 of 349 Commands and functions Stringcast Definition ● Function stringcast(string, data, pos) Arguments 3 arguments: string of data type c1400, data of arbitrary data type, of data type u16 ● Effect ● string: Character string (1400 bytes) a certain number of bytes of which shall be copied to another data type.
Page 221
222 of 349 Commands and functions By means of the debugger (page. 144), you can also view the “raw data” in the data array. However, this should make sense only for integers. [EibPC] array=$$ Var='1/1/1'f16 ReadVar=0.0 // Bytessize of f16 == 2...
223 of 349 Commands and functions String format Definition ● Function stringformat(data, conversion_type, format, field_width,[precision]) Arguments Argument data of data type uXX, sXX, with arbitrary as defined on page 154. ● ● Arguments format, field_width, precision, conversion_type of data type u08 Effect conversion_type ●...
Page 223
Here the implementation, at which the seconds can be found in the variable Stopper_time and the formatted output in Stopper. In contrast to Example:Stop watch (page 178), the time difference is counted by means of after. [EibPC] Stopper=$$ Stopper_time=0s32 Stopper_Go=AUS if (Stopper_Go) then { Stopper_time=1s32;...
225 of 349 Commands and functions Split Definition ● Function split(string, pos1, pos2) Arguments 3 arguments, string of data type c1400, pos1 pos2 of data type u16 ● Effect ● string: Character string a character string shall be extracted from. pos1: Position of the first character of the character string to be extracted (0...1399u16).
226 of 349 Commands and functions Capacity Definition ● Function capacity(String) Arguments An argument, string of data type c1400 respectively with a self defined string length ● Effect ● From the string band String the maximum available length is to be determined Data type result (Return) ●...
227 of 349 Commands and functions Urldecode Definition ● Function urldecode(string, source encoding, target encoding) Arguments String data type c1400 or with a user-defined string length ● ● Source encoding with the usual designations, e.g. „UTF-8“ ● Target encoding with the usual designations, e.g. „UTF-8“ Effect ●...
Remark Depending on the configuration of the RS232-Interface (Baudrate) more than one character can be in the buffer, while the Enertex® EibPC is running a process cycle. The lengh of the buffer is provided with the 2 argument. Example: Reading RS232 Data New data shall be written into a string buffer.
229 of 349 Commands and functions [EibPC] rawdata=$$ len=0u16 Buffer=$$ if event(readrs232(rawdata,len)) and len>9u16 then { Buffer=Buffer + split(rawdata,0u16,9u16); len=len-10u16; rawdata=split(rawdata,10u16,EOS) } endif Resetrs232 Definition ● Function resetrs232() Arguments none ● Effect ● Performs a reset for the RS232 Interface Data type result (Return) ●...
Enertex® EibPC can used as an free programmable router for KNX telegrams. If e.g. the group address is sent (as number) to the Enertex® EibPC via TCP/IP client, it is possible to write via the function address to this group address a given value, without any additional program code.
231 of 349 Commands and functions Readrawknx Definition ● Function readrawknx(control field, phyAddress, targetAddress, IsGroubAddress, routingCounter, bitLength, userData) Arguments ● control field of data type u08 ● phyAddress of data type u16 (he transmitter's address in the usual notation, e.g. 2.4.13) ●...
Page 231
60000 accuracy in minutes Raw_TimeScale=1000u64 Raw_Time=Raw_TimeWatch // Respond only to group messages on the EibPC and only if the sender address is correct if event(readrawknx(Raw_Kontroll,Raw_Sender,Raw_GA,Raw_IsGa,Raw_RoutingCnt,Raw_Len,Raw_Data)) and Raw_Sender==Raw_Dev and Raw_IsGa then { // change time to seconds and calculate min and max values // evaluate Raw_Time Raw_CalcTime=convert((Raw_TimeWatch-Raw_Time)/Raw_TimeScale,0u16);...
Page 232
233 of 349 Commands and functions // expect a telegram every Raw_TimeWatch: then delay will retrigger // otherwise error condition! if delayc(change(Raw_AvgTrigger),Raw_TimeWatch,Raw_Time) then { Raw_Error=EIN } endif Note: The function event can used with readrawknx function (see example). HandbuchEibPC_USA-30.odt, 2017-05-11 Enertex ®...
The function is returning the actual image of a group address stored in the Enertex® EibPC. The group address of the telegram is given with the variable named Number. The binary data of the telegram is converted into a string (see convert) and given as the return value of this function.
Information about the configuration or function test of a DNS server can be found on page 137. Standard-Ports The ports via which the Enertex® EibPC communicates can be changed via the Options / Ports menu. This menu generates a [Ports] section, which then receives the following entries [Ports]...
® EibPC. ● The Enertex ® EibPC itself sends the data from its port 4807. ● Transmitted “user data” start with the 3rd argument. Their number and data type is arbitrary. ● The IP address (variable ip) is defined in the usual notation (xxx.xxx.xxx.xxx with xxx: number between 0 and 255).
Example: Send UDP telegrams Every 2 minutes, a UDP telegram shall be sent by the Enertex ® EibPC to the port 5555u16 of the receiver www.enertex.de. The user data to be transmitted is the first 5 characters of the string “I'm still alive”.
TCP server and client The Enertex® EibPC functions both as a server and as a client. Every 100 ms, it responds to a new connection request. If the Enertex® EibPC is connected, it answer the requests with the cycle time of the processing cycle.
Every 2 minutes, a TCP telegram shall be sent by the Enertex ® EibPC to the port 5555u16 of the receiver www.enertex.de. The user data to be transmitted is the string “I'm still alive”. The socket is already open and ready to send (IP and Port open).
Example: Send TCP telegrams Every 2 minutes, a TCP telegram shall be sent by the Enertex ® EibPC to the port 5555u16 of the receiver www.enertex.de. The user data to be transmitted is the first 5 Bytes of the string “I'm still alive”.
241 of 349 Commands and functions Md5sum Definition ● Function md5sum(string) Arguments Argument string of any length ● Effect ● The MD5 sum of the string is calculated. The result is returned as a string. Result (Return) ● ● Data type cXXXXX with the same string length as the output string. Example ping The value of the MD5 sum of the string $ fdzehkdkhfckdhk %% $ is to be determined string=$fdzehkdkhfckdhk%%$...
(The return value goes asynchronous to the main development loop - see p. 124) Example: sendmail Every Monday at 08:00, an e-mail shall be sent to eibpc@enertex.de. The subject is “EibPC“ and the message contains 2 lines “I'm still alive“ and “Here we go!” Implementation in the user program: email=$eibpc@enertex.de$...
Data type u08 Example: sendhtmlmail Every Monday at 08:00, an e-mail shall be sent to eibpc@enertex.de. The subject is “EibPC“ and the message contains 2 lines “Hello World,“ (in bold) and “Here we go!” Implementation in the user program: email=$eibpc@enertex.de$ subject=$EibPC$ message=$<html><head><meta name="qrichtext"...
Commands and functions VPN Server The Enertex® EibPC can operate as an configurable VPN Server and VPN Router in your LAN. To use this functionality your Enertex® EibPC must have a valid activation code for Option NP. In the router port forwarding for UDP port 1194 must be aktivated.
Function stopvpn() Arguments none ● Effect ● Stops the VPN Service on the Enertex® EibPC. After a reboot the VPN is stopped per default. ● ● All in the past enabled users (to open a user's VPN access use openvpnuser) are immediately closeed after this function call.
1/1/2. The VPN Service should be started 500ms after systemstart and closed with an ON, if 1/1/3 is receiving a signal. [EibPC] if after(systemstart(),500u64) then startvpn() endif if "OpenUser1-1/1/1"==ON then openvpnuser($User1$) else closevpnuser($User1$) endif if "OpenUser2-1/1/2"==ON then openvpnuser($User2$) else closevpnuser($User2$) endif if "StopVPN-1/1/3"==ON then stopvpn() endif...
Data type u08 (internal state of the webchart) Example display percentage value In an XY diagram of the web server (element chart), a percentage shall be displayed. Implementation in the user program: [WebServer] chart(ChartWebID)[$0%$,$50%$,$100%$] [EibPC] PercentageValue='1/3/5'u08 ChartWebID=0 if stime(0) then\\ webchart(ChartWebID,convert(convert(PercentageValue,0f32)/8.5f32,0), $now$c14,$- 47min$c14) endif HandbuchEibPC_USA-30.odt, 2017-05-11...
The data type of the return value of settime() is t24. In this case, it is converted to a readable character string of the notation „Fr. 12:33:55“. You can access to variables defined in the section [EibPC]. But consider, the webserver evaluates the variable statically. When the variable...
249 of 349 Commands and functions Getslider Definition ● Function getslider(id) Arguments Argument of data type u08. This argument must not change at the runtime of the ● program. Effect ● The function addresses the slider and returns its position (0 to 255). If there are multiple occurrences of id, all elements of this id are addressed.
250 of 349 Commands and functions link Definition ● Function link(id, text, icon, page_id, website) Arguments Arguments id, icon page_id of data type u08 ● ● Argument text of arbitrary data type ● Argument website of data type c1400 Effect ●...
251 of 349 Commands and functions Mchart Definition ● Function mchart(id, x, y, index) Arguments Arguments id, index of data type u08 ● ● Arguments x, y of data type f16 Effect This function addresses the element mchartf of the given id. If there are multiple ●...
252 of 349 Commands and functions Mpchart Definition ● Function mpchart(id, x, y, index, page_id) Arguments Arguments id, page_id, index of data type u08 ● ● Arguments x, y of data type f16 Effect This function addresses the element mpchart that refers to a page of the given id. If there ●...
(2) [$Haus$,$Seite2$] plink(2) [INFO] [3] $Zu Seite 3$ page (3) [$Haus$,$Seite3$] plink(2) [WEATHER] [1] $Zu Seite 1$ [EibPC] SprungZiel=3 if after(systemstart(),5000u64) then plink(2,$Doch zu Seite 2$,MONITOR,DISPLAY, 1,SprungZiel) endif // Achtung: picture verwendet nur die ersten 479 Zeichen für den Link if after(systemstart(),5000u64) then picture(3,$Neues Wetter$,1,$http://eur.yimg.com/w/wcom/eur_satintl_440_dmy_y.jpg$) endif...
● CAUTION: The EibPC has a RAM of 64MB, of which about 40 MB can be used by the user maximum. To ensure proper operation, the buffer and arts must be sized so that the memory of the EibPC is not overloaded.
255 of 349 Commands and functions Data type result (Return) ● 0 success, 1 error Detailed example: p. 115 Definition Timebufferclear ● Function timebufferclear(ChartBufferID) Arguments ● ChartBufferID of data type u08 Effect ● ● Delete the current time buffer (in the memory and, if necessary, on the flash, if existing) Data type result (Return) Level of the time buffer of the data type u16 ●...
256 of 349 Commands and functions Timebufferstore Definition ● Function timebufferstore(ChartBufferID) Arguments ChartBufferID of data type u08 ● ● Effect ● It is permanently stored in a flash buffer. Datentyp Ergebnis (Rückgabe) ● 0 success, 1 error, 2 ongoing processing Detailed example: P.
257 of 349 Commands and functions Timebuffervalue Definition ● Function timebuffervalue(ChartBufferID, utcZeit,Data, utcZeitWert) Arguments ID of data type u08 ● ● utcZeit of data type u64, which is indicated by the time stamp which is greater than or equal to the time of the next data point in the time series. ●...
Data type result (Return) ● none Example: webinput, weboutput, see p. 112 WebServer] page(1)[$Enertex$,$Webserver$] webinput(1)[INFO] $Eingabe hier -> Ausgabe in Outputfeldern$ weboutput(2)[SINGLE,ICON] [EibPC] inputstring=webinput(1) if change(inputstring) then weboutput(2,inputstring) endif HandbuchEibPC_USA-30.odt, 2017-05-11 Enertex ® Bayern GmbH - Erlachstraße 13 - 91301 Forchheim - mail@enertex.de...
259 of 349 Commands and functions mtimechartpos Definition ● Function mtimechartpos(TimeChartID,ChartIdx,ChartBuffer,StartPos,EndPos) Arguments TimeChartID of datatyp u08 ● ● ChartIdx Index of charts (0..3) ● ChartBuffer Handle to the time buffer to be displayed by the web element. The Webelement has to be configured accordingly. ●...
260 of 349 Commands and functions Pdisplay Definition ● Function pdisplay(id, text, icon, state, style, page_id, [mbutton]) Arguments Arguments id, icon, state, style page_id of data type u08 ● ● Argument text of arbitrary data type Effect The function addresses the web button that refers to a page (pbutton or pshifter). If there ●...
261 of 349 Commands and functions Pbutton Definition ● Function pbutton(id,page_id) Arguments Argument of data type u08. This argument must not change at the runtime of the ● program. ● Argument page_id of data type u08. This argument must not change at the runtime of the program.
262 of 349 Commands and functions picture Definition ● Function picture(id, label, page_id, www-LINK) Arguments Arguments page_id of data type u08 ● ● Argument text of arbitrary data type ● Argument www-LINK of data type c1400 Effect ● The function addresses the web button that refers to a page (picture). If there are multiple web buttons with on the web page of page_id, they all will be addressed.
263 of 349 Commands and functions Setslider Definition ● Function setslider(id, value, icon, state) Arguments All arguments of data type u08 ● Effect ● The function addresses the slider and sets its value to value. If there are multiple occurrences of id, all elements of this id are addressed. ●...
159) provides an overview over all possibel states. Data type result (Return) ● none With Enertex ® EibPC secure communications via HTTPS between Web servers and browsers is HTTPS possible. Therefore choose the menu ® O → W and follow the...
The web server of the Enertex ® EibPC has been successfully tested with the web browsers Microsoft Internet Explorer 7 and Mozilla Firefox 3. Best performance is achieved with Mozilla Firefox 3. Mozilla Firefox as a client...
Page 265
266 of 349 Commands and functions User administration As of Patch-Version 3.xxx a page-related user administration of the webserver is possible. Every page can be saved with an userword and a password. Therewith more than one user can be tolerated by one page. For each user a password can be allocated, which has to be indicated in the first definition of the username.
267 of 349 Commands and functions Elements of the web server There a two groups of elements for displays, the Webbutton and the Webdisplay. Of these, the element button (sub-group of Webbutton) is the only element which exhibits the single width. At last, there are also design elements to mention: The header and footer (header) and the divider (line) (cf.
Page 267
268 of 349 Commands and functions Group Element Description mshifter, mpshifte The graphic constituting the actual control panel can be modified by the user program. The first line of text is static (only changeable at the configuration). The second line can be modified by the user program. The listbox can administer a maximum of 4 entries.
Page 268
269 of 349 Commands and functions Group Element Description chart chart, By means of mchart, you can plot pchart up to four different graphs ..either of “single“ ... This element serves the purpose of visualizing a time series. The labeling of the y-axis is defined at the configuration.
Page 269
270 of 349 Commands and functions picture An external link to a graphic is integrated. The graphic can be left-justified, centered or right-justified. Group Element Description Link frame dframe Embedding an external website pLink Link to an internal page (simple button) ...
The design of the web server is integrated into the Enertex ® EibPC in a fixed way. The scheme according to page 265, Figure 9 can be extended to ten columns. The web server administers up to 60 (IDs from 0 to 59) web elements on one web page.
Page 271
272 of 349 Commands and functions The eibparser already displays the configuration in the Messages window: ====== Seite: 01/Demo ====== mchart (1) mpshifter (2) | | o o | | o o The output of the eibparser | | o o In this case, a cross-bar ("-") means that the element to the right occupies this "place", i.e. this unit size, a vertical bar "|"...
Page 272
273 of 349 Commands and functions Figure 14: „compact“ with grid (for illustrative purposes) In the mode with compact (on) of the web server, the user must therefore take into account the size of the web element in the next line of the configuration in order to control the arrangement of the web elements.
ID: Value between 0 and 59 as an index for programming and the access to this element. ● You can also access variables of the section [EibPC]. ● Image: A value between 0 and 99. To arrange the application more clearly, constants have been predefined (page 291).
● ID: Value between 0 and 59 as an index for programming and the access to this element. You can also access variables of the section [EibPC]. ● Text1, Text2, .. Text254: label texts for mbutton. The second and following elements are optional.
ID: Value between 0 and 59 as an index for programming and the access to this element. ● You can also access variables of the section [EibPC]. ● Image: A value between 0 and 99. To arrange the application more clearly, constants have been predefined (page 291).
ID: Value between 0 and 59 as an index for programming and the access to this element. ● You can also access variables of the section [EibPC]. ● Image1 to Image4: A value between 0 and 99. To arrange the application more clearly, constants have been predefined (page 291).
ID: Value between 0 and 59 as an index for programming and the access to this element. ● You can also access u08 variables of the section [EibPC]. ● Image1 to Image4: A value between 0 and 99. To arrange the application more clearly, constants have been predefined (page 291).
CAUTION: The EibPC has a RAM of 64MB . To ensure proper operation , the buffer and arts must be dimensioned so that the memory of EibPC is not overloaded . See here under timebufferconf (p. 254) for more details. ●...
280 of 349 Commands and functions timechartcolor Element timechartcolor ● timechartcolor #HtmlFarbCode Changes the color value of the graph with the ID (1,2,3,4) of the timecharts. The formatting identical usual HTML color coding function, (https://wiki.selfhtml.org/wiki/Grafik/Farbpaletten) ● This setting is valid globally for all graphs and is placed behind a page command. Example [WebServer] page (wsMeter) [$Smartmeter$, $Measuring$...
281 of 349 Commands and functions Picture Element picture ● picture (ID) [Height,Type]($Label$,$www-LINK$) Arguments ID: Value between 0 and 59 as an index for programming and the access to this element. ● ● Height:Value 0 or 1 (or constant SINGLE and DOUBLE) ●...
ID: Value between 0 and 59 as an index for programming and the access to this element. ● You can also access u08 variables of the section [EibPC]. ● Image: A value between 0 and 99. To arrange the application more clearly, constants have been predefined (page 291).
283 of 349 Commands and functions FTP-Funktionen FTP transfer to any data logging. The FTP transfer writes files to a remote FTP server, the maximum file size is 64 kB. To this end, various handles can be created, which in turn create buffered queue by up to 64 kB large file on the server.
284 of 349 Commands and functions Ftpstate Definition ● Function ftpstate(handle) Arguments Argument handle of data type u08 ● Effect ● Returns information about the status of the FTP configuration. Data type result (return) ● ● Configures / error-free = 0 ●...
ID: Value between 0 until 59 as index for programming and access to this element. You ● can also access to u08 variable definition in the section [EibPC]. ● Graphic: Value between 0 and 99. In order to design the implementation clearly are predifined terms defined (page 291).
ID: Value between 1 and 100 as an site index for programming and the access to local site elements (first letter 'p'). You can also access u08 variables of the section [EibPC]. Quick selection (Next- and Previous page button according Figure 10) is given by order of page definitions.
Arguments ● If number assumes the value 0, header is hidden. You can also access u08 variables of the section [EibPC]. ● The link (incl. path and leading http://) is optional. The URL can access an extern resource. In this case the number must be set to 2.
Arguments ID: Value between 0 and 59 as an index for programming and the access to this element. ● You can also access u08 variables of the section [EibPC]. (This element is optically identic to the element button) ● Image: A value between 0 and 99. To arrange the application more clearly, constants have been predefined (page 291).
Knopf$ [EibPC] This user program can be transmitted directly, i.e. the section [EibPC] does not need to contain additional programming, which is particularly important for the design of the visualization. After the transmission of the program to the Enertex ®...
290 of 349 Commands and functions Figure 18: The web server – multipage-version, black-Design Figure 19: Web server Note: Each icon of the web server has different occurrences (color etc.). In the configuration file, for the initialization always state 1 (INACTIVE) is set. Additional states (see page 291) can be set by the Initialization function Display (Webdisplay)
The Enertex ® EibPC has a built-in set of graphics at his disposal. These can be addressed directly by their index (group of symbols) and their sub-index (design). The following symbol groups exist, which can be addressed in the section [WebServer] as well as in...
292 of 349 Commands and functions Symbol Index DARKRED 0u08 INACTIVE 1u08 ACTIVE 2u08 DISPLAY 3u08 STATE4 4u08 STATE5 5u08 STATE6 6u08 STATE7 7u08 STATE7 8u08 BRIGHTRED 9u08 Table 3: Overview of states. GREY 0u08 GREEN 1u08 BLINKRED 2u08 BLINKBLUE 3u08 Table 4: Overview of styles Note on BLINKRED and BLINKBLUE:...
Page 292
293 of 349 HandbuchEibPC_USA-30.odt, 2017-05-11, Version Symbol Index DARKRED INACTIVE ACTIVE DISPLAY STATE4 STATE5 STATE6 STATE7 STATE8 BRIGHTRE 0u08 1u08 2u08 3u08 4u08 5u08 6u08 7u08 8u08 D 9u08 INFO 0u08 SWITCH 1u08 2u08 DOWN 3u08 PLUS 4u08 MINUS 5u08 LIGHT 6u08 TEMPERATURE...
Page 293
294 of 349 HandbuchEibPC_USA-30.odt, 2017-05-11, Version BLIND 8u08 STOP 9u08 MAIL 10u08 SCENES 11u08 MONITOR 12u08 WEATHER 13u08 14u08 NIGHT 15u08 Enertex ® Bayern GmbH - Erlachstraße 13 - 91301 Forchheim – mail@enertex.de...
Page 294
295 of 349 HandbuchEibPC_USA-30.odt, 2017-05-11, Version CLOCK 16u08 WIND 17u08 WINDOW 18u08 DATE 19u08 PRESENT 20u08 ABSENT 21u08 REWIND 22u08 PLAY 23u08 PAUSE 24u08 Enertex ® Bayern GmbH - Erlachstraße 13 - 91301 Forchheim – mail@enertex.de...
Page 295
296 of 349 HandbuchEibPC_USA-30.odt, 2017-05-11, Version FORWARD 25u08 RECORD 26u08 STOP 27u08 EJECT 28u08 NEXT 29u08 PREVIOUS 30u08 LEFT 31u08 RIGHT 32u08 CROSSCIRCLE 33u08 Enertex ® Bayern GmbH - Erlachstraße 13 - 91301 Forchheim – mail@enertex.de...
Page 301
302 of 349 HandbuchEibPC_USA-30.odt, 2017-05-11, Version UPDATE 78u08 Table 5: Overview icons – blue design Enertex ® Bayern GmbH - Erlachstraße 13 - 91301 Forchheim – mail@enertex.de...
Page 302
303 of 349 HandbuchEibPC_USA-30.odt, 2017-05-11, Version Symbol Index DARKRED INACTIVE ACTIVE DISPLAY STATE4 STATE5 STATE6 STATE7 STATE8 BRIGHTRE 0u08 1u08 2u08 3u08 4u08 5u08 6u08 7u08 8u08 D 9u08 INFO 0u08 SWITCH 1u08 2u08 DOWN 3u08 PLUS 4u08 MINUS 5u08 LIGHT 6u08 TEMPERATURE...
Page 303
304 of 349 HandbuchEibPC_USA-30.odt, 2017-05-11, Version BLIND 8u08 STOP 9u08 MAIL 10u08 SCENES 11u08 MONITOR 12u08 WEATHER 13u08 14u08 NIGHT 15u08 Enertex ® Bayern GmbH - Erlachstraße 13 - 91301 Forchheim – mail@enertex.de...
Page 304
305 of 349 HandbuchEibPC_USA-30.odt, 2017-05-11, Version CLOCK 16u08 WIND 17u08 WINDOW 18u08 DATE 19u08 PRESENT 20u08 ABSENT 21u08 REWIND 22u08 PLAY 23u08 PAUSE 24u08 Enertex ® Bayern GmbH - Erlachstraße 13 - 91301 Forchheim – mail@enertex.de...
Page 305
306 of 349 HandbuchEibPC_USA-30.odt, 2017-05-11, Version FORWARD 25u08 RECORD 26u08 STOP 27u08 EJECT 28u08 NEXT 29u08 PREVIOUS 30u08 LEFT 31u08 RIGHT 32u08 CROSSCIRCLE 33u08 Enertex ® Bayern GmbH - Erlachstraße 13 - 91301 Forchheim – mail@enertex.de...
“normal” user program. The code generated from the macros as it were from text templates is bound internally by the compiler to the section [EibPC]. You can look at your macro code generated by the compiler also in the file „tmpMacroOut.txt“ in the working directory of the Enertex ®...
If the above macro is saved e.g. as myMakros.lib, the “double-click” on a KNX button is simplified: [Macros] DoubleClick(Basement,'0/0/1'b01,ON,'3/4/5'b01,ON,'3/4/6'b01,ON) [MacroLibs] myMakros.lib [EibPC] Now the compiler writes in our example „tmpMacroOut.txt“ (in the working directory of the Enertex ® EibStudio): BasementDoubleClick=0 The expansion is located in the file...
Page 314
:end return value (if :return is not defined) Once defined in a macro-lib and added to the [MacroLibs] section, the macro can be used as a built- in function: [EibPC] MyVar=cosh(2.3f32) Use it as built-in MyVar2=cosh(cosh('1/3/2'f32)) +cosh('1/3/3'f32) + 32f32 HandbuchEibPC_USA-30.odt, 2017-05-11 Enertex ®...
316 of 349 Macrosfunctional blocks Online debugging at runtime If variables are to be monitored at runtime, it is recommended to debug with UDP telegrams and a netcat client (see https://de.wikipedia.org/wiki/Netcat). The following code is used as a debug macro, assuming that the remote 192.168.1.18 listens on port Sending a string with CR to a UDP 9000, e.g.
Power supply: The Enertex ® EibPC requires an external DC power supply in the range of 5 to 30 V DC. The power input is about 1.2 W. At activity of the LAN it increases to 1.7 W. Access: In order to access the KNX bus, the Enertex ®...
318 of 349 HandbuchEibPC_USA-30.odt, 2017-05-11, Version Keywords - reference Logical instructions if ... then ... endif If – then if ... then ... else ... endif If – then – else !Var Bitwise inverting Var1 or Var2 Bitwise or Var1 and Var2 Bitwise and Var1 xor Var2 Bitwise exclusive-or...
Page 318
319 of 349 HandbuchEibPC_USA-30.odt, 2017-05-11, Version exp(Var1) Exponential function log(Var1, Var2) Logarithm: Var1 = Base Var2 = Argument pow(Var1, Var2) Power: Var1= Base Var2= Exponent sin(Var1) Sine sqrt(Var1) Square root tan(Var1) Tangent Measurements average(Var1, Var2, ... VarN) Return value: Average of the given variables which have all to be of the same data type. min(Var1, Var2, ...
Page 319
Sets the system time of the Enertex EibPC anew ® settime() Writes the system time of the Enertex ® EibPC to the KNX getdate(address) Sets the date of the Enertex ® EibPC anew setdate() Writes the date of the Enertex ®...
Page 320
This function cyclically (time frame: 5 minutes) calculates the elevation angle of the sun in degrees. sun() Returns whether it is day or night. Requires the Enertex ® EibPC's knowledge of the longitude and latitude of the concerned location. sunriseminute() Minute at sunrise of the current day sunrisehour()
Page 321
The Enertex ® EibPC establishes a TCP connection. ping(address) The Enertex ® EibPC implement a ping to the given address. readtcp(port, address, arg 1 The Enertex® EibPC receives TCP telegrams. [, arg2, ... arg n] readudp The Enertex ®...
Page 323
Name: A static labeling text (first line). header(Number) $www.link$ If number assumes the value 0, header is hidden. You can also access u08 variables of the section [EibPC]. The link (incl. path and leading http://) is optional. The URL can access an extern resource. In this case the number must be set to 2.
Page 324
ID: Value between 0 and 59 as an index for programming and the access to this element. You can also access variables of the section [EibPC]. Text1, Text2, .. Text254: label texts for mbutton. The second and following elements are optional.
Page 325
ID: Value between 0 and 59 as an index for programming and the access to this element. You can also access u08 variables of the section [EibPC]. Image: A value between 0 and 99. To arrange the application more clearly, constants have been predefined (page 291).
Page 326
ID: Value between0 to 59 as an index for programming and accessing this element. You can also access V08 variable definitions in the [EibPC] section. Graphic: Value between 0 and 99. Predefined constants are defined to make the application clearer (page 291).
Page 327
328 of 349 HandbuchEibPC_USA-30.odt, 2017-05-11, Version mchart(ID, VarX, VarY, Index) This function addresses the element mchart of the given id. If there are multiple occurrences of id, all elements of this id are addressed. One mchart displays four different graphs. index (0,1,2,3) defines the graph to be addressed. X1, X2: The labeling of the x-axis.
Daily comparator time switch: ss: Seconds (0..59 ) mm: Minutes (0..59 ) hh: Hours (0..23) closetcp(port, address) The Enertex ® EibPC closes a TCP connection. closevpnuser(Name) Closes access of an user Enertex ® Bayern GmbH - Erlachstraße 13 - 91301 Forchheim – mail@enertex.de...
Page 329
The value of the variable or group address that changed most recently is returned. connecttcp(port, address) The Enertex ® EibPC establishes a TCP connection. convert(Var1, Var2) Converts the data type of Var1 to that of Var2 (Caution: Data may be lost!). cos(Var1)
Page 330
For 65534u16, the constant END has been defined. footer(Number) $WWW-Link$ If number assumes the value 0, footer is hidden. You can also access u08 variables of the section [EibPC]. The link (incl. path and leading http://) is optional. The URL can access an extern resource. In this case the number must be set to 2.
Page 331
EibPC anew header(Number) $www.link$ If number assumes the value 0, header is hidden. You can also access u08 variables of the section [EibPC]. The link (incl. path and leading http://) is optional. The URL can access an extern resource. In this case the number must be set to 2.
Page 332
ID: Value between 0 and 59 as an index for programming and the access to this element. You can also access variables of the section [EibPC]. Text1, Text2, .. Text254: label texts for mbutton. The second and following elements are optional.
Page 333
ID: Value between 0 and 59 as an index for programming and the access to this element. You can also access variables of the Image3, Image4]$Label$ section [EibPC]. Image1 to Image4: A value between 0 and 99. Image2 to Image4 are optional.
Page 334
335 of 349 HandbuchEibPC_USA-30.odt, 2017-05-11, Version Keywords - reference - alphanumeric order ping(address) The Enertex ® EibPC implement a ping to the given address. plink(ID)[Image] [PageID] $Text$ Link to other page of web server pow(Var1, Var2) Power: Var1= Base Var2= Exponent presetscene(GroupAddressSceneActuator,SceneNumber,Opti Default settings for the scene actuator with the group address with the corresponding number create.
Page 336
Returns whether it is day or night. Requires the Enertex ® EibPC's knowledge of the longitude and latitude of the concerned location. sunrisehour() Hour at sunrise of the current day sunriseminute() Minute at sunrise of the current day...
Page 337
338 of 349 HandbuchEibPC_USA-30.odt, 2017-05-11, Version Keywords - reference - alphanumeric order webchart(ID, Var, X1, X2) The function addresses the xy diagram chart. When called, the xy representation of the value Var is activated. ID, Var of data type u08 X1, X2 of data type c14 webdisplay(Index,Text,Graphic) Writes the Text to the web element Index (0...255) and sets the Graphic.
There could be found no KNXnet / IP interface. Please check whether an operational KNXnet / IP interface is connected to the same network as the EibPC. ERR_EIBNET_IP_DISCONNECT_REQUEST_IN The connection between EibPC and KNXnet / IP interface has been disconnected. ERR_EIBNET_IP_DISCONNECT_REQUEST_OUT s.a.
Page 341
A message was sent again to KNXnet / IP interface, because an error has occurred. ERR_EIBNET_IP_TUNNELLING_TIMEOUT_1 The connection between EibPC and KNXnet / IP interface has been disconnected. ERR_EIBNET_IP_L_DATA_CON It was received for a message sent to this email a confirmation of the KNXnet / IP interface.
Page 342
ERR_MSGSND_RESOLVE_0 The resolve function could not be executed because an internal queue was not available. Perhaps the EibPC with the current application program is temporarily overloaded. ERR_MSGSND_INTERFACE_IN_0 A received from the KNX bus message could not be passed to the application program, because an internal queue was not available.
344 of 349 Questions and answers P. ERR_READ_GROUP_ADDRESS A group address has been configured with initga, but does not respond to the read request. ERR_ERRNO An internal error has been detected. The type of error can be more accurately determined by the manufacturer based on the error code.
• New function writeflashvar p. 199. • New function readflashvar p. 198 • Changing communication ports UDP and TCP of the Enertex® EibPC (p. 235). • New web server element timechartcolor (p. 280) New function tostring S. 226. • •...
346 of 349 Changelog P. • Own field for uploading of data onto the Enertex® EibPC p. 200 Detailed example to the weboutput p. 112 • • Detailed example for uploading of graphics for picture and header and footer p. 114 •...
347 of 349 Changelog P. • Supplement link p. 288 Extended example for function readrawknx p. 231 • Version 21 (Patches 2.30x, EibStudio 2.30x) • Supplement new macro-libs p. 24 • Supplement to the webelement link p. 288. • Supplement picture p. 281 •...
348 of 349 Changelog P. • getaddress-function p. 234 Updating available macro-libs p. 24 • • Macro now with return values, local variables and function like usability, p. 313 • Black and blue design of webserver p. 274 • New section [VPN] and [InitGA]. p. 125 •...
Page 348
Readflash function: p. 197 • Writeflash function: p. 197 • readknx and the chapter concerning routing with the Enertex® EibPC, p. 230 • Extented information to variable definitions, p. 45 • New symbol template WebElement for formating the web configuration commands, e.g. page •...
Need help?
Do you have a question about the EibPC and is the answer not in the manual?
Questions and answers
How can one manually adjust the time and date of the EIBPC2
To manually adjust the time and date on the Enertexbayern EibPC2, open the "TIME OF DAY AND DATE" dialog. Enter the current date and time manually in the dialog and press OK. Alternatively, you can press the button "Use system time" to set the EibPC time equal to the time on the PC running Eibstudio.
This answer is automatically generated