background image

4.10.17

Instruction manual UNIGATE

®

 FC - PROFINET 2Port V. 1.5

25

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 bytes 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 a PROFINET 
without 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 

Summary of Contents for UNIGATE CM - PROFINET 2Port

Page 1: ...Instruction Manual Universal Fieldbus Gateway UNIGATE FC PROFINET 2Port Deutschmann Automation GmbH Co KG www deutschmann com wiki deutschmann de ...

Page 2: ...Manual Art No V3893E ...

Page 3: ......

Page 4: ...S1 12 3 2 4 Data In SPI MISO 13 3 2 5 Load In SPI MOSI 13 3 2 6 Clock SPI SCK 13 3 2 7 Reset In 13 3 2 8 Errror LED 13 3 2 9 Ground 13 3 2 10 State LED 13 3 2 11 Config Mode 13 3 2 12 DbgTX DbgRx 14 3 2 13 TX RX 14 3 2 14 TE 14 3 3 Software 14 3 4 Basic line of proceeding 14 3 5 Connection examples 15 3 6 Layout examples 17 3 7 Handling mounting the UNIGATE FC on the carrier board 19 4 The serial ...

Page 5: ...n of the UNIGATE FC 24 7 4 1 RS232 RS485 RS422 24 8 Generating a script 25 8 1 What is a script 25 8 2 Memory efficiency of the programs 25 8 3 What can you do with a script device 25 8 4 Independence of buses 25 8 5 Further settings at the gateway 25 8 6 The use of the Protocol Developer 26 9 FTP Server 27 9 1 Script update via FTP 27 9 2 System configuration update via FTP 27 10 WEB Server 28 10...

Page 6: ... firmware update 38 15 3 Adjusting the firmware update mode 38 15 3 1 Adjustment by hardware 38 15 4 Note on safety 38 15 5 Operation mode of the FC 38 16 Technical data 39 16 1 Mechanics of the UNIGATE FC 39 16 1 1 General dimensions of UNIGATE FC 39 16 1 2 Dimension drawing UNIGATE FC 39 16 1 3 Height of the UNIGATE FC 40 16 2 Technical data UNIGATE FC PROFINET 40 17 Accessory 41 17 1 FirmwareDo...

Page 7: ...Deutschmann Automation GmbH Co KG 6 Instruction manual UNIGATE FC PROFINET 2Port V 1 5 4 10 17 ...

Page 8: ...publication is however reviewed regularly Necessary amendments are incorporated in the following editions We would be pleased to receive any improvement proposals which you may have Copyright Copyright C Deutschmann Automation GmbH Co KG 1997 2016 All rights reserved This document may not be passed on nor duplicated nor may its contents be used or disclosed unless expressly permitted Violations of...

Page 9: ...erent fieldbusses can easily be integrated Through the flexible firmware of UNIGATE FC no software changes are required on the side of the customer Since 1997 Deutschmann Automation has experience in the field of fieldbus gateways this enormous experience results in the UNIGATE FC as a consistent sequel of this successful product line Terminology In the entire document and in all parts of the soft...

Page 10: ...veloped for a UNIGATE IC can also be operated on the UNIGATE FC 2 4 The serial standard Interface Intelligent devices that already feature a micro controller or a microprocessor are generally sup plied with a serial asynchronous interface with a TTL level It is directly connected with the TTL interface of the UNIGATE FC For more information on this serial interface see chapter 4 on page 20 2 5 The...

Page 11: ...pensable for the development of a script Usually a script is developed with the software Protocol Developer For more details take a look at the instruction manual Protocol Developer You ll find more information on the Debug Interface in chapter 6 on page 23 All interfaces can independently be used at the same time 2 7 UNIGATE FC hardware survey The hardware of the UNIGATE FC consists of some few s...

Page 12: ...s chapter gives basic advise that is required in order to load UNIGATE FC into your own hardware designs In the following all ports of UNIGATE FC are described in detail 3 1 Ports UNIGATE FC features 64 pins in its layout with only 20 pins routed to the outside The exact mechanical dimensions can be taken from chapter 16 on page 39 ...

Page 13: ...gic Config Mode signal to start the configuration mode internally pulled up with 10 k 15 OUTLogic DbgTX serial Debug TX 16 INLogic DbgRX serial Debug RX internally pulled up with 10 k 17 INLogic RX serial data RX internally pulled up with 10 k 18 OUTLogic TX serial data TX 19 OUTLogic TE Transmit enable Steuerung RS422 485 Driver 20 GND GND Ground supply voltage of the FC The supply voltage is 3 3...

Page 14: ...d with VCC in order to avoid interferences see chapter 3 6 If the customer s application has to initiate a reset of the UNIGATE FC then the reset input can also be connected with a reset output of the customer s application instead of connecting it with VCC Here all specifications of the reset signal mentioned in chapter 3 2 have to be kept The reset impulse needs to last at least 10 µs 3 2 8 Errr...

Page 15: ... The signal is set to High whenever the FC sends via the line TX 3 3 Software The software executes script commands which in turn control the FC s hardware and they pro cess their complete protocol by software The script itself can be generated by the company Deutschmann Automation or with the software Protocol Developer by yourself For a detailed description of the script commands of the Protocol...

Page 16: ... UNIGATE FC independently processes the communication with the customer s device via the TTL interface Version 2 Use of UNIGATE FC for digital or analog I O modules Here only the synchronous serial interface is used the asynchronous serial interface is basically of no account If you want to program the script in your completed application then the use of a connector for the asynchronous interface ...

Page 17: ...ynchronous and the asynchronous interface as well can be operated by UNIGATE FC at the same time Here the possibility results that an existing application can be extended by additional digital or analog I Os In chapter 5 2 you find an example for a script that operates these I Os Valid for all versions A planed plug connection of the serial interface in the application offers the possibility of an...

Page 18: ...4 10 17 Instruction manual UNIGATE FC PROFINET 2Port V 1 5 17 Deutschmann Automation GmbH Co KG Hardwaredesign 3 6 Layout examples ...

Page 19: ...Hardware design Deutschmann Automation GmbH Co KG 18 Instruction manual UNIGATE FC PROFINET 2Port V 1 5 4 10 17 ...

Page 20: ...angements for two holes next to the socket in the layout After the UNIGATE FC was plugged in the socket pull an isolated wire over the FC and solder it on the carrier board at the specified holes Fasten the UNIGATE FC With a wire or a tie wrap on the socket Manual soldering directly on the carrier board Automatic soldering directly on the carrier board whereas selective soldering is essential no w...

Page 21: ...es at the UNIGATE FC UNIGATE FC features a buffer at the serial side with the size of 1024 byte for input data and output data each The FIFO of the application interface RS interface can be changed in any Gateway form Script revision 26 on that is capable for Script For it please check in the Protocol Developer under Device Control Hardware 4 3 Initialization of the serial interface The initializa...

Page 22: ...rOutputType allow the use of different shift register types which differ in the polarity of the shift register signals To use the shift register types 74595 and 74165 for example the values RiseClk_RiseLoad and RiseClk_LowLoad can be set The shift register width is set by the parameter ShiftRegisterInputBitLength and ShiftRegisterOutputBitLength The maximum width is 256 bits The data exchange with...

Page 23: ...PI sets the operating type the mode signal polarity and phase and the clock frequency The data exchange ensues with the command ExchangeSPI The maximum clock frequency is between 1 and 5 MHz depending on the hardware For details please see the IC Pinout list in the download area of our website Please also refer to the script commands documentation in the online help of the Protocol Developer 5 2 1...

Page 24: ...or the Debug interface The Debug interface is always operating with 9600 baud no parity 8 data bit 1 stop bit It is not possible to change this parameter in the Protocol Developer Please consider the fact that these settings have to be in accordance with those of the PC COM interface and that the flow control protocol has to be set on none there 6 4 Possibilities with the Debug interface Usually t...

Page 25: ...hmann Automation GmbH Version 1 0 Date 21 08 2001 SN 47110001 IP 172 16 48 62 MAC 00 14 11 15 19 81 7 3 Update the script The preferred version is the one where the FC is inserted into the basis board available from Deutschmann Automation and the Deutschmann tools e g software WINGATE with Write Script under File are used On request the procedures how to overwrite the included script can be disclo...

Page 26: ...hat 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 Independen...

Page 27: ... 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 comma...

Page 28: ...isconnect ing the FTP connection Before restarting the device one must wait for the write process to the non volatile memory to complete to prevent data loss 9 1 Script update via FTP In the Protocol Developer save the compiled script DCS file using the file name script dcs Transfer the file to the UNIGATE After completion of the write process please disconnect from the FTP server and restart the ...

Page 29: ...ver s instructions with the appropriate values and sends the generated page SSI directives are listed within HTML comments and have the following syntax exec command The following commands are a selection of supported commands A complete list of all commands can be found in the Online help of the Protocol Developer Command Instruction incl Commentary is replaced with DisplayFWVersion Firmware vers...

Page 30: ...example input forms for process values can be realized The script command SetHTMLInput String assigns a name to a script variable which then can be used in the HTML form 10 3 Examples The interaction between Gateway Script and HTML page can be taken from the example HTML page ssi shtml and the example Script example_Set_HTML_String dss Both files are accessable in the download area of our website ...

Page 31: ... devname txt device name nvdata non volatile device parameter bg jpg bg_container jpg bg_footer jpg bg_topnavi gif bottom gif da logo gif deutschmann css down gif favicon ico h4_pre gif header_schatten jpg headline jpg index html line gif profinet gif rnavmain_bg gif ssi html teaser_header jp device web site Please note that files can not be overwritten or edited on the device If you want to repla...

Page 32: ... KG FileSystem system To perform the formatting of your command line please use the FTP client on Microsoft Windows Command Prompt ftp exe Make a connection to the FTP server of the UNIGATE and then run the command del The string is understood as a request by UNIGATE to format the file system ...

Page 33: ...h The IP address can also be assigned manually or with a DHCP Server 12 3 PROFINET Device Name Note In delivery condition the Gateway is not assigned a device name The device name is assigned via the configuration software of the Gateway Alternatively the device name can be changed via FTP File devname txt or the Script According to PROFINET specification the following rules apply It consists of o...

Page 34: ...arameterized and configured by the PROFINET IO controller during the startup phase Only after a correct termination of the startup phase the data exchange with external devices will take place 12 7 Literature We recommend the book Der Schnelleinstieg in PROFINET author M Popp and K Weber to help you quickly get to grips with the subject of PROFINET The book German language can be ordered from the ...

Page 35: ...10 17 13 Hardware ports and light emitting diodes LED 13 1 View 13 2 Connectors 13 2 1 PROFINET connectors The connectors for the connection to PROFINET is loacted on the upper side of the device Pin assignement P1 P2 2 x RJ45 Pin No Name Function 1 TD Transmission line 2 TD Transmission line 3 RD Receive line 4 5 6 RD Receive line 7 8 ...

Page 36: ...the PROFINET processor and illuminates if the Gateway at Port 1 P1 is located in an operational network it receives link pulses and flickers at network traffic 13 3 2 LED 3 Link Act P2 This LED is controlled directly by the PROFINET processor and illuminates if the Gateway at Port 2 P2 is located in an operational network it receives link pulses and flickers at network traffic 13 3 3 LED 5 PROFINE...

Page 37: ... 1 2 4 8 Error No If these 4 LED s are flashing and the LED State is illuminated red at the same time binary cod ing is happening for conversion table view Appendix according to the table in chapter Error handling Additionally these scripts are controlable via Script 13 3 6 LED 12 Power This LED is connected directly to the supply voltage of the UNIGATE FC ...

Page 38: ...d returned for repair Warnings 6 15 These warnings are displayed for one minute simply for information purposes and are then automatically reset If such warnings occur frequently please inform After Sales Service The system error can be read out via the Script In the configuration mode these displays are not valid and only meant for internal use Error no Error description 0 Reserved 1 Hardware fau...

Page 39: ...rdware UNIGATE FC can be brought to the firmware update mode by the hardware For it the signal BE boot enable has to be pulled to the potential GND during the Power up process 15 4 Note on safety The firmware update should only be carried out when there is no other possibility left A firm ware update process that has already been started CANNOT be undone With it the previously used firmware is per...

Page 40: ...ta 16 Technical data In this chapter you will find all necessary technical data on UNIGATE FC All measurements in mm 16 1 Mechanics of the UNIGATE FC 16 1 1 General dimensions of UNIGATE FC 16 1 2 Dimension drawing UNIGATE FC The pins of the UNIGATE FC PROFINET 2Port are arranged 2 54 mm in the contact pitch ...

Page 41: ...chronous serial interface IP address Assigned by the Profinet IO controller SPS Bus baud rate 100 MBaud UART baud rate Up to 520 Kbaud adjustable via script Supported Ethernet protocols UDP IP TCP IP Technology 32 bit processor Others I Os analogous signals shift registers LEDs switches and so on can be connected externally Dimensions 47 52 mm x 56 mm x 18 mm WxDxH Weight Approx 25 g Operating tem...

Page 42: ... to all script commands This soft ware is available for download from our homepage at http www deutschmann com The instruction manual for the Protocol Developer which is available in pdf format gives further advise on how to use the software 17 3 Developerkit UNIGATE FC The Devloperkit FC contains a Developerboard UNIGATE FC Article number V3852e see chapter 17 3 1 a plug in power pack to supply t...

Page 43: ...ndard or market standard are available to test the respec tive bus side Optionally Deutschmann Add on packages bus master simulation are available The board contains 32 bit input and 16 bit output provided with one LED each Different connec tors allow an easy coupling to your processor A hole matrix field with the most important signals voltage IOs allows a customized hardware extension e g to con...

Page 44: ...g connector PL Board only without DIN rail module and without housing cover PD Board only without DIN rail module and with housing cover AG Gateway installed in a die cast aluminum housing EG Gateway installed in a stainless steel housing IC Product group IC IC design DIL32 16 Script memory expanded to 16KB 5V Operating voltage 5V 3 3V Operating voltage 3 3V Fieldbus ASI AS Interface AS i BI BACne...

Page 45: ...comparison table UNIGATE IC for the respective product PBDPX PROFIBUS DP version X see comparison table UNIGATE IC for the respective product PBDPV0 PROFIBUS DPV0 PBDPV1 PROFIBUS DPV1 RS Serial RS232 485 422 18 2 Hexadecimal table Hex Decimal Binary 0 0 0000 1 1 0001 2 2 0010 3 3 0011 4 4 0100 5 5 0101 6 6 0110 7 7 0111 8 8 1000 9 9 1001 A 10 1010 B 11 1011 C 12 1100 D 13 1101 E 14 1110 F 15 1111 ...

Page 46: ... reach us during hotline hours which are as follows Monday to Thursday from 8 am to noon and from 1 pm to 4 pm Friday from 8 am to noon CET Deutschmann Automation GmbH Co KG Carl Zeiss Straße 8 D 65520 Bad Camberg Germany Central office and sales department 49 6434 9433 0 Technical hotline 49 6434 9433 33 Fax sales department 49 6434 9433 40 Fax technical hotline 49 6434 9433 44 E Mail technical h...

Page 47: ...Servicing Deutschmann Automation GmbH Co KG 46 Instruction manual UNIGATE FC PROFINET 2Port V 1 5 4 10 17 ...

Page 48: ......

Reviews: