chapter 09 profibus plc prog

12
EC-Servo Screw driving system Sequence Controller AST30 DEPRAG SCHULZ GMBH u. CO. Kurfürstenring 12-18, D-92224 Amberg Phone: +49 (0)9621-371-0 eMail: [email protected] PLC- Programming PLC profibus connection for S7 300/400

Upload: hammad-rehman

Post on 27-Nov-2014

97 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Chapter 09 Profibus PLC Prog

EC-Servo Screw driving system Sequence Controller AST30

DEPRAG SCHULZ GMBH u. CO. Kurfürstenring 12-18, D-92224 Amberg Phone: +49 (0)9621-371-0 eMail: [email protected]

PLC-

Programming

PLC profibus connection

for

S7 300/400

Page 2: Chapter 09 Profibus PLC Prog

EC-Servo Screw driving system PLC connection S7300/400 - AST30

-2-

DEPRAG SCHULZ GMBH u. CO. Kurfürstenring 12-18, D-92224 Amberg Phone: +49 (0)9621-371-0 eMail: [email protected]

Inhalt 1 General........................................................................................................................ 3 2 Connection ................................................................................................................. 3

2.1 Wiring.................................................................................................................... 3 2.2 Hardware .............................................................................................................. 3 2.3 Software................................................................................................................ 5 2.4 Description Instance-DB ....................................................................................... 6 2.5 Description of initialisation parameters ................................................................. 8 2.6 Used blocks .......................................................................................................... 9 2.7 Standard communication PLC DP – AST30 ....................................................... 10 2.8 Functions that can be controlled via profibus DP................................................ 11

Page 3: Chapter 09 Profibus PLC Prog

EC-Servo Screw driving system PLC connection S7300/400 - AST30

-3-

DEPRAG SCHULZ GMBH u. CO. Kurfürstenring 12-18, D-92224 Amberg Phone: +49 (0)9621-371-0 eMail: [email protected]

1 General Profibus connection for AST30 sequence controller offers the possibility to start the

single screwdriving sequences and to download final values and parameters of the

screwdriving cycle to the plc.

All needed software is available in the software package DEPRAG_AST30.zip.

2 Connection 2.1 Wiring

Profi-bus has to be connected with connection GX8 (Baud-Rate: 1,5 MBits) of

AST30 controller (see chapter 7 of the handbook: Controller AST30 - Hardware

Description)

Additional pin 14 (emergency stop) on connection GC30 has to be connected to

24V.

To use profibus special device data has to be loaded to the AST30

(DEPR_DP.ngd).

Please refer to LOADER manual.

2.2 Hardware To connect AST30 to a Siemens S7 the following steps are necessary:

- Unzip of software package DEPRAG_AST30.zip.

- Insert GSD-file

- Installation in hardware

Please note: input and output have to be within the same range.

Page 4: Chapter 09 Profibus PLC Prog

EC-Servo Screw driving system PLC connection S7300/400 - AST30

-4-

DEPRAG SCHULZ GMBH u. CO. Kurfürstenring 12-18, D-92224 Amberg Phone: +49 (0)9621-371-0 eMail: [email protected]

Page 5: Chapter 09 Profibus PLC Prog

EC-Servo Screw driving system PLC connection S7300/400 - AST30

-5-

DEPRAG SCHULZ GMBH u. CO. Kurfürstenring 12-18, D-92224 Amberg Phone: +49 (0)9621-371-0 eMail: [email protected]

2.3 Software For controlling AST30 by Profibus the following blocks are needed.

All blocks are keeped in the archive.

For each AST30 FB110 has only to be called once with an instance block.

Page 6: Chapter 09 Profibus PLC Prog

EC-Servo Screw driving system PLC connection S7300/400 - AST30

-6-

DEPRAG SCHULZ GMBH u. CO. Kurfürstenring 12-18, D-92224 Amberg Phone: +49 (0)9621-371-0 eMail: [email protected]

2.4 Description Instance-DB

Page 7: Chapter 09 Profibus PLC Prog

EC-Servo Screw driving system PLC connection S7300/400 - AST30

-7-

DEPRAG SCHULZ GMBH u. CO. Kurfürstenring 12-18, D-92224 Amberg Phone: +49 (0)9621-371-0 eMail: [email protected]

In the instance-DB all values are filed and can be monitored as well. DB110.DBD 218 "DB_AST30_1".Cycle Cycle counter R10 Floating point

DB110.DBD 222 "DB_AST30_1".Status Status of screwdriving cycle R11 Floating point DB110.DBD 226 "DB_AST30_1".Variante Program number R12 Floating point

DB110.DBD 230 "DB_AST30_1".Section Step, in which final values have

been saved R13

Floating point

DB110.DBD 234 "DB_AST30_1".Torque Final torque R14 Floating point DB110.DBD 238 "DB_AST30_1".MAX_Torque Torque upper limit R15 Floating point DB110.DBD 242 "DB_AST30_1".MIN_Torque Torque lower limit R16 Floating point DB110.DBD 246 "DB_AST30_1".Angle Final angle R17 Floating point DB110.DBD 250 "DB_AST30_1".MAX_Angle Angle upper limit R18 Floating point DB110.DBD 254 "DB_AST30_1".MIN_Angle Angle lower limit R19 Floating point DB110.DBD 274 "DB_AST30_1".T_Torque Shutoff torque R24 Floating point DB110.DBD 278 "DB_AST30_1".T_Angle Shutoff angle R25 Floating point

Page 8: Chapter 09 Profibus PLC Prog

EC-Servo Screw driving system PLC connection S7300/400 - AST30

-8-

DEPRAG SCHULZ GMBH u. CO. Kurfürstenring 12-18, D-92224 Amberg Phone: +49 (0)9621-371-0 eMail: [email protected]

2.5 Description of initialisation parameters identifier type data type meaning Modulnum INT profibus address - 3 Modul_Adr_in WORD from HW-Config W#16#100 à address 256 AST30_START BOOL start signal for AST30 AST30_STOP BOOL stop signal for AST30 INSTANZ_DB_NR

input

INT number of instance-datablock PRG_NR DINT program in AST30, that is to be started INIT_OK BOOL initialisation finished AST30_OK BOOL screwdriving cycle OK AST30_NOK BOOL screwdriving cycle NOK AST30_READY BOOL AST30 ready for new screwdriving cycle AST30_BEREIT

output

BOOL AST30 ready AST30_DATA_OK BOOL AST30 Data read AST30_DATA_READ BOOL AST30 data reading active

Page 9: Chapter 09 Profibus PLC Prog

EC-Servo Screw driving system PLC connection S7300/400 - AST30

-9-

DEPRAG SCHULZ GMBH u. CO. Kurfürstenring 12-18, D-92224 Amberg Phone: +49 (0)9621-371-0 eMail: [email protected]

2.6 Used blocks

functions and functionblocks

FB 111 DATA_READ Receive and analyse data

FB 112 DATA_WRITE Compile and send data

FB 113 COMMAND Accept commands and parameters

FB 114 INITIALIZE Adapt output data to input data

FB 116 ERWCMD Parameters via expanded protocol

FC 107 LREAL_TO_REAL Convert LONG to REAL

system functions by Siemens

SFC 104 DPRD_DAT read DP-slave

SFC 15 DPWR_DAT write DP-slave

Page 10: Chapter 09 Profibus PLC Prog

EC-Servo Screw driving system PLC connection S7300/400 - AST30

-10-

DEPRAG SCHULZ GMBH u. CO. Kurfürstenring 12-18, D-92224 Amberg Phone: +49 (0)9621-371-0 eMail: [email protected]

2.7 Standard communication PLC DP – AST30

1. deposit value for program in double PRG_NR

2. Request AST30_BEREIT

3. Request AST30_READY

4. signal high to input AST30_START

5. Request AST30_READY, AST30_OK and AST30_NOK

6. Request AST30_DATA_OK

7. signal low to input AST30_START

At program-start, the signals “Ready” as well as “OK/NOT OK” are set on LOW-level.

The subsequent high-level of OK as well as NOT OK signalizes the end of the screw

driving cycle.

Signals OK-Cycle

Signals NOK-Cycle

Page 11: Chapter 09 Profibus PLC Prog

EC-Servo Screw driving system PLC connection S7300/400 - AST30

-11-

DEPRAG SCHULZ GMBH u. CO. Kurfürstenring 12-18, D-92224 Amberg Phone: +49 (0)9621-371-0 eMail: [email protected]

2.8 Functions that can be controlled via profibus DP

Command 37, start screw driving cycle This command starts a screw driving cycle. The parameter contains the number of the program which is to be executed. The output stage is activated during the command (CNC_ON = 1). The command will only be executed, if -- the AST30 is in the operational mode AUTOMATIC (CNC_RUN = 1) The command is finished, if -- the process has been terminated completely -- a malfunction has occurred -- the command has been aborted (CMD_BYTE = 0) Command number CMD_BYTE = 37 Call condition CNC_RUN = 1 Call parameter CMD_PAR = byte 7 = variant number Return value during the execution CNC_PAR = depending on the firmware and application Return value after finishing the command CNC_ERR = 1 -> error CNC_SB2 = CNC_ERR = 1 -> error code, CNC_ERR = 0 -> message code CNC_SB3 = last or faulty section CNC_PAR = depending on the firmware and application Command 39, finish screw driving cycle This command finishes a screw driving cycle. The parameter states if final values are to be generated. the command (CNC_ON = 1). The command will only be executed, if -- the AST30 is in the operational mode AUTOMATIC (CNC_RUN = 1) The command will also be executed, if An error occurs (CNC_ERR <> 0) The command cannot be aborted. Command number CNC_BYTE = 39 Call condition CNC_RUN = 1 Call parameter CNC_PAR=0 -> abort screw driving cycle Return value during the execution CNC_ERR = 1 -> error Return value after finishing the command CNC_ERR = 1 -> error CNC_SB1 = CNC_ERR = 1 -> error code, CNC_ERR = 0 -> message code

Page 12: Chapter 09 Profibus PLC Prog

EC-Servo Screw driving system PLC connection S7300/400 - AST30

-12-

DEPRAG SCHULZ GMBH u. CO. Kurfürstenring 12-18, D-92224 Amberg Phone: +49 (0)9621-371-0 eMail: [email protected]

2.8.1 Example