《LG#0102E印刷行业的东西.pdf》由会员分享,可在线阅读,更多相关《LG#0102E印刷行业的东西.pdf(71页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、KBA Training KBAWelcome to the KBA Training center!PLC/ABB/KT97_98 Basic course IEC1131 LG#0101 KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:2KBA TrainingLG#0102-PLC/ABB/Basic course IEC1131Indroduction Name,age,place of recidence Qualification,company,field of activity,kno
2、w how expectations,requestsIntroduction KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:3KBA TrainingObjective To understand and operate CoDeSys.To learn about the functionality of PLC KT97/98 To be able to perform maintenance tasks.To exchange experiencesIntroduction KBASPS/A
3、BB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:4KBA Training PLC KT97/98:Hardware,system constants,peripherals CoDeSys:Handling,configuration,watch variables,forcing I/Os PLC programming:Introduction to PLC programming based on easyexercices and examples.Discussion about the most imp
4、ortant KBA-specificroutines(Start-up“,pre-warning device“,modulesearch“,etc.)Training programmeIntroduction KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:5KBA TrainingPLC 07KT97Potentiometer(For exerciseswith WORD/DWORD functionality)I/O panel with Meter(0.10V,connected to A
5、W006,03)Power supply 24VDCCS31 I/O-module(07DC91)Connection for externalCS31-modulesTerminal(supply,PE,Fuse)KBA PLC Trainer KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:6KBA TrainingPLC Programmable Logic ControlInputsSupplyOutputsPLC ProgrammKBA 07 KT 98PLC Basics KBASPS/A
6、BB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:7KBA TrainingInput values:Sensors(oil level,temperature,.Push-buttons Feedback values(potentiometer,limit switches,sensors,.)Values of control console(rated speed s/h,configuration,counter correction,.PLCOutput values:Rated values to mai
7、n-and auxiliary drives Activation of valves,signal lamps,displays,.PLC Basics KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:8KBA TrainingPLC 07KT98 R0160-OverviewPLC Basics KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:9KBA TrainingPLC 07KT98-general
8、 dataNOTESINFOINFOINFOINFOPLC Basics KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:10KBA TrainingPLC 07KT94/97/98-System constants(1)PLC Basics KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:11KBA TrainingPLC 07KT94/97/98-System constants(2)KW086,.PLC
9、 Basics KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:12KBA TrainingA PLC programme is generatedwith help of a commercialEditor e.g.ULTRAEDITAfter completion,the programm code can be transfered from the PC into the PLC.via ARCnet or Serial interfaceThe programme can be trans
10、fered and stored into the FLASH-EPROM after loading.The PLC internal battery is used to buffer the status of variables counters,conditions of flags,etc.in the RAM.How to get started.PLC Basics KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:13KBA Traininggeneration of animage
11、for the inputs usedin the programfirst instructionof the programfinal instructionof the program!E 1!PE&E 2=A 1cycle time of a PLCtransfer of the image for the outputs to the output channelsset the output in the image for the outputsThis value is depence on various facts(Program size,number and type
12、of used operands,CS31 bus members,.Cycle timePLC Basics KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:14KBA TrainingOperators in IEC1131(extract)NOTESArithmetic operatorsAddition of variablesADDMultiplicationMULSubtractionSUBBitstring operatorsBitwise ANDANDBitwise ORORBitwi
13、se Exclusive-ORXORBitwise NOTNOTBit-shift operatorsBitwise left-shiftSHLBitwise Right-shiftSHRComparative operatorsGreater ThanGTLower ThanLTLower EqualLEAddress operatorsAddressADRContent operatorDetailedinformations:see HelpPLC Basics KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2
14、008Page:15KBA TrainingOperators(1)NOTES:Example 1:AND-functionExample 2:IF-Instruction/OR-functionPLC Basics KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:16KBA TrainingNOTESOperators(2)Example 3:FOR-LoopPLC Basics KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 0
15、1/2008Page:17KBA TrainingOperands in IEC1131(extract)NOTESPLC Basics KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:18KBA TrainingOperands in IEC1131:VariablesOne-dimensional fieldof binary variablesTRUE,FALSE,FALSE,.Binary variablepossible values:TRUE/FALSEBYTE Variablerange
16、:0.255WORD Variablerange:0.65535PLC Basics KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:19KBA TrainingOperands in IEC1131(extract)NOTESAddressing(examples):%IX014.03%QX062.12%QW1006.00PLC Basics KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:20KBA Tr
17、ainingOperands in IEC1131:AdressesDeclaration of in-and outputs for CS31 busmodules and PLC 07KT98See also:PLC Basics KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:21KBA TrainingNOTESData TypesPLC Basics KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:
18、22KBA TrainingIntroductionController Development System3S-Smart Software Solutions GmbH is one of the leadingsoftware manufacturers in the European automationindustry.CoDeSys is the leading hardware independent IEC 61131-3 programming system under Windows for creatingcontroller applicationshttp:/www
19、.3s- KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:23KBA TrainingController Development SystemCoDeSys KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:24KBA TrainingProgramming languagesNOTESCoDeSys KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 up
20、date 01/2008Page:25KBA TrainingA project contains all of the objects in a PLC program.A project is saved in a file named after the project.(*.PRJ)The following objects are included in a project:POUs(Program Organization Units),data types,visualizations,resources,and libraries.POUsFunctions,function
21、blocks,and programs are POUs.Each POU consists of a declaration part and a body.The body is written in one of the IEC programming languages which include IL,ST,SFC,FBD and LD.907 AC 1131 supports all IEC standard POUs.If you want to use these POUs in your project,youmust include the library standard
22、.lib in your project.POUs can call up other POUs.However,recursions are not allowed.Objects of a Project are needing additional filesThese files could be:-external libraries(not produced with CoDeSys);Extensions:“*.dfr”,“*.lib”,“*.obj”-internal libraries(produced with CoDeSys);Extension:“*.lib”-expo
23、rted parts of a project(produced with CoDeSys);Extension:“*.exp”-Path settings in the Project must be correct!Projects/POUs/Libraries.CoDeSys KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:26KBA TrainingUsage of libraries-benefits:Project becomes clearly arranged and modular
24、Already tested Objects can be used as a“Black Box”Different KBA Programmer are using the same Programm modules Changes in library will have effect in all projectsCoDeSys-Projects/POUs/Libraries.CoDeSys KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:27KBA TrainingPOU(Program O
25、rganization Unit)Functions,function blocks,and programs are POUs which can be supplemented by actions.Each POU consists of a declaration part and a body.The body is written in one of the IEC programming languages which include IL,ST,SFC,FBD,LD or CFC.907 AC 1131 supports all IEC standard POUs.If you
26、 want to use these POUs in your project,you must include the library standard.lib in your project.POUs can call up other POUs.However,recursions are not allowed.POUsCoDeSys KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:28KBA TrainingFunction Block-A function block is a POU w
27、hich provides one or more values during the procedure.-As opposed to a function,a function block provides no return value.A function block declaration begins with the keyword FUNCTION_BLOCK.Reproductions or instances(copies)of a function block can be created.Programm-A program is a POU which returns
28、 several values during operation.Programs are recognized globally throughout the project.-All values are retained from the last time the program was run until the next.Action-Actions can be defined and assigned to function blocks and programmes-An action works with the data from the function block o
29、r programme which it belongs to-The action uses the same input/output variables and local variables as the normal implementation uses.Function-Is a POU,which yields exactly one data element(which can consist of several elements,such as fields or structures)-A result must be assigned to the function.
30、That means that function name is used as an output variable.A function declaration begins with the keyword FUNCTION.CoDeSysPOUs/Actions KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:29KBA TrainingExample of calling up a functionCoDeSys KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG
31、#0101-V01.02 update 01/2008Page:30KBA TrainingExample of calling up a function block(Here:FB_Ansteuerung_Kompressor)Variable declarationFB_Ansteuerung_Kompressoris a INSTANCE of FB_bTogglAssignment of Input-variables of FBGet condition of output-variable Q“and assignement to another variable.CoDeSys
32、 KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:31KBA TrainingCalling up a actionCoDeSys KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:32KBA TrainingCoDeSys-Library managerCoDeSys KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:
33、33KBA TrainingGlobal searchNOTESsearchCoDeSys KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:34KBA TrainingNOTESOptionsCoDeSys KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:35KBA TrainingCoDeSys(ONLINE)NOTESCoDeSys KBASPS/ABB/KT97_98/Grundkurs IEC1131
34、 LG#0101-V01.02 update 01/2008Page:36KBA TrainingCoDeSys-watch variablesCoDeSys KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:37KBA TrainingNOTESKBA programming-used I/OsCoDeSys KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:38KBA TrainingPLC 07KT98-s
35、ystem constants(example)KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:39KBA TrainingKBA programming-used abbreviationsNOTES KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:40KBA TrainingNOTESVariables declarationAdditional to Uebung_03“:Call of FB_Togg
36、l KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:41KBA TrainingProgramming in ST-Example:FunctionBlock FBNOTESFB_RTrigFehlerLoeschen is a Instance of FB R_Trig“.KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:42KBA TrainingNOTESProgramming in ST-Functio
37、nBlock R_TRIG“KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:43KBA TrainingProgramming in ST-Example:CallNOTESBool type variable bErsterAufruf will beinitialized with TRUEIf the variable bErsterAufruf isTRUE“the ACT_InitPRG_Mainis calledVariablebErsterAufrufis set to FALSE KB
38、ASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:44KBA TrainingNOTESCoDeSys-VisualizationsLoad 683061ZO.PROLoad 683061ZO.PROMouse contact-Variable KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:45KBA TrainingProgramming in ST-Example:Pointer/Struct KBASPS/
39、ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:46KBA TrainingPLC-Basics KT98:Task configurationNOTESSeveral tasks could run on a PLC at the same time.Tasks callingprogramms(PRG)and theseprogramms are treated with different priority,-The responsible task for maschine-runmust have the
40、 highest priorityand mustnt get missed!(Reine Kommunikations-oder Berechnungs-Tasks mssen niedere Prioritt erhalten.Da KBA Programme Normierungen auf die Zykluszeit enthalten,mu die Zykluszeit im Intervall der Task eingetragen werden,zumindest fr die Task des Maschinenlaufs.Die Konstante KD000,00 ha
41、t bei der 07KT98 keine Bedeutung fr die Programmbearbeitung,muaber gleich wie die Zykluszeit der Task eingetragen werden,damit die Normierungen auf die Zykluszeit richtig berechnet werden!)KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:47KBA TrainingProgramming in ST-Example:
42、Struct KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:48KBA TrainingExtract of a KBA Parameter file for Config-MessageName of file:DE_23D1A.par(-DruckEinheit 23D1(DW1 DW2)-Allgemeine Konfig)Extract of a KBA Parameter file for Config-MessageName of file:DE_23D1A.par(-DruckEinh
43、eit 23D1(DW1 DW2)-Allgemeine Konfig)KBA Programming-Parameterfiles KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:49KBA TrainingCS31 Bus-System9X KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:50KBA TrainingNOTESCS31 Bus Master(SPS 07KT9X)CS31 Busmodul
44、e(07DC91)CS31 Busmodule(ICSO 08 R1)CS31 Bus terminator(120)CS31 Bus-System KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:51KBA TrainingDC501 Module descriptionCS31 Bus-System KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:52KBA TrainingCS31 Bus-System
45、 KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:53KBA TrainingFeatures/max.distancesArcnet System KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:54KBA TrainingCoax CableT“Connector9393TerminatingResistorARCNET communication0100%0.100%PLC 1PLC 2Arcnet S
46、ystem KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:55KBA TrainingARCNET communication 07KT9X27202720Arcnet System KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:56KBA TrainingARCNET communication(1)without HUBArcnet System KBASPS/ABB/KT97_98/Grundkur
47、s IEC1131 LG#0101-V01.02 update 01/2008Page:57KBA TrainingStation 1Station 2Station 3Station 4300 m with max.8 stations per line93 Ohm TerminatingResistor93 Ohm TerminatingResistorARCNET communication(1)without HUBArcnet System KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:5
48、8KBA TrainingAppendix:Exercise/Additions)KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:59KBA TrainingAppendix:Uebung(1)AND/ORCreate a new Programm with the object as follows:-Programming language Function Block Diagram“-Save it into your local path as:Ueb_01.pro-Name of vari
49、ables at your own choice&E062,04E062,05=1E062,06A062,00A062,01 KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:60KBA TrainingNOTESAppendix:Uebung(1)AND/OR(procedure)KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:61KBA TrainingAppendix:Uebung 01(AND/OR i
50、n FBD)KBASPS/ABB/KT97_98/Grundkurs IEC1131 LG#0101-V01.02 update 01/2008Page:62KBA TrainingAppendix:Uebung(2)AND/OR in ST-Programming language Structured text“-Save it into your local path as:Ueb_02.pro-Name of variables at your own choice&E062,04E062,05=1E062,06A063,06A063,07Create a new Programm w