10204|3

5

帖子

0

TA的资源

一粒金砂(初级)

楼主
 

我有s7-300 siemens840d source,请哪位高手解释其内容及为什么这么编? [复制链接]

bhg—db //Achtung: Parameter BHGIn und BHGOut im FB 1 beachten //Please note FB 1-parmeter BHGIn, BHGOut DATA_BLOCK "strdat" //strdat - ist Anwender DB, is User DB VERSION : 0.0 STRUCT disp : STRING [32 ] := 'sunrise '; //disp ist Datum fuer Bedienhandgeraet //disp is data for the handheld unit END_STRUCT ; BEGIN END_DATA_BLOCK DB120_GUD DATA_BLOCK DB 120 //Anwender DB STRUCT SPDL : STRING [32 ] := 'SPINDLE'; ARM : STRING [32 ] := 'ARM'; MAZ : STRING [32 ] := 'MAGAZINE'; MAZV : STRING [32 ] := 'MAZ_CAPACITY'; TXX : STRING [32 ] := 'T_CODE'; SM19 : STRING [32 ] := 'VATC_M19'; ATCX : STRING [32 ] := 'VATC_X'; ATCY : STRING [32 ] := 'VATC_Y'; ATCZ : STRING [32 ] := 'VATC_Z'; PWD : STRING [32 ] := 'SERVICE_PWD'; MCSX: STRING [32 ] := 'MACHINE_X'; MCSY: STRING [32 ] := 'MACHINE_Y'; MCSZ: STRING [32 ] := 'MACHINE_Z'; WCSX: STRING [32 ] := 'RELATIVE_X'; WCSY: STRING [32 ] := 'RELATIVE_Y'; WCSZ: STRING [32 ] := 'RELATIVE_Z'; RCX: STRING [32 ] := 'RC_X'; RCY: STRING [32 ] := 'RC_Y'; RCZ: STRING [32 ] := 'RC_Z'; NSP : STRUCT SYNTAX_ID:BYTE; bereich_u_einheit:byte; spalte:word; zeile:word; bausteintyp:byte; ZEILENANZAHL:BYTE; typ:byte; laenge:byte; END_STRUCT; NARM : STRUCT SYNTAX_ID:BYTE; bereich_u_einheit:byte; spalte:word; zeile:word; bausteintyp:byte; ZEILENANZAHL:BYTE; typ:byte; laenge:byte; END_STRUCT; NMAZ : STRUCT SYNTAX_ID:BYTE; bereich_u_einheit:byte; spalte:word; zeile:word; bausteintyp:byte; ZEILENANZAHL:BYTE; typ:byte; laenge:byte; END_STRUCT; NMAZV : STRUCT SYNTAX_ID:BYTE; bereich_u_einheit:byte; spalte:word; zeile:word; bausteintyp:byte; ZEILENANZAHL:BYTE; typ:byte; laenge:byte; END_STRUCT; NTXX : STRUCT SYNTAX_ID:BYTE; bereich_u_einheit:byte; spalte:word; zeile:word; bausteintyp:byte; ZEILENANZAHL:BYTE; typ:byte; laenge:byte; END_STRUCT; ASP : STRUCT SYNTAX_ID:BYTE; bereich_u_einheit:byte; spalte:word; zeile:word; bausteintyp:byte; ZEILENANZAHL:BYTE; typ:byte; laenge:byte; END_STRUCT; AX : STRUCT SYNTAX_ID:BYTE; bereich_u_einheit:byte; spalte:word; zeile:word; bausteintyp:byte; ZEILENANZAHL:BYTE; typ:byte; laenge:byte; END_STRUCT; AY : STRUCT SYNTAX_ID:BYTE; bereich_u_einheit:byte; spalte:word; zeile:word; bausteintyp:byte; ZEILENANZAHL:BYTE; typ:byte; laenge:byte; END_STRUCT; AZ : STRUCT SYNTAX_ID:BYTE; bereich_u_einheit:byte; spalte:word; zeile:word; bausteintyp:byte; ZEILENANZAHL:BYTE; typ:byte; laenge:byte; END_STRUCT; NPWD : STRUCT SYNTAX_ID:BYTE; bereich_u_einheit:byte; spalte:word; zeile:word; bausteintyp:byte; ZEILENANZAHL:BYTE; typ:byte; laenge:byte; END_STRUCT; MX : STRUCT SYNTAX_ID:BYTE; bereich_u_einheit:byte; spalte:word; zeile:word; bausteintyp:byte; ZEILENANZAHL:BYTE; typ:byte; laenge:byte; END_STRUCT; MY: STRUCT SYNTAX_ID:BYTE; bereich_u_einheit:byte; spalte:word; zeile:word; bausteintyp:byte; ZEILENANZAHL:BYTE; typ:byte; laenge:byte; END_STRUCT; MZ : STRUCT SYNTAX_ID:BYTE; bereich_u_einheit:byte; spalte:word; zeile:word; bausteintyp:byte; ZEILENANZAHL:BYTE; typ:byte; laenge:byte; END_STRUCT; WX : STRUCT SYNTAX_ID:BYTE; bereich_u_einheit:byte; spalte:word; zeile:word; bausteintyp:byte; ZEILENANZAHL:BYTE; typ:byte; laenge:byte; END_STRUCT; WY : STRUCT SYNTAX_ID:BYTE; bereich_u_einheit:byte; spalte:word; zeile:word; bausteintyp:byte; ZEILENANZAHL:BYTE; typ:byte; laenge:byte; END_STRUCT; WZ : STRUCT SYNTAX_ID:BYTE; bereich_u_einheit:byte; spalte:word; zeile:word; bausteintyp:byte; ZEILENANZAHL:BYTE; typ:byte; laenge:byte; END_STRUCT; CX : STRUCT SYNTAX_ID:BYTE; bereich_u_einheit:byte; spalte:word; zeile:word; bausteintyp:byte; ZEILENANZAHL:BYTE; typ:byte; laenge:byte; END_STRUCT; CY : STRUCT SYNTAX_ID:BYTE; bereich_u_einheit:byte; spalte:word; zeile:word; bausteintyp:byte; ZEILENANZAHL:BYTE; typ:byte; laenge:byte; END_STRUCT; CZ : STRUCT SYNTAX_ID:BYTE; bereich_u_einheit:byte; spalte:word; zeile:word; bausteintyp:byte; ZEILENANZAHL:BYTE; typ:byte; laenge:byte; END_STRUCT; END_STRUCT; BEGIN END_DATA_BLOCK gpob840d //840D ORGANIZATION_BLOCK OB 1 VERSION: 2.0 VAR_TEMP OB1_EV_CLASS : BYTE; OB1_SCAN_1 : BYTE; OB1_PRIORITY : BYTE; OB1_OB_NUMBR : BYTE; OB1_RESERVED_1 : BYTE; OB1_RESERVED_2 : BYTE; OB1_PREV_CYCLE : INT; OB1_MIN_CYCLE : INT; OB1_MAX_CYCLE : INT; OB1_DATE_TIME : DATE_AND_TIME; END_VAR BEGIN CALL FC 2; //HIER ANWENDERPROGRAMM EINFUEGEN //Insert Userprogram from here END_ORGANIZATION_BLOCK //************************************************************* ORGANIZATION_BLOCK OB 100 VERSION: 2.3 VAR_TEMP OB100_EV_CLASS : BYTE; OB100_STRTUP : BYTE; OB100_PRIORITY : BYTE; OB100_OB_NUMBR : BYTE; OB100_RESERVED_1 : BYTE; OB100_RESERVED_2 : BYTE; OB100_STOP : WORD; OB100_RESERVED_3 : WORD; OB100_RESERVED_4 : WORD; OB100_DATE_TIME : DATE_AND_TIME; END_VAR BEGIN Call fb 1, db 7( MCPNum :=1, MCP1In :=P#E0.0, MCP1Out :=P#A0.0, MCP1StatSend :=P#A8.0, MCP1StatRec :=P#A12.0, MCP1BusAdr :=6, MCP1Timeout :=S5T#700MS, MCP1Cycl :=S5T#200MS, NCCyclTimeout :=S5T#200MS, NCRunupTimeout :=S5T#50S); //HIER ANWENDERPROGRAMM EINFUEGEN //Insert Userprogram from here END_ORGANIZATION_BLOCK //************************************************************* ORGANIZATION_BLOCK OB 40 VERSION: 3.2 VAR_TEMP OB40_EV_CLASS : BYTE; OB40_STRT_INF : BYTE; OB40_PRIORITY : BYTE; OB40_OB_NUMBR : BYTE; OB40_RESERVED_1 : BYTE; OB40_MDL_ID : BYTE; OB40_MDL_ADDR : INT; OB40_POINT_ADDR : DWORD; OB40_DATE_TIME : DATE_AND_TIME; //Belegung durch das Grundprogramm //data for the Basicprogram GP_IRFromNCK : BOOL; //Interrupt from NCK GP_TM : BOOL; //Toolmanagment GP_InPosition : ARRAY [1..31] OF BOOL; //InPos Signal from FC15,16,18 GP_AuxFunction : ARRAY [1..10] OF BOOL; //Auxilary functions GP_FMBlock : ARRAY [1..10] OF BOOL; //not used //HIER ANWENDER-Lokaldaten EINFUEGEN //Insert User-data from here END_VAR BEGIN CALL FC 3; //HIER ANWENDERPROGRAMM EINFUEGEN //Insert Userprogram from here END_ORGANIZATION_BLOCK

最新回复

啊!没用过,帮不上忙了,那就帮你顶啦  详情 回复 发表于 2007-6-30 19:09
点赞 关注
 

回复
举报

449

帖子

0

TA的资源

五彩晶圆(高级)

沙发
 

回复:我有s7-300 siemens840d source,请哪位高手解释其内容及为什么这么编?

啊!没用过,帮不上忙了,那就帮你顶啦
个人签名世界是个圈,人生也是个圈。
 
 

回复

5

帖子

0

TA的资源

一粒金砂(初级)

板凳
 

回复:我有s7-300 siemens840d source,请哪位高手解释其内容及为什么这么编?

这还只是source的一部分,其中block的内容结构还能大概看懂,block有150个块,但这为什么这么遍就一头雾水了,请哪位高手帮帮忙,小第谢谢了
 
 

回复

5

帖子

0

TA的资源

一粒金砂(初级)

4
 

回复:我有s7-300 siemens840d source,请哪位高手解释其内容及为什么这么编?

还有 比如说:块OB40: CALL FB 1 , DB7 MCPNum :=1 MCP1In :=P#I 0.0 MCP1Out :=P#Q 0.0 MCP1StatSend :=P#Q 8.0 MCP1StatRec :=P#Q 12.0 MCP1BusAdr :=6 MCP1Timeout :=S5T#700MS MCP1Cycl :=S5T#200MS MCP2In := MCP2Out := MCP2StatSend := MCP2StatRec := MCP2BusAdr := MCP2Timeout := MCP2Cycl := MCPMPI := MCP1Stop := MCP2Stop := MCP1NotSend := MCP2NotSend := BHG := BHGIn := BHGOut := BHGStatSend := BHGStatRec := BHGInLen := BHGOutLen := BHGTimeout := BHGCycl := BHGRecGDNo := BHGRecGBZNo := BHGRecObjNo := BHGSendGDNo := BHGSendGBZNo := BHGSendObjNo := BHGMPI := BHGStop := BHGNotSend := NCCyclTimeout :=S5T#200MS NCRunupTimeout:=S5T#50S ListMDecGrp := NCKomm :=TRUE MMCToIF := HWheelMMC :=FALSE MsgUser := UserIR := IRAuxfuT := IRAuxfuH := IRAuxfuE := UserVersion := MaxBAG := MaxChan := MaxAxis := ActivChan := ActivAxis := UDInt := UDHex := UDReal := //HIER ANWENDERPROGRAMM EINFUEGEN //Insert Userprogram from here SET = DB10.DBX 56.1 等等
 
 

回复
您需要登录后才可以回帖 登录 | 注册

随便看看
查找数据手册?

EEWorld Datasheet 技术支持

相关文章 更多>>
关闭
站长推荐上一条 1/7 下一条

 
EEWorld订阅号

 
EEWorld服务号

 
汽车开发圈

About Us 关于我们 客户服务 联系方式 器件索引 网站地图 最新更新 手机版

站点相关: 国产芯 安防电子 汽车电子 手机便携 工业控制 家用电子 医疗电子 测试测量 网络通信 物联网

北京市海淀区中关村大街18号B座15层1530室 电话:(010)82350740 邮编:100190

电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号 Copyright © 2005-2025 EEWORLD.com.cn, Inc. All rights reserved
快速回复 返回顶部 返回列表