Skip to content

Commit 5f67ade

Browse files
committed
Update documentation files
1 parent e1387e2 commit 5f67ade

5 files changed

Lines changed: 104 additions & 19 deletions

File tree

doc/CoDeSys_Visu_V23_D.pdf

876 KB
Binary file not shown.

doc/DEV_GUIDE_DE.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,16 @@ Aufruf des Release-Skript:
2929
Daraufhin werden im Verzeichnis /trunk/release die beiden Dateien
3030
"WebVisu.html" und "WebVisuPlus.html" neu erzeugt.
3131

32+
Dem Skript "release.sh" kann optional der Parameter "HTMLTITLE=" mitgegeben
33+
werden. Dieser setzt den Titel des erzeugten HTML-Files auf den übergebenen
34+
Wert.
35+
36+
Beispiel:
37+
```bash
38+
./release.sh HTMLTITLE=WebVisu5
39+
```
40+
41+
3242
### Ablauf des Releaseprozesses
3343
Der Releaseprozess läuft intern zwei mal ab. Für jede Ergebnisdatei ein mal.
3444
Während des Releaseprozess werden zunächst die Dateien mit der Endung "\*.pp.*"
@@ -177,10 +187,10 @@ Durch diesen Mechnismus werden drei Hauptprobleme erschlagen:
177187
mehr als Klick-Bereich ausgewertet.
178188
- Klick-Regionen mussten immer rechteckig sein. Kreise oder Polygone werden
179189
jetzt ausgewertet wie gezeichnet.
180-
- Bei mehreren Klich-Aktionen pro Element können diese jetzt schneller
190+
- Bei mehreren Klick-Aktionen pro Element können diese jetzt schneller
181191
ausgewertet werden.
182192

183-
Um die Objekt-ID in einer Farbe kodieren zu kodieren werden die 24 Bit des
184-
Farbwertes als 24 Bit Integer verwendet. Die ersten 255 Elemente verwenden
185-
entsprechend nur den Blau-Anteil, danach kommt Grün und danach Rot hinzu.
193+
Um die Objekt-ID in einer Farbe zu kodieren werden die 24 Bit des Farbwertes
194+
als 24 Bit Integer verwendet. Die ersten 255 Elemente verwenden entsprechend
195+
nur den Blau-Anteil, danach kommt Grün und danach Rot hinzu.
186196
Der Farbwert 0xFFFFFF ist dem Hintergrund zugeordnet.

doc/DEV_GUIDE_EN.md

Lines changed: 78 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
# Developer Guide
2-
(English translation from German v0.1 by Aliazzz)
1+
# Developer Guide (English)
32

3+
## Credits
4+
The initial english translation was done by Aliazzz - thanks for your great work!
45

56
## Build WebVisu.html
67
To generate WebVisu.html from the source files you will need
@@ -31,6 +32,13 @@ Call the release script:
3132
After calling the release script both the files
3233
"WebVisu.html" and "WebVisuPlus.html" are generated in /trunk/release
3334

35+
The script "release.sh" can optionally be given the parameter "HTMLTITLE=".
36+
This sets the title of the generated HTML file to the passed value.
37+
38+
Example:
39+
```bash
40+
./release.sh HTMLTITLE=WebVisu5
41+
```
3442

3543
### Internal working of the Release process
3644
The Release process internally runs twice. For every result file once.
@@ -86,7 +94,7 @@ or
8694
- http://[IP_ADDRESS_OF_PLC]/WebVisuDev.html
8795

8896

89-
### Test unter Linux
97+
### Test under Linux
9098
In directory /trunk/tools a minimalistic Python2 Webserver can be found.
9199
Difference with the Python-Documentation example lies in a changes ("Hacks")
92100
that ignore smaller and larger abnormalities in the incomming data.
@@ -112,3 +120,70 @@ with "Hallo".
112120

113121
For testing the Firefox-Developpersconsole can be used.
114122

123+
## Arguments in the URL
124+
The WebVisu can be influenced by arguments in the URL.
125+
How arguments are encoded in URLs should be clear, here again a Example as a
126+
reminder:
127+
128+
- http://localhost:8080/src/WebVisuDev.pp.html?firstArg=1&secondArg=2&thirdArg=3
129+
130+
The first argument is separated with a "?", each additional argument with a "&".
131+
132+
- startVisu=...
133+
134+
Sets the visualization file to be loaded as the beginning.
135+
Default: "plc_visu"
136+
137+
- plcDir=...
138+
139+
Overwrites the automatic recognition of the PLC directory with the
140+
specified value.
141+
142+
- postUrl=...
143+
144+
Overrides the automatic recognition of the variable connection to the
145+
target.
146+
147+
- logOverlayWriteout
148+
149+
Activates a mini log window in the upper right corner. For browsers that
150+
do not provide a console.
151+
152+
- perfWriteout
153+
154+
Activates a small performance window in the upper left corner in which the
155+
times required for loading and updating the screen or the variables are
156+
displayed.
157+
158+
- useTouchEvents or dontUseTouchEvents
159+
160+
Overrides the automatic detection of touch events and activates or deactivates
161+
them.
162+
163+
- doPerfTest
164+
165+
Activates a small performance test. However, it is only used for development.
166+
167+
## Click handling (from r84)
168+
With version r84 the handling of mouse clicks has been completely revised.
169+
Previously, click regions were determined on load and each of them was compared
170+
in the handler functions with the point of the mouse events.
171+
Since r84, click handling has been object-related and no longer works with
172+
coordinates, but with an invisible bitmap. During the graphical output of the
173+
elements (on the browser) each element is also drawn on this invisible bitmap.
174+
The difference is that on the invisible bitmap each element is filled with a
175+
certain color. This colour corresponds to the object ID.
176+
During a mouse event, the (invisible) click bitmap now shows the color of the
177+
point under the mouse and from this color the object ID is recalculated. The
178+
click handler then knows which element was clicked.
179+
This mechanism solves three main problems:
180+
- Invisible elements are not drawn and therefore not detected anymore
181+
- Click regions must always be rectangular. Circles or polygons become
182+
now evaluated correctly.
183+
- If there are several click actions per element, they can now be evaluated
184+
much faster.
185+
186+
To encode the object ID in a color, the 24 bits of the color value are used as
187+
a 24 bit integer. While the first 255 elements only using the blue portion,
188+
the other elements are using the green and then the red portions.
189+
The color value 0xFFFFFFFF is assigned to the background.

doc/mouse_vs_touch.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
Mouse vs. Touch
22
----------------
33

4-
Wie im Blockbeitrag [1] sehr sch�n ausgef�hrt gibt es einen gro�en Unterschied
4+
Wie im Blockbeitrag [1] sehr schön ausgeführt gibt es einen großen Unterschied
55
zwischen Mouse-Events und Touch-Events.
66

7-
Die "nat�rliche" Reihenfolge der Events ist
7+
Die "natürliche" Reihenfolge der Events ist
88
1. touchstart
99
2. touchmove
1010
3. touchend

doc/webserver-protocol.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ Kommunikation mit dem CoDeSys Webserver
22
=======================================
33

44
Der CoDeSys Webserver auf der Steuerung lauscht auf POST-Requests auf der URL
5-
"/plc/webvisu.htm" und beantwortet diese jeweils abh�ngig von der Anfrage.
5+
"/plc/webvisu.htm" und beantwortet diese jeweils abhaengig von der Anfrage.
66

77
Die POST-Daten werden dabei als Zahlenkolonne, getrennt mit einem Pipe "|"
8-
�bertragen. Die Antwort besteht ebenfalls aus Zahlen mit Pipe getrennt.
8+
uebertragen. Die Antwort besteht ebenfalls aus Zahlen mit Pipe getrennt.
99

1010
Eine Anfrage zum Lesen besteht aus
1111
- Befehl (0)
1212
- Anzahl Werte
1313
und Anzahl Werte mal
14-
- Z�hler (0-based)
14+
- Zaehler (0-based)
1515
- Adresse
1616

1717
Antworten auf Leseanfragen
@@ -22,7 +22,7 @@ Antworten auf Leseanfragen
2222
Schreibende Anfragen
2323
- Befehl (1)
2424
- Anzahl Werte
25-
- Z�hler (0-based)
25+
- Zaehler (0-based)
2626
- Adresse
2727
- Wert
2828

@@ -47,10 +47,10 @@ die Laufzeit-Interne Adressierung ab. Die Bedeutung ist (glaube ich)
4747
RefId, Offset, Size, [unbekannt]
4848
und ist nur vom Compiler zuordenbar. Es gibt auch Symboldatenbanken,
4949
jedoch habe ich damit noch nichts gemacht.
50-
RefId und Offset interessieren uns nicht - die m�ssen wir nur immer
50+
RefId und Offset interessieren uns nicht - die muessen wir nur immer
5151
dem Webserver geben. Die Size (in Bytes) ist interessanter, da daran die
52-
zur�ckgelieferten Werte richtig einkategorisiert werden k�nnen.
53-
Den letzten Wert beachte ich aktuell nicht; er k�nnte aber den Datentyp
52+
zurueckgelieferten Werte richtig einkategorisiert werden koennen.
53+
Den letzten Wert beachte ich aktuell nicht; er koennte aber den Datentyp
5454
angeben (siehe 3S-Doku Symbolic CDG.pdf, enum TypeClass):
5555
0 = TYPE_BOOL
5656
1 = TYPE_INT
@@ -84,7 +84,7 @@ Variablen abfragen
8484
Um Variablenwerte zu erfragen muss man dem Server folgenden Befehl
8585
senden:
8686

87-
|0| [Anzahl Werte] | [Z�hler] | [Adresse] | [Z�hler] | [Adresse]
87+
|0| [Anzahl Werte] | [Zaehler] | [Adresse] | [Zaehler] | [Adresse]
8888

8989
Beispiel
9090

@@ -109,7 +109,7 @@ Will man mehrere Variablen abfragen sieht das z.B. so aus:
109109
|5|4|146|2|1 // plc_visu.xml PLC_PRG.counter
110110
|
111111

112-
nat�rlich ohne Kommentare und ohne Zeilenumbr�che:
112+
natuerlich ohne Kommentare und ohne Zeilenumbrueche:
113113

114114
|0|6|0|4|572|4|5|1|4|398|2|1|2|4|272|41|8|3|4|231|41|8...
115115

@@ -119,7 +119,7 @@ Variablen setzen
119119

120120
Zum Setzen der Variablen sendet man den Befehl "1":
121121

122-
|1| [Anzahl Werte] | [Z�hler] | [Adresse] | [Wert] |...
122+
|1| [Anzahl Werte] | [Zaehler] | [Adresse] | [Wert] |...
123123

124124
Beispiel
125125

0 commit comments

Comments
 (0)