21.4.15
Instruction manual UNIGATE
®
IC - Powerlink V. 2.3
29
Deutschmann Automation GmbH & Co. KG
Generating a script
8
Generating a script
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