Generating a Script
Deutschmann Automation GmbH & Co. KG
20
UNIGATE
®
Feldbus-Gateway UNIGATE
®
CM - PROFIBUS V. 1.6
23.6.17
have to be known as fixed values and are not available for the runtime. Another reason for the
configuration of the values in WINGATE is the following: After an update of the Script these val-
ues remain untouched, i. e. the settings that were made once are still available after a change of
the Script.
Only this way it is also possible that the same Script operates on different Ethernet-Gateways,
that feature different IP-addresses.
8.6 The use of the Protocol Developer
The Protocol Developer is a tool for an easy generation of a Script for our Script Gateways. Its
operation is exactly aimed at this use. After starting the program the Script that was loaded the
last time is loaded again, provided that it is not the first start.
Typical for Windows Script commands can be added by means of the mouse or the keyboard. As
far as defined and required for the corresponding command, the dialog to the corresponding
command is displayed, and after entering the values the right text is automatically added to the
Script. The insertion of new commands by the Protocol Developer is carried out in a way that
existing commands will not be overwritten. Generally a new command is inserted in front of the
one where the cursor is positioned. Of course the commands can also be written by means of the
keyboard or already written commands can also be modified.
8.7 Accuracies of the baud rates
The baud rate of the serial interface is derived from the processor’s crystal frequency.
Meanwhile all Script-Gateways are working with a crystal frequency of 40 MHz.
You can enter any desired integer baud rate into the Script. After that the firmware adjusts the
baud rate, that can be derived the most precisely from the crystal frequency.
The baud rate the Gateway is actually working with (BaudIst) can be determined as follows:
BaudIst= (F32 / K)
F32 = Crystal frequency [Hz] / 32
K
= Round (F32 / BaudSoll);
Round () is a commercial roundoff
Example:
The actual baud rate is to be calculated, when 9600 baud are pre-set, where the Gateway is
operated with 40 MHz:
F32 = 40000000 / 32 = 1250000
K
= Round(1250000 / 9600) = Round(130.208) = 130
BaudIst= 1250000 / 130 = 9615.38
I. e.: The baud rate actually adjusted by the Gateway is 9615.38 baud
The resulting error in per cent can be calculated as follows:
Error[%] = (abs(BaudIst - BaudSoll) / BaudSoll) * 100
In our example the following error results:
Error = (abs(9615.38 - 9600) / 9600) * 100 = 0.16%
In practise errors below 2% can be tolerated!
Содержание UNIGATE CM - PROFIBUS
Страница 2: ...Manual Art Nr V4009E ...
Страница 62: ......