March 24, 2017 | Author: Hammad Rehman | Category: N/A
EC-Servo Screw driving system Sequence Controller AST30
PLCProgramming
PLC profibus connection for S7 300/400
DEPRAG SCHULZ GMBH u. CO. Kurfürstenring 12-18, D-92224 Amberg Phone: +49 (0)9621-371-0
eMail:
[email protected]
EC-Servo Screw driving system PLC connection S7300/400 - AST30
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. Kurfürstenring 12-18, D-92224 Amberg Phone: +49 (0)9621-371-0
eMail:
[email protected]
EC-Servo Screw driving system PLC connection S7300/400 - AST30
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.
-3DEPRAG SCHULZ GMBH u. CO. Kurfürstenring 12-18, D-92224 Amberg Phone: +49 (0)9621-371-0
eMail:
[email protected]
EC-Servo Screw driving system PLC connection S7300/400 - AST30
-4DEPRAG SCHULZ GMBH u. CO. Kurfürstenring 12-18, D-92224 Amberg Phone: +49 (0)9621-371-0
eMail:
[email protected]
EC-Servo Screw driving system PLC connection S7300/400 - AST30
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. Kurfürstenring 12-18, D-92224 Amberg Phone: +49 (0)9621-371-0
eMail:
[email protected]
EC-Servo Screw driving system PLC connection S7300/400 - AST30
2.4 Description Instance-DB
-6DEPRAG SCHULZ GMBH u. CO. Kurfürstenring 12-18, D-92224 Amberg Phone: +49 (0)9621-371-0
eMail:
[email protected]
EC-Servo Screw driving system
PLC connection S7300/400 - AST30
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
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
been saved R13
-7DEPRAG SCHULZ GMBH u. CO. Kurfürstenring 12-18, D-92224 Amberg Phone: +49 (0)9621-371-0
eMail:
[email protected]
EC-Servo Screw driving system PLC connection S7300/400 - AST30
2.5 Description of initialisation parameters identifier
data type
meaning
INT WORD BOOL BOOL INT
profibus address - 3 from HW-Config W#16#100 à address 256 start signal for AST30 stop signal for AST30 number of instance-datablock
PRG_NR
DINT
program in AST30, that is to be started
INIT_OK AST30_OK AST30_NOK AST30_READY AST30_BEREIT
BOOL BOOL BOOL BOOL BOOL
initialisation finished screwdriving cycle OK screwdriving cycle NOK AST30 ready for new screwdriving cycle AST30 ready
AST30_DATA_OK
BOOL
AST30 Data read
AST30_DATA_READ
BOOL
AST30 data reading active
Modulnum Modul_Adr_in AST30_START AST30_STOP INSTANZ_DB_NR
type input
output
-8DEPRAG SCHULZ GMBH u. CO. Kurfürstenring 12-18, D-92224 Amberg Phone: +49 (0)9621-371-0
eMail:
[email protected]
EC-Servo Screw driving system
PLC connection S7300/400 - AST30
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
-9DEPRAG SCHULZ GMBH u. CO. Kurfürstenring 12-18, D-92224 Amberg Phone: +49 (0)9621-371-0
eMail:
[email protected]
EC-Servo Screw driving system
PLC connection S7300/400 - AST30
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
-10DEPRAG SCHULZ GMBH u. CO. Kurfürstenring 12-18, D-92224 Amberg Phone: +49 (0)9621-371-0
eMail:
[email protected]
EC-Servo Screw driving system PLC connection S7300/400 - AST30
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
-11DEPRAG SCHULZ GMBH u. CO. Kurfürstenring 12-18, D-92224 Amberg Phone: +49 (0)9621-371-0
eMail:
[email protected]
EC-Servo Screw driving system PLC connection S7300/400 - AST30
2.8.1 Example
-12DEPRAG SCHULZ GMBH u. CO. Kurfürstenring 12-18, D-92224 Amberg Phone: +49 (0)9621-371-0
eMail:
[email protected]