



版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、該文檔是極速PDF編輯器生成,如果想去掉該提示,請(qǐng)并:SIMATICCommunications processor CP 340 PtP Printer DriverGetting Started04/2005A5E00369899-01該文檔是極速PDF編輯器生成,如果想去掉該提示,請(qǐng)并:Safety GuidelinesThis manual contains notices you have to observe in order to ensure youral safety, as well as to preventdamage to property. The notices
2、referring to youral safety are highlighted in the manual by a safety alertsymbol, notices referring to property damage only have no safety alert symbol. These notices shown below are graded according to the degree of danger.Dangerindicates that death or severeal injury will result if proper precauti
3、ons are not taken.Warningindicates that death or severeal injury may result if proper precautions are not taken.Cautionwith a safety alert symbol, indicates that minoral injury can result if proper precautions are not taken.Cautionwithout a safety alert symbol, indicates that property damage can res
4、ult if proper precautions are not taken.Noticeindicates that an unintended result or situation can occur if the corresponding information is not taken into account.If more than one degree of danger is present, the warning notice representing the highest degree of danger willbe used. A notice warning
5、 of injury to property damage.nels with a safety alert symbol may also include a warning relating toQualifiedThe device/system may only be set up and used in conjunction with this documentation. Commissioning andoperation of a device/system may only be performed by qualifiednel. Within the context o
6、f the safety notesin this documentation qualifieds are defined ass who are authorized to commission, ground andlabel devices, systems and circuits in accordance with established safety practices and standards.Prescribed UsageNote the following:WarningThis device may only be used for the applications
7、 described in the catalog or the technical description and only in connection with devices or components from other manufacturers which have been approved or recommended by Siemens. Correct, reliable operation of the product requires proper transport, storage, positioning and assembly as well as car
8、eful operation and maintenance.TrademarksAll names identified by ® are registered trademarks of the Siemens AG. The remaining trademarks in this publication may be trademarks whose use by third parties for their own purposes could violate the rights of the owner.Copyright Siemens AG 2005.s.Disc
9、laimer of LiabilityWe have reviewed the contents of this publication to ensure consistency with the hardware and software described. Since variance cannot be precluded entirely, we cannot guarantee full consistency. However, the information in this publication is reviewed regularly and any necessary
10、 corrections are included in subsequent editions.The distribution and duplication of this document or the utilization and transmission of its contents are not permitted without express written permission. Offenders will be liable fordamages.s, including rights created by patent grant or registration
11、 of a utilitymor design, are.Siemens AG Automation and DrivesPostfach 4848, 90327 Nuremberg, Germany© Siemens AG 2005Technical data subject to changeSiemens AktiengesellschaftA5E00369899-01該文檔是極速PDF編輯器生成, 如果想去掉該提示,請(qǐng)并:First Steps in CommissioningPrefaceThese instructions show you how to output m
12、essages from a CP 340 to a printer step-by- step on the basis of a concrete example. In the process you also get to know the basic functions of the CP 340 printer driver.The time required amounts to one to two hours, depending on your experience, plus the time required for procurement, wiring and su
13、pply with auxiliary power.WarningAs a component of plants or systems your PLC requires special rules and regulations to be observed, depending on the field of use.The non-compliance with these regulations could result in severe injury as well as damage to machines and equipment.Observe the applicabl
14、e regulations on safety and the prevention of accidents, for example IEC 204 (EMERGENCY-OFF equipment).WarningYou may come into contact with live cables and wires if the power supply module of your PLC is activated or if the supply cable is connected to the power system.Only wire your PLC when it is
15、 de-energized.CP 340 PtP Printer DriverGetting Started, 04/2005, A5E00369899-011-1該文檔是極速PDF編輯器生成,如果想去掉該提示,請(qǐng)并:First Steps in CommissioningRequirementsYou have an S7-300 station consisting of Rack Power supply unit CPU CP 340 with RS 232C port and printer optionYou have an IBM-compatible printer with
16、RS 232 interface. The printer is prepared for serial data transfer and is connected by means of an RS 232 connecting cable to the CP 340.An appropriate configuration of the printer should only be carried out by specialist nel.STEP 7 V5.1+ Service pack 2 are installed correctly on the programming dev
17、ice. Ensure that all the components are compatible, starting from the operating system + service pack up to the STEP7 package + service pack + hotfix and the version of the configuration software with its updates.You have set up a printer output sample project for the S7300 station. The programming
18、device is connected to the CPU of the PLC.····· Figure 1-1Example setupPower supply unit CPU 3xxCP 340RS 232 connecting cable / CP 340 - printer IBM-compatible printerProgramming deviceMPI connecting cable / CPU - programming device S7-300 stationCP 340 PtP Printer Driver Ge
19、tting Started, 04/2005, A5E00369899-011-2該文檔是極速PDF編輯器生成, 如果想去掉該提示,請(qǐng)并:First Steps in CommissioningPurpose of the Getting Started DocumentThe purpose of the Getting Started document is to output the following messages at the following printer:· At· At· AtWhereby.the value reached the li
20、mit of 1500 liters the value exceeded the limit of 1500 litersthe value dropped below the limit of 1500 litersis the current time of day.The messages are created in this Getting Started by using a format string with 3 variables:)RUPDW VWULQJ 0HVVDJH 9DULDEOH 7LPH RI GD$W =WKH YDOXH=WKH OLPLW RI L OL
21、WHUV$W WKH YDOXH UHDFKHG WKH OLPLW RI OLWHUV9DULDEOH &RQILJXUHG PHVVDJH 1R 9DULDEOH ,QWHJHU YDOXH Whereby:· %Z: Is the conversion instruction for the data type TIME_OF_DAY· %i: Is the conversion instruction for the data type INT, WORD, DINT, DWORD· %N: Is the conversion instructio
22、n for outputting a message configured in HW Config In this Getting Started· The format string is defined by the DB 10,· The variables 1, 2 and 3 are defined by the DBs 6, 7 and 8,· The DB 5 contains the pointer DB, the pointers to the DBs 6 to 10.1. Step: Installing the configuration
23、software on the programming deviceThe configuration software contains the function blocks required to connect to your user program as well as programming examples.The configuration software can be found alternatively· On the supplied CD· In the Internet at:Contribution ID: 12310504CP 340 P
24、tP Printer DriverGetting Started, 04/2005, A5E00369899-011-3StepActionResult1Start the installation program by double-clicking the file called SETUP.EXE in the SETUP folder.The installation program is started.2Follow the instructions issued by the installation program.該文檔是極速PDF編輯器生成,如果想去掉該提示,請(qǐng)并:Firs
25、t Steps in Commissioning2. Step: configure the CP 340CP 340 PtP Printer Driver Getting Started, 04/2005, A5E00369899-011-4StepActionResult1Open your project in the SIMATIC Manager.2In your project, call the HWCONFIG configuration table.3Double-click on the CP340 RS232C.The dialog box"CP 340-RS2
26、32C properties" opens.4Note the module address in the "Addresses" tab. This value is required as a parameter when calling the FB P_PRINT in your user program.5Click on the Parameters command button.The dialog box "Configure point-to-point coupling CP 340-RS232C" opens.6Selec
27、t the protocol PRINTER and confirm with Yes.The printer protocol is loaded with the following default settings: 9600 bits/s, 8 data bits, 1 stop bit, parity even, no data flow control, activate BREAK monitoring.7Double-click on the Protocol envelope.The "Protocol" dialog box opens.8If nece
28、ssary, adapt the default protocol settings to your printer protocol and confirm with OK.9Double click the page layout.The "Page layout" dialog box opens.10Specify the page layout and confirm with OK.11Double click on Messages and then SDB.The "Messages" dialog box opens.12Assign
29、a name consisting of aum of 8 ASCII characters for the text SDB.13Enter the following message numbers and message texts consecutively at "Edit message:" and click the Enter command button after each entry.The message texts entered at "Edit message:" are imported into the "Me
30、ssage texts" overview.NumberText0reached1exceeded2dropped below14Click the command buttons OK and SDB.The "Messages" dialog box closes.15Save the configuration with File > Save and exit the configuration dialog box with File > Exit.16In the "Properties CP 340-RS232C" d
31、ialog box click on the OK command button.17Save the configuration you have created with Station > Save and compile in your project.18Transfer the configuration with the CPU in STOP mode by choosing PLC > Download to Module.The data are transferred directly to the Cnd the CP 340. The "SF&q
32、uot; LED goes out to indicate the successful completion of downloading.19Use Station > Exit to close the HW Config.該文檔是極速PDF編輯器生成, 如果想去掉該提示,請(qǐng)并:First Steps in Commissioning3. Step: creating blocks in the block folderCP 340 PtP Printer DriverGetting Started, 04/2005, A5E00369899-011-5StepActionResu
33、lt1In SIMATIC Manager use File > Open . > Libraries in the catalog SiemensSTEP7S7libsCP PtP to open the blocks folder CP 340 and its blocks container.A two-section window is opened with the title of the library and the FBs and FCs belonging to the CP 340.2Copy the FB 4 into the block folder of
34、 your project.3In SIMATIC Manager use File > Open . > Libraries in the catalog SiemensSTEP7S7libsStdLib30 to open the blocks folder IEC Function Blocks and its blocks container.A two-section window is opened with the title of the library and the IEC functions.4Copy the FC 8 into the block fold
35、er of your project.5In SIMATIC Manager use File > Open . > Libraries in the catalog SiemensSTEP7S7libsStdLib30 to open the blocks folder IEC Function Blocks and its blocks container.A two-section window is opened with the title of the library and the SFBs and SFCs.6Copy the SFC 1 into the bloc
36、k folder of your project.7In the blocks container of your project, use Insert > S7 block > Data blocks the following data blocks:DBMeaning in the Printer output projectDB 5Pointer DBDB 6DB for the Variable 1DB 7DB for the Variable 2DB 8DB for the Variable 3DB 9DB for the Variable 4DB 10DB for
37、the format string8In the blocks container of your project, use Insert > S7 block > Variable table to create the variable table VAT_1.該文檔是極速PDF編輯器生成,如果想去掉該提示,請(qǐng)并:First Steps in Commissioning4. Step: calling blocks in the OB 1CP 340 PtP Printer Driver Getting Started, 04/2005, A5E00369899-011-6St
38、epAction1In your project open the OB 1.2In the declaration table create the variable of the data type DATE_AND_TIME called "Time".3In the OB 1 call the SFC 1, the FC 8 and the FB 4 and assign parameters to the blocks as follows:CALL"READ_CLK"SFC1/Read date and timeRET_VAL:=MW3CDT
39、:= #TimeEnter /date and time in the "Time" variableCALL”DT_TOD"FC8/Convert the date and time into the time of dayIN:= #TimeRET_VAL:= DB6.DBD0/Placeholder for the time of day (Variable 1 in the DB 6)CALL”P_PRINT", DB4FB4/FB for the printer output of message textsREQ:=M1.0Trigger b
40、it, positive edge requiredR:=/Reset bitLADDR:= 256/Module address of the CP 340 (from HW Config)DB_N0:= 5/Number of the Pointer DBDBB_N0:= 0/Offset in the Pointer DBDONE:= M1.1/Job finished without errorsERROR:= M1.2/Job finished with errorsSTATUS:= MW2/Specification of the error4Save the OB 1 with
41、File > Save.該文檔是極速PDF編輯器生成, 如果想去掉該提示,請(qǐng)并:First Steps in Commissioning5. Step: specifying the data structure of the blocks (also refer to the manual, section "Outputting Message Texts to a Printer")Now specify the data structure of the blocks DB 5 to 10 and enter the initial values.NotePl
42、ease observe the following points when entering and changing initial values in data blocks:1. Enter the initial values in the Declaration view of the data blocks.2. Use Data > View to change over to the Data view.3. Initialize the data blocks with Edit > Initialize Data Block.Table 1-1Data str
43、ucture of the DB 5 (pointer DB):Save the DB 5 with File > Save.CP 340 PtP Printer DriverGetting Started, 04/2005, A5E00369899-011-7AddressNameTypeInitial valueRemarkSTRUCT+0.0DB_VAR1ARRAY0.26, 0, 4Pointer to the DB 6 with offset 0 and length 4(DB 6 = DB for the Variable 1: "Time of day"
44、)*2.0INT+6.0DB_VAR2ARRAY0.27, 0, 2Pointer to the DB 7 with offset 0 and length 2(DB 7 = DB for the Variable 2: "1500")*2.0INT+12.0DB_VAR3ARRAY0.28, 0, 1Pointer to the DB 8 with offset 0 and length 1(DB 8 = DB for the Variable 3: "Number of the configured message")*2.0INT+18.0DB_V
45、AR4ARRAY0.20, 0, 0DB No. 0: The pointer is interpreted as non-existing and is skipped. Variable 4 is not used.*2.0INT+24.0DB_StringARRAY0.210, 2, 41Pointer to the DB 10 with offset 2 and length 41(DB 10 = DB for the format string);The specification offset 2 is necessary, since the length information
46、 of the string is container in the Byte 0 and 1.The length (in this case 41) must correspond to the number of characters which are entered at "Initial value" in the format string (in this case DB 10).*2.0INT=30.0END_STRUCT該文檔是極速PDF編輯器生成,如果想去掉該提示,請(qǐng)并:First Steps in CommissioningTable 1-2Data
47、 structure of the DB 6 for the Variable 1:Save the DB 6 with File > Save.Table 1-3Data structure of the DB 7 for the Variable 2:Save the DB 7 with File > Save.Table 1-4Data structure of the DB 8 for the Variable 3:Save the DB 8 with File > Save.Table 1-5Data structure of the DB 9 for the Va
48、riable 4:Save the DB 9 with File > Save.CP 340 PtP Printer Driver Getting Started, 04/2005, A5E00369899-011-8AddressNameTypeInitial valueRemark0.0STRUCT+0.0DB_VARByte0DB 9 for the Variable 4 is not used.=2.0END_STRUCTAddressNameTypeInitial valueRemark0.0STRUCT+0.0DB_VARByteB#16#00 = Number of the
49、 configured message(Text of Message No. 0 = "reached")=2.0END_STRUCTAddressNameTypeInitial valueRemark0.0STRUCT+0.0DB_VARINT1500Limit 1500 liters=2.0END_STRUCTAddressNameTypeInitial valueRemark0.0STRUCT+0.0DB_VARTIME_OF_DAYTOD#0:0:0.0Time of day=4.0END_STRUCT該文檔是極速PDF編輯器生成, 如果想去掉該提示,請(qǐng)并:Fir
50、st Steps in CommissioningTable 1-6Data structure of the DB 10 for the format string:(also refer to the manual, section "Conversion and Control Statements for Printer Output")Save the DB 10 with File > Save.6. Step: creating the variable tableOpen the variable table VAT_1 and carry out t
51、he following entries:Save the variable table VAT_1 with Table > Save.7. Step: downloading the programCP 340 PtP Printer DriverGetting Started, 04/2005, A5E00369899-011-9StepAction1In SIMATIC Manager in your project select the blocks container.2In the STOP state of the CPU, download these blocks t
52、o your CPU by using PLC > Load.3Switch the CPU to the RUN state.AddressSymbolDisplay formatStatus valueModify valueRemarks1M 1.0BIN2#0Trigger bit (0-1 edge required)2M 1.1BIN3M 1.2BIN4DB6.DBD0TIMECurrent time of day5MW 2HEX6DB8.DBB0HEXB#16#00Number of the configured messageAddressNameTypeInitial valueRemark0.0STRUCT+0.0DB_VARSTRING41'At %Z the value %N the limit
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 營(yíng)養(yǎng)保健品包裝材料-全面剖析
- 2025年度醫(yī)療服務(wù)質(zhì)量提升工作計(jì)劃
- 高三生物復(fù)習(xí)小組學(xué)習(xí)計(jì)劃
- 手術(shù)室護(hù)理安全管理計(jì)劃
- 建筑行業(yè)人力資源合同管理范文
- 小學(xué)數(shù)學(xué)復(fù)課情境教學(xué)計(jì)劃
- 2025中小學(xué)教師多媒體教學(xué)能力提升計(jì)劃
- 幼兒園新學(xué)期語(yǔ)言發(fā)展計(jì)劃
- 小學(xué)傳統(tǒng)體育文化推廣計(jì)劃
- 2023年心理健康護(hù)理質(zhì)量監(jiān)測(cè)計(jì)劃
- 連云港2025年連云港市贛榆區(qū)事業(yè)單位招聘31人筆試歷年參考題庫(kù)附帶答案詳解
- 8.1薪火相傳的傳統(tǒng)美德 課件-2024-2025學(xué)年統(tǒng)編版道德與法治七年級(jí)下冊(cè)
- 湖北省武漢市2025屆高中畢業(yè)生四月調(diào)研考試語(yǔ)文試卷及答案(武漢四調(diào))
- GB/T 28730-2012固體生物質(zhì)燃料樣品制備方法
- 智慧教育大數(shù)據(jù)云平臺(tái)建設(shè)方案
- 湖南省鄉(xiāng)鎮(zhèn)衛(wèi)生院街道社區(qū)衛(wèi)生服務(wù)中心地址醫(yī)療機(jī)構(gòu)名單目錄
- 新中考考試平臺(tái)-考生端V2.0使用手冊(cè)
- 《詩(shī)詞五首漁家傲(李清照)》優(yōu)秀課件
- 現(xiàn)澆箱梁施工危險(xiǎn)源辨識(shí)及分析
- 抗高血壓藥物研究進(jìn)展頁(yè)P(yáng)PT課件
- 環(huán)境土壤學(xué)PPT課件
評(píng)論
0/150
提交評(píng)論