15.8.14
UNIGATE
®
fieldbus gateway UNIGATE
®
CL PROFINET 2Port V. 1.6
18
Deutschmann Automation GmbH & Co. KG
Generating a Script
9
Generating a Script
9.1 What is a Script?
A Script is a sequence of commands, that are executed in that exact order. Because of the fact
that also mechanisms are given that control the program flow in the Script it is also possible to
assemble more complex processes from these simple commands.
The Script is memory-oriented. It means that all variables always refer to one memory area.
While developing a Script you do not have to take care of the memory management though. The
PROTOCOL DEVELOPER takes on this responsibility for you.
9.2 Memory efficiency of the programs
A Script command can carry out e. g. a complex checksum like a CRC-16 calculation via data.
For the coding of this command only 9 byte are required as memory space (for the command
itself). This is only possible when these complex commands are contained in a library.
A further advantage of this library is, that the underlying functions have been in practical use for a
couple of years and therefore can be described as ’void of errors’. As these commands are also
present in the native code for the controller, at this point also the runtime performance of the
Script is favorable.
9.3 What can you do with a Script device?
Our Script devices are in the position to process a lot of commands. In this case a command is
always a small firmly outlined task. All commands can be put into classes or groups. A group of
commands deals with the communication in general. This group’s commands enable the Gate-
way to send and receive data on the serial side as well as on the bus-side.
9.4 Independence of buses
Basically the Scripts do not depend on the bus, they are supposed to operate on. It means that a
Script which was developed on a PROFIBUS Gateway can also be operated on an Interbus with-
out changes, since the functioning of these buses is very similar. In order to also process this
Script on an Ethernet Gateway, perhaps further adjustments have to be made in the Script, so
that the Script can be executed reasonably.
There are no fixed rules how which Scripts have to operate properly. When writing a Script you
should take into account on which target hardware the Script is to be executed, so the necessary
settings for the respective buses can be made.
9.5 Further settings at the Gateway
Most devices require no further adjustments, except for those made in the Script itself.
9.6 The use of the PROTOCOL DEVELOPER
The software tool PROTOCOL DEVELOPER can be downloaded from our website
http://www.deutschmann.de
It 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.