22.6.17
UNIGATE
®
fieldbus gateway UNIGATE
®
EL - DeviceNet
™
V. 1.0
20
Deutschmann Automation GmbH & Co. KG
Generating a Script
8
Generating a Script
Note: All commands relating to the extension do not work in the debug
mode! (see Chapter 6.5)
8.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.
8.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.
8.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.
8.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.
8.5 Further settings at the Gateway
Most devices require no further adjustments, except for those made in the Script itself. However,
there are also exceptions to it. These settings are made by means of the software WINGATE. If
you know our UNIGATE
®
-series, you are already familiar with the proceeding with it. An example
is the adjustment of the IP-address and the net-mask of an Ethernet-Gateway. These values
have to be known as fixed values and are not available for the runtime. Another reason for the