9.2.22
Instruction manual UNIGATE
®
IC - DeviceNet V. 4.0
32
Deutschmann Automation GmbH & Co. KG
Generating a script
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 at UNIGATE
®
IC
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!
In the following please find a listing of baud rates at a 40 MHz-crystal frequency with the corre-
sponding errors: