Chapter 09 Profibus PLC Prog
Chapter 09 Profibus PLC Prog
Chapter 09 Profibus PLC Prog
PLCProgramming
DEPRAG SCHULZ GMBH u. CO. Kurfrstenring 12-18, D-92224 Amberg Phone: +49 (0)9621-371-0
eMail: info@deprag.de
Inhalt
1 2 General........................................................................................................................ 3 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
-2DEPRAG SCHULZ GMBH u. CO. Kurfrstenring 12-18, D-92224 Amberg Phone: +49 (0)9621-371-0 eMail: info@deprag.de
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.
Connection
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.1 Wiring
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.
-3DEPRAG SCHULZ GMBH u. CO. Kurfrstenring 12-18, D-92224 Amberg Phone: +49 (0)9621-371-0 eMail: info@deprag.de
-4DEPRAG SCHULZ GMBH u. CO. Kurfrstenring 12-18, D-92224 Amberg Phone: +49 (0)9621-371-0 eMail: info@deprag.de
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.
-5DEPRAG SCHULZ GMBH u. CO. Kurfrstenring 12-18, D-92224 Amberg Phone: +49 (0)9621-371-0 eMail: info@deprag.de
-6DEPRAG SCHULZ GMBH u. CO. Kurfrstenring 12-18, D-92224 Amberg Phone: +49 (0)9621-371-0 eMail: info@deprag.de
In the instance-DB all values are filed and can be monitored as well.
DB110.DBD 218 DB110.DBD 222 DB110.DBD 226 DB110.DBD 230 DB110.DBD 234 DB110.DBD 238 DB110.DBD 242 DB110.DBD 246 DB110.DBD 250 DB110.DBD 254 DB110.DBD 274 DB110.DBD 278 "DB_AST30_1".Cycle "DB_AST30_1".Status "DB_AST30_1".Variante "DB_AST30_1".Section "DB_AST30_1".Torque "DB_AST30_1".MAX_Torque "DB_AST30_1".MIN_Torque "DB_AST30_1".Angle "DB_AST30_1".MAX_Angle "DB_AST30_1".MIN_Angle "DB_AST30_1".T_Torque "DB_AST30_1".T_Angle Cycle counter R10 Status of screwdriving cycle R11 Program number R12 Step, in which final values have been saved R13 Final torque R14 Torque upper limit R15 Torque lower limit R16 Final angle R17 Angle upper limit R18 Angle lower limit R19 Shutoff torque R24 Shutoff angle R25 Floating point Floating point Floating point Floating point Floating point Floating point Floating point Floating point
-7DEPRAG SCHULZ GMBH u. CO. Kurfrstenring 12-18, D-92224 Amberg Phone: +49 (0)9621-371-0 eMail: info@deprag.de
type
input
data type
INT WORD BOOL BOOL INT DINT BOOL BOOL BOOL BOOL BOOL BOOL BOOL
meaning
profibus address - 3 from HW-Config W#16#100 address 256 start signal for AST30 stop signal for AST30 number of instance-datablock program in AST30, that is to be started initialisation finished screwdriving cycle OK screwdriving cycle NOK AST30 ready for new screwdriving cycle AST30 ready AST30 Data read AST30 data reading active
-8DEPRAG SCHULZ GMBH u. CO. Kurfrstenring 12-18, D-92224 Amberg Phone: +49 (0)9621-371-0 eMail: info@deprag.de
system functions by Siemens SFC 104 DPRD_DAT SFC 15 DPWR_DAT read DP-slave write DP-slave
-9DEPRAG SCHULZ GMBH u. CO. Kurfrstenring 12-18, D-92224 Amberg Phone: +49 (0)9621-371-0 eMail: info@deprag.de
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
-10DEPRAG SCHULZ GMBH u. CO. Kurfrstenring 12-18, D-92224 Amberg Phone: +49 (0)9621-371-0 eMail: info@deprag.de
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
-11DEPRAG SCHULZ GMBH u. CO. Kurfrstenring 12-18, D-92224 Amberg Phone: +49 (0)9621-371-0 eMail: info@deprag.de
2.8.1 Example
-12DEPRAG SCHULZ GMBH u. CO. Kurfrstenring 12-18, D-92224 Amberg Phone: +49 (0)9621-371-0 eMail: info@deprag.de