您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 质量控制/管理 > CN-5-lenze9400自由应用-V20
Welcome!21July,2006Trainer:TorstenHeß,MarkusToeberg,MarkusWarnecke,StefanWitteProductTraining:产品培训L-forceServoDrives9400L-force9400伺服驱动L-force|EngineerL-force9400工程软件Freeapplications自由应用欢迎参加学习班!ServoDrives9400OwnapplicationsintheFBeditorProcessingportsExternalbusnodesSeveraltasks2Createyourownapplication建立应用项目1.Select“Emptyapplication”oratechnologyapplication选择“空应用”或技术应用2.ActivatetheFBeditor激活FB编辑器3.JustasyouL-ike…正如L-ike…-insertblocks插入方块-insertusercodes插入用户代码-insertvariables插入变量-insertyourownports插入端口-createconnections建立连接-useseveraltasks应用若干任务nextbackServoDrives9400OwnapplicationsintheFBeditorProcessingportsExternalbusnodesSeveraltasks3Ports端口Port=Groupofvariableswhicharetobetransmittedviaabussystematthesametime端口=一组变量通过总线系统在同一时间被发送“Simple”variabletype:“单”变量类型–exactlyonevariable正确地讲,只有一个变量“Array”variabletype:”阵列“类变量–severalvariablesofonevariabletype同一变量类型的若干个变量–appliedinsimplebinarysystems(e.g.terminals)应用在简单的二进制系统中(例如,端子条)“Record”variabletype:”记录“类变量–severalvariablesofdifferentdatatypes不同数据类型的若干个变量–commoninfamiliarapplicationswithCAN通常带CAN的熟悉应用–availableinthetechnologyapplications技术应用中的变量○●□●●●●nextbackServoDrives9400OwnapplicationsintheFBeditorProcessingportsExternalbusnodesSeveraltasks4HowdoestheEngineercreatethePDOs怎样用工程软件建立多个PDOThecompilingprocesscanautomatically…编译过程能自动完成–activatePDOsinasufficientnumber足够数量的有效PDOforCAN:max.4transmitPDOsand4receiptPDOsperinterface对CAN:某个接口最多有4个发送PDO和4个接收PDO–combinetheportstoPDOs组合端口到PDOforCAN:max.8bytesperPDO对CAN:每个PDO最大8字节Portswith“automaticinterface”mustbeinterconnectedtocreatePDOs为建立多个PDO,带“自动接口”的端口必须相互连接PDOswith“automaticallocation”onlycommunicatewheninterconnectedportswantit带“自动定位”的PDOs只有在相互连接的端口希望与其通信时才能通信PDO1Port1○●□PDO2Port2○Port3○nextbackServoDrives9400OwnapplicationsintheFBeditorProcessingportsExternalbusnodesSeveraltasks5PDOcommunicationwithexternalbusnodesPDO与外部总线节点的通信“external”=outsidetheEngineerproject.“外部”=工程项目外的部分。Currently,thefollowingcannotbedisplayedintheEngineer:当前,下面的装置不能在工程软件中显示。–Lenzedevices8200,9300,HMIs,…伦茨装置8200,9300,HMIs…–Mastercontrol主控制器–Devicesofthird-partymanufacturers第三家制造商的装置notincl.intheprojectnointerconnectedportsnoPDO?不包括在项目中无相互连接端口无PDO?HowtoprojectthePDOcommunicationofa9400withexternalbusnodes:怎样使9400项目PDO与外部总线节点通信–Insertdummydevice,interconnectports插入伪器件,相互连接端口–DefinePDOmanually手动定义PDO–Parameterscannotbesetviacodes:Mappingismissing参数不能通过代码设置:映象丢失readynextbackServoDrives9400OwnapplicationsintheFBeditorProcessingportsExternalbusnodesSeveraltasks6Variablemapping变量映像Whyisthatnecessary?为什么这是必要的requiresexplicitlyassignmentofmemoryaddressesofthevariablestoPDOcontents.要求明确地把变量的存储器地址分配成为PDO的内容。Variablesthatcanbefreelydefinedintheprogram在程序中变量可以自由定义FreePDOs自由PDOnextbackServoDrives9400OwnapplicationsintheFBeditorProcessingportsExternalbusnodesSeveraltasks7DefiningportandPDOmanually手动定义端口和PDO1.CreatePDO建立PDOa)Openthe“Processdataobjects”tabintheprojecttree“CANonboard”在项目的树形结构的“CANonboard”中打开“过程数据目标”(PDO)标签b)CreatenewPDO建立新的PDOc)Settransmissionparameterstomanualallocation设置发送参数到手动位置readynextbackServoDrives9400OwnapplicationsintheFBeditorProcessingportsExternalbusnodesSeveraltasks8DefiningportandPDOmanually手动定义端口和PDOreadynextback2.Createport建立端口a)Variabletypewithdesiredcontents变量类型与希望的内容一致b)Selectinterface选择接口c)SelectPDO选择PDO3.Updateproject更新项目ServoDrives9400OwnapplicationsintheFBeditorProcessingportsExternalbusnodesSeveraltasks9PortandexternalPDOmustmatch端口与外部PDO必须匹配PortdefinitionandPDOdatamusthavethesamelength:端口定义和PDO数据必须有相同的长度:Sumoftheelementvariables[Bit]=DLC[Byte].变量[位]单元的总和=DLC[字节]。OrderofthevariablesintheportcorrespondstotheoneinthePDO在端口中变量的次序与在PDO中的次序相对应Sourceandtargetportofaportinterconnectionmusthavethesamelength.端口连接的“源端口”和“目的端口”必须具有相同的长度。PCANExplorernextbackServoDrives9400OwnapplicationsintheFBeditorProcessingportsExternalbusnodesSeveraltasks10Goodtoknow…Engineeringinformationandcodes需要熟知…工程软件的信息和代码NotallinformationintheEngineercanbedirectlydisplayedascodesinthedevice.并非在工程软件中的所有信息都能直接用装置的代码来显示Ingeneral,thefollowingapplies:通常以下规则是适用的–Codes(onlineparameters)aremarkedwitha“C”.用“C”字母作为代码的标记(在线参数)–Otherparameterswithouta“C”不带“C”字母的其它参数arenotdirectlyrepresentedonadevice.Thevaluessetaretransmitted–via“Updatedevices…”.不能在装置中直接表示。其数值的设定要通过发送“更新装置数据…”来完成。nextbackServoDrives9400OwnapplicationsintheFBeditorProcessingportsExternalbusnodesSeveraltasks11HMICANcableintheForumlaboratory在讨论会实验室中的CAN电缆Wecreatealongbus(re-arranging,resistorsoff)我们建立一长总线(重新安排,终端电阻断开)OUTINPCOUTINOFFOUTINONSub-D-9,maleOFFONreadynextbackServoDrives9400OwnapplicationsintheFBeditorProcessingportsExternalbusnodesSeveraltasks12Exercise1:AnownapplicationwithPDO练习1:PDO应用Scenario:Thecontrolprogrammerhasreported:概要:控制程序员提出以下报告:ThecontroltransmitsthefollowingCAN-PDO:控制发送以下CAN-PDOCOB-ID401(decimal),transmittedevery100ms,length8bytes,COB-ID401(十进制数),每隔100ms发送,长度8个字节,Bit0-15=controlword(Word)控制字(字)Bit16-31=unused不使用Bit32-63=scaledspeedsetpoint(32bitDINT)标定的速度设定值(32位双整型)1.ConnecttheCANbusprovidedbythetrainertoyourcontroller.Sett
本文标题:CN-5-lenze9400自由应用-V20
链接地址:https://www.777doc.com/doc-1844553 .html