Table of Contents Introduction ................................3 Creating new project ..........................4 Installation of GSDML files ........................6 Creation of network connections ......................7 Create a sample program ........................10 Further Examples ..........................15 5.1 Reading and Writing of string data types ....................16 5.2 Retrieving of measurement results .......................
Please also note that you will have to use the DIGIFORCE 9311 PROFINET manual to get futher information about input and output parameters (cyclic as well acyclic data transfer)
Creating new project Start the Totally Integrated Automation Protal, select Create New Project (a), assign the project a name (b) and click Create (c): of 21...
Page 5
Go to Devices & networks (a) on the left side select Add new device (b) and look for yor CPU (c). Afterwards click the Add button (d). of 21...
Go to Options->Manage general station description files (GSD) ® Navigate to your DIGIFORCE 9311 GSDML directory (a)(you will find the GSD files on burster DVD ® that you got with your DIGIFORCE 9311 device or on burster.com), select the GSD file (b) and click...
Creation of network connections Double click Device Configuration (a) in the project tree und switch to Network view (b) : ® Now select the DIGIFORCE 9311 device in the catalog and drag & drop it into the working area (a): of 21...
Page 8
Please select an ethernet port on the S7 and hold the left mouse button down to connect the S7 with ® DIGIFORCE 9311: of 21...
Page 9
® Change now to Network view (a) to assign a controller to the DIGIFORCE 9311. Click on the link ® “Not assigned” (b) of DIGIFORCE 9311 and select your controller (c): Check if devices also connected physically to the right ports. You find the port number assignment in the ®...
Create a sample program In this section, you will learn how to create a simple program to start and stop a measurement periodically. ® You will need to refer to sections 7.2 PLC inputs and 7.3 PLC outputs of the DIGIFORCE 9311 PROFINET manual to understand the meaning of inputs and outputs bytes.
Page 11
Select in the new window Organization block (a) and then Cyclic interrupt (b). As language set SCL (c), change the cyclic time to 1.000.000 µs (d) and click OK (e): Type in the following source code in the code fild of the new block: %Q258.0 = TRUE THEN // is IN_START (measurement start) set?
Page 12
Please note: the addresses may be different. You have to check them in the Device view->Device ® overview of the DIGIFORCE 9311. You will also see that the TIA-Editor replaces the input/output addresses with tags. You can change the tags names in PLC Tag table (e.g. to IN_START and OUT_READY): of 21...
Page 13
Before you load the project into the CPU you have to set the IP addresse of your CPU. To do this please go to Device view and select Ethernet addresses (a) in General tab. Set now the IP- Address and a subnet mask(b) assigned to your in section IP-Protocol: of 21...
Page 14
To load the configuration into the CPU select it first go to Online->Download to device and click on Start search (a) to look for your controller. Then select the controller and click on Load (b): ® The DIGIFORCE 9311 starts now a new measurement, wait a second, stops the measurement, wait a second and starts the measurement again and so on.
Further Examples In the followed examples, a Hardware-ID is used to access a certain slot. To find this, please select a ® DIGIFORCE 9311 device in Topology view or Network view and then switch to Device view. Click with the right mouse button on the desired module, e.g. General Setup and select Properties: You will see the hardware indentifier in the tab General: of 21...
5.1 Reading and Writing of string data types Example 1: Reading Device ID and write it as station name to device In this example, we perform a read access on slot 30/Subslot 1/index 10 to get the device type of ®...
Page 17
Example 2: Writing of serial number SN1 into device order sheet Note: Datatype String in TIA Portal contains two additional bytes, which represent the length of the string. To avoid these two bytes being sent use the function ‘Strg_TO_Chars’ to convert the String to a byte array as shown below: PLC parameters table: Sourcecode:...
5.2 Retrieving of measurement results This example shows you how to read the X-Coordinates of the current curve. PLC parameters table: Sourcecode: REPEAT "WRREC_DB"(REQ := TRUE, // Write access to index 10 to prepare the curve ID := 352, // Hardware-ID (see introduction of 'Further examples') INDEX := 10, // Index LEN := 2,...
Page 19
REPEAT "RDREC_DB"(REQ := TRUE, // Read the number of curve values ID := 352, // Hardware-ID (see introduction of 'Further examples') INDEX := 10, // Index MLEN := 4, // Max. length to read VALID => #Valid, BUSY => #Busy, ERROR =>...
5.3 Changing of window limits This example shows you how to enable Evaluation Window 1 and set its coordinates. Note: You have to write all four window limits and then confirm them with index 15. It is not possible to change only one single limit, e.g.
Page 21
ERROR => #Error, // Error STATUS => #Status, // State RECORD := #xMin); UNTIL NOT #Busy #Done END_REPEAT; REPEAT "WRREC_DB"(REQ := TRUE, ID := 286, // HW-ID for Evaluation Window 1 (see introduction of 'Further examples') INDEX := 12, // Index 12: Window 1 limit Xmax LEN := 4, // Length of Real DONE =>...