华为S5700交换机 启用http管理

公司的华为3层交换机,由于不是熟悉,启用web来进行日常的管理。
继续阅读

发表在 网络知识 | 华为S5700交换机 启用http管理已关闭评论

cisco pix515E 配置实例

YXPIX# sh run
: Saved
:
PIX Version 7.2(2)
!
firewall transparent
hostname YXPIX
domain-name yingxin.com
enable password 8Ry2YjIyt7RRXU24 encrypted
names
name 192.168.1.10 WEBSER description PubLic Server
!
interface Ethernet0
nameif outside
security-level 0
!
interface Ethernet1
nameif inside
security-level 100
!
passwd 2KFQnbNIdI.2KYOU encrypted
ftp mode passive
dns server-group DefaultDNS
domain-name yingxin.com
object-group network VLAN1
description BanGong
network-object 192.168.1.0 255.255.255.0
object-group service WEB tcp
port-object eq www
port-object eq ftp
port-object eq ftp-data
port-object eq pop3
port-object eq smtp
object-group service SW-MANAGER tcp
port-object eq www
port-object eq telnet
access-list outside_access_in extended permit icmp any any log disable
access-list outside_access_in extended permit tcp any host WEBSER object-group W EB log disable
access-list outside_access_in extended permit tcp 10.1.1.0 255.255.255.0 192.168 .1.0 255.255.255.0 object-group SW-MANAGER log disable
access-list outside_access_in extended permit tcp 192.168.1.0 255.255.255.0 192. 168.1.0 255.255.255.0 object-group SW-MANAGER log disable
access-list outside_access_in extended permit gre any 192.168.1.0 255.255.255.0 log disable
pager lines 24
logging enable
logging asdm informational
mtu outside 1500
mtu inside 1500
ip address 192.168.1.253 255.255.255.0
icmp unreachable rate-limit 1 burst-size 1
asdm image flash:/asdm
no asdm history enable
arp timeout 14400
access-group outside_access_in in interface outside
route outside 0.0.0.0 0.0.0.0 192.168.1.254 1
timeout xlate 3:00:00
timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 icmp 0:00:02
timeout sunrpc 0:10:00 h323 0:05:00 h225 1:00:00 mgcp 0:05:00 mgcp-pat 0:05:00
timeout sip 0:30:00 sip_media 0:02:00 sip-invite 0:03:00 sip-disconnect 0:02:00
timeout uauth 0:05:00 absolute
username hyjk password HkLrnrKD4Pbp2mva encrypted
http server enable
http 192.168.1.0 255.255.255.0 inside
http 10.1.1.0 255.255.255.0 outside
no snmp-server location
no snmp-server contact
snmp-server enable traps snmp authentication linkup linkdown coldstart
telnet 192.168.1.254 255.255.255.255 outside
telnet 10.1.1.0 255.255.255.0 outside
telnet 192.168.1.0 255.255.255.0 inside
telnet timeout 5
ssh 10.1.1.0 255.255.255.0 outside
ssh timeout 5
console timeout 0
!
class-map inspection_default
match default-inspection-traffic
!
!
policy-map type inspect dns preset_dns_map
parameters
message-length maximum 512
policy-map global_policy
class inspection_default
inspect ftp
inspect h323 h225
inspect h323 ras
inspect rsh
inspect rtsp
inspect esmtp
inspect sqlnet
inspect skinny
inspect sunrpc
inspect xdmcp
inspect sip
inspect netbios
inspect tftp
inspect dns preset_dns_map
!
service-policy global_policy global
prompt hostname context
Cryptochecksum:6d8466a3bc73f0bb951cfe746f66ff14
: end
发表在 网络知识 | cisco pix515E 配置实例已关闭评论

恢复2800 路由器密码实例

恢复公司的2800路由器密码
[cc lang=”php”]
//启动按ctrl+break
monitor: command “boot” aborted due to user interrupt
rommon 1 > confreg 0x2142
//修改confreg 0x2142

You must reset or power cycle for new config to take effect
rommon 2 > reset
// 重启系统
c2811 platform with 262144 Kbytes of main memory
Main memory is configured to 64 bit mode with ECC enabled

Upgrade ROMMON initialized
program load complete, entry point: 0x8000f000, size: 0xcb80
program load complete, entry point: 0x8000f000, size: 0xcb80

program load complete, entry point: 0x8000f000, size: 0x2671aa0
Self decompressing the image : #################################################
################################################################################
################################################################################
################################################################################
################################################################################
########################################################################### [OK]

Smart Init is enabled
smart init is sizing iomem
ID MEMORY_REQ TYPE
0003E7 0X003DA000 C2811 Mainboard
0X00263F50 Onboard VPN
0X000021B8 Onboard USB
0X002C29F0 public buffer pools
0X00211000 public particle pools
TOTAL: 0X00B13AF8

If any of the above Memory Requirements are
“UNKNOWN”, you may be using an unsupported
configuration or there is a software problem and
system operation may be compromised.
Rounded IOMEM up to: 12Mb.
Using 4 percent iomem. [12Mb/256Mb]

Restricted Rights Legend

Use, duplication, or disclosure by the Government is
subject to restrictions as set forth in subparagraph
(c) of the Commercial Computer Software – Restricted
Rights clause at FAR sec. 52.227-19 and subparagraph
(c) (1) (ii) of the Rights in Technical Data and Computer
Software clause at DFARS sec. 252.227-7013.

cisco Systems, Inc.
170 West Tasman Drive
San Jose, California 95134-1706

Cisco IOS Software, 2800 Software (C2800NM-ADVENTERPRISEK9_IVS-M), Version 12.4(
9)T, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2006 by Cisco Systems, Inc.
Compiled Fri 16-Jun-06 22:22 by prod_rel_team
Image text-base: 0x400B100C, data-base: 0x437A0000

This product contains cryptographic features and is subject to United
States and local country laws governing import, export, transfer and
use. Delivery of Cisco cryptographic products does not imply
third-party authority to import, export, distribute or use encryption.
Importers, exporters, distributors and users are responsible for
compliance with U.S. and local country laws. By using this product you
agree to comply with applicable laws and regulations. If you are unable
to comply with U.S. and local laws, return this product immediately.

A summary of U.S. laws governing Cisco cryptographic products may be found at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html

If you require further assistance please contact us by sending email to
export@cisco.com.

Installed image archive
Cisco 2811 (revision 49.46) with 249856K/12288K bytes of memory.
Processor board ID FHK1105F29B
2 FastEthernet interfaces
1 Virtual Private Network (VPN) Module
DRAM configuration is 64 bits wide with parity enabled.
239K bytes of non-volatile configuration memory.
62720K bytes of ATA CompactFlash (Read/Write)

— System Configuration Dialog —

Would you like to enter the initial configuration dialog? [yes/no]: no
//是否进入向导模式?否

Press RETURN to get started!

Feb 27 07:23:47.647: %VPN_HW-6-INFO_LOC: Crypto engine: onboard 0 State changed
to: Initialized
Feb 27 07:23:47.651: %VPN_HW-6-INFO_LOC: Crypto engine: onboard 0 State changed
to: Enabled
Feb 27 07:23:49.199: %LINEPROTO-5-UPDOWN: Line protocol on Interface VoIP-Null0,
changed state to up
Feb 27 07:23:49.199: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to
up
Feb 27 07:23:49.199: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to
up
Feb 27 07:23:49.203: %LINEPROTO-5-UPDOWN: Line protocol on Interface IPv6-mpls,
changed state to up
Feb 27 07:23:50.199: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEtherne
t0/0, changed state to down
Feb 27 07:23:50.199: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEtherne
t0/1, changed state to down
Feb 27 07:23:54.039: %SYS-5-RESTART: System restarted —
Cisco IOS Software, 2800 Software (C2800NM-ADVENTERPRISEK9_IVS-M), Version 12.4(
9)T, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techs
Router>upport
Copyright (c) 1986-2006 by Cisco Systems, Inc.
Compiled Fri 16-Jun-06 22:22 by prod_rel_team
Feb 27 07:23:54.043: %SNMP-5-COLDSTART: SNMP agent on host Router is undergoing
a cold start
Feb 27 07:23:54.435: %CRYPTO-6-ISAKMP_ON_OFF: ISAKMP is OFF
Feb 27 07:23:54.439: %CRYPTO-6-ISAKMP_ON_OFF: ISAKMP is OFF
Feb 27 07:23:55.515: %LINK-5-CHANGED: Interface FastEthernet0/0, changed state t
o administratively down
Feb 27 07:23:55.515: %LINK-5-CHANGED: Interface FastEthernet0/1, changed state t
o administratively down
Router>en //进入特权模式
Router#copy start
Router#copy startup-config run //将启动配置载入
Destination filename [running-config]?

000026: Feb 27 07:24:45.403: %LINEPROTO-5-UPDOWN: Line protocol on Interface NVI
0, changed state to up
2629 bytes copied in 12.060 secs (218 bytes/sec)
yxrout#conf t //配置模式
Enter configuration commands, one per line. End with CNTL/Z.
yxrout(config)#ena sec cisco //修改enable密码
yxrout(config)#config-re
yxrout(config)#config-register 0x2102 //修改启动模式为正常
yxrout(config)#^Z
yxrout#
000027: Feb 27 07:26:01.687: %SYS-5-CONFIG_I: Configured from console by console
copy run start
Destination filename [startup-config]?
Building configuration…
[OK]
yxrout#sh run
Building configuration…

Current configuration : 2633 bytes
!
! Last configuration change at 07:26:01 UTC Mon Feb 27 2012
! NVRAM config last updated at 07:26:15 UTC Mon Feb 27 2012
!
version 12.4
service config
service timestamps debug datetime msec
service timestamps log datetime msec
service password-encryption
service sequence-numbers
!
hostname yxrout
!
boot-start-marker
boot-end-marker
!
logging buffered 4096 debugging
enable secret 5 $1$YZa2$3Tte1usU4LR79ihJ.Myw2.
!
aaa new-model
!
!
aaa authentication login default local
aaa authorization exec default local
!
aaa session-id common
!
resource policy
!
!
!
ip cef
!
!
ip domain name yxjt.com
ip ssh version 2
!
!
!
voice-card 0
no dspfarm
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
username hyjk privilege 15 secret 5 $1$3xLL$f7KfRQdvXYpTcdn2Zycb6/
username test@cisco.com password 7 020E1D5100545F711A400C0D44
!
!
!
!
!
!
!
interface FastEthernet0/0
description $FW_OUTSIDE$
bandwidth 10000000
ip address 60.6.228.103 255.255.255.128
ip nat outside
ip virtual-reassembly
shutdown
duplex auto
speed auto
!
interface FastEthernet0/1
description $FW_INSIDE$
ip address 192.168.1.254 255.255.255.0
ip nat inside
ip virtual-reassembly
rate-limit output access-group 121 2000000 1000000 1000000 conform-action trans
mit exceed-action drop
rate-limit output access-group 122 2000000 1000000 1000000 conform-action trans
mit exceed-action drop
shutdown
duplex auto
speed auto
!
ip local pool l2tp 10.1.1.100 10.1.1.150
ip route 0.0.0.0 0.0.0.0 60.6.228.126
ip route 192.168.0.0 255.255.255.0 192.168.1.8
ip route 192.168.2.0 255.255.255.0 192.168.1.8
!
!
ip http server
no ip http secure-server
ip nat inside source list 1 interface FastEthernet0/0 overload
ip nat inside source static tcp 192.168.1.10 110 interface FastEthernet0/0 110
ip nat inside source static tcp 192.168.1.10 25 interface FastEthernet0/0 25
ip nat inside source static tcp 192.168.1.10 21 interface FastEthernet0/0 21
ip nat inside source static tcp 192.168.1.10 80 60.6.228.103 80 extendable
ip nat inside source static udp 192.168.1.10 80 60.6.228.103 80 extendable
!
access-list 1 remark SDM_ACL Category=2
access-list 1 permit 192.168.1.0 0.0.0.255
access-list 1 permit 192.168.0.0 0.0.0.255
access-list 1 permit 192.168.2.0 0.0.0.255
access-list 120 permit ip 192.168.2.0 0.0.0.255 any
access-list 121 permit ip any 192.168.1.0 0.0.0.255
access-list 122 permit ip any 192.168.0.0 0.0.0.255
priority-list 1 protocol ip high list 120
priority-list 1 queue-limit 40 30 20 10
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
!
gatekeeper
shutdown
!
!
line con 0
line aux 0
line vty 0 4
password 7 011B1F0E5005031B
!
scheduler allocate 20000 1000
!
end

yxrout# conf t
Enter configuration commands, one per line. End with CNTL/Z.

yxrout(config)#username hyjk privilege 15 secret cisco //修改用户的密码
yxrout(config)#exit
yxrout#co
000028: Feb 27 07:29:20.215: %SYS-5-CONFIG_I: Configured from console by console
py run start
Destination filename [startup-config]?
Building configuration…
[OK]
yxrout#reload //重新启动
Proceed with reload? [confirm]

000029: Feb 27 07:29:44.391: %SYS-5-RELOAD: Reload requested by console. Reload
Reason: Reload Command.

System Bootstrap, Version 12.4(13r)T, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 2006 by cisco Systems, Inc.

Initializing memory for ECC
.
c2811 platform with 262144 Kbytes of main memory
Main memory is configured to 64 bit mode with ECC enabled

Upgrade ROMMON initialized
program load complete, entry point: 0x8000f000, size: 0xcb80
program load complete, entry point: 0x8000f000, size: 0xcb80

program load complete, entry point: 0x8000f000, size: 0x2671aa0
Self decompressing the image : #################################################
################################################################################
################################################################################
################################################################################
################################################################################
########################################################################### [OK]

Smart Init is enabled
smart init is sizing iomem
ID MEMORY_REQ TYPE
0003E7 0X003DA000 C2811 Mainboard
0X00263F50 Onboard VPN
0X000021B8 Onboard USB
0X002C29F0 public buffer pools
0X00211000 public particle pools
TOTAL: 0X00B13AF8

If any of the above Memory Requirements are
“UNKNOWN”, you may be using an unsupported
configuration or there is a software problem and
system operation may be compromised.
Rounded IOMEM up to: 12Mb.
Using 4 percent iomem. [12Mb/256Mb]

Restricted Rights Legend

Use, duplication, or disclosure by the Government is
subject to restrictions as set forth in subparagraph
(c) of the Commercial Computer Software – Restricted
Rights clause at FAR sec. 52.227-19 and subparagraph
(c) (1) (ii) of the Rights in Technical Data and Computer
Software clause at DFARS sec. 252.227-7013.

cisco Systems, Inc.
170 West Tasman Drive
San Jose, California 95134-1706

Cisco IOS Software, 2800 Software (C2800NM-ADVENTERPRISEK9_IVS-M), Version 12.4(
9)T, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2006 by Cisco Systems, Inc.
Compiled Fri 16-Jun-06 22:22 by prod_rel_team
Image text-base: 0x400B100C, data-base: 0x437A0000

This product contains cryptographic features and is subject to United
States and local country laws governing import, export, transfer and
use. Delivery of Cisco cryptographic products does not imply
third-party authority to import, export, distribute or use encryption.
Importers, exporters, distributors and users are responsible for
compliance with U.S. and local country laws. By using this product you
agree to comply with applicable laws and regulations. If you are unable
to comply with U.S. and local laws, return this product immediately.

A summary of U.S. laws governing Cisco cryptographic products may be found at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html

If you require further assistance please contact us by sending email to
export@cisco.com.

Installed image archive
Cisco 2811 (revision 49.46) with 249856K/12288K bytes of memory.
Processor board ID FHK1105F29B
2 FastEthernet interfaces
1 Virtual Private Network (VPN) Module
DRAM configuration is 64 bits wide with parity enabled.
239K bytes of non-volatile configuration memory.
62720K bytes of ATA CompactFlash (Read/Write)

%Error opening tftp://255.255.255.255/network-confg (Timed out)
%Error opening tftp://255.255.255.255/cisconet.cfg (Timed out)
%Error opening tftp://255.255.255.255/yxrout-confg (Timed out)
%Error opening tftp://255.255.255.255/network-confg (Timed out)
%Error opening tftp://255.255.255.255/yxrout.cfg (Timed out)

Press RETURN to get started!

Feb 27 07:31:22.635: %VPN_HW-6-INFO_LOC: Crypto engine: onboard 0 State changed
to: Initialized
Feb 27 07:31:22.639: %VPN_HW-6-INFO_LOC: Crypto engine: onboard 0 State changed
to: Enabled
Feb 27 07:31:24.187: %LINEPROTO-5-UPDOWN: Line protocol on Interface VoIP-Null0,
changed state to up
Feb 27 07:31:24.187: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to
up
Feb 27 07:31:24.187: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to
up
Feb 27 07:31:24.187: %LINEPROTO-5-UPDOWN: Line protocol on Interface IPv6-mpls,
changed state to up
Feb 27 07:31:25.187: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEtherne
t0/0, changed state to down
Feb 27 07:31:25.187: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEtherne
t0/1, changed state to down
000020: Feb 27 07:31:27.251: %LINEPROTO-5-UPDOWN: Line protocol on Interface NVI
0, changed state to up
000021: Feb 27 07:31:38.223: %SYS-5-CONFIG_I: Configured from memory by console
000022: Feb 27 07:31:39.923: %LINK-5-CHANGED: Interface FastEthernet0/0, changed
state to administratively down
000023: Feb 27 07:31:39.991: %LINK-5-CHANGED: Interface FastEthernet0/1, changed
state to administratively down
000024: Feb 27 07:32:19.699: %SYS-4-CONFIG_RESOLVE_FAILURE: System config parse
from (tftp://255.255.255.255/network-confg) failed
000025: Feb 27 07:33:00.699: %SYS-4-CONFIG_RESOLVE_FAILURE: System config parse
from (tftp://255.255.255.255/cisconet.cfg) failed
000026: Feb 27 07:33:41.699: %SYS-4-CONFIG_RESOLVE_FAILURE: System config parse
from (tftp://255.255.255.255/yxrout-confg) failed
000027: Feb 27 07:34:11.699: %SYS-4-CONFIG_RESOLVE_FAILURE: System config parse
000027: Feb 27 07:34:11.699: %SYS-4-CONFIG_RESOLVE_FAILURE: System config parse
000028: Feb 27 07:34:22.699: %SYS-4-CONFIG_RESOLVE_FAILURE: System config parse
from (tftp://255.255.255.255/yxrout.cfg) failed
000029: Feb 27 07:34:22.699: %SYS-5-RESTART: System restarted —
Cisco IOS Software, 2800 Software (C2800NM-ADVENTERPRISEK9_IVS-M), Version 12.4(
9)T, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2006 by Cisco Systems, Inc.
Compiled Fri 16-Jun-06 22:22 by prod_rel_team
000030: Feb 27 07:34:22.707: %SNMP-5-COLDSTART: SNMP agent on host yxrout is und
ergoing a cold start
000031: Feb 27 07:34:22.919: %SYS-6-BOOTTIME: Time taken to reboot after reload
= 277 seconds
000032: Feb 27 07:34:23.103: %CRYPTO-6-ISAKMP_ON_OFF: ISAKMP is OFF
000033: Feb 27 07:34:23.103: %CRYPTO-6-ISAKMP_ON_OFF: ISAKMP is OFF

User Access Verification

Username: hyjk
Password:

yxrout> //破解成功
[/cc]

发表在 网络知识 | 恢复2800 路由器密码实例已关闭评论

恢复cisco4503交换机的密码

公司的4503交换机修好后可以正常启动,但没有密码。查阅cisco的官方文档后对4503进行了密码重置。整个操作过程如下:

继续阅读

发表在 网络知识 | 恢复cisco4503交换机的密码已关闭评论

实现无变量前缀属性对象或控件的画面模板

摘要?画面模板是使用WINCC组态画面是的常用工具。现实工作中经常遇到许多设备需要显示相同参数的情况。。画面模板实现方式有许多种种:用户自定义对象、画面原型、使用变量前缀的画面窗口、使用动态向导的画面窗口等。本文主要针对使用变量前最的画面窗口,讨论无变量前缀的对象和控件的画面模板实现方法。

关键词?画面模板,Wincc,前缀

Key Words??Picture template, Wincc, Prefix

?

?

目录

一.?????????画面模板实现方法

二.?????????几种实现方法的优缺点

三.?????????无变量前缀对象和控件的实现方法

四.?????????运行效果

 

一 画面模板实现方法

在实际的工业现场及应用中,经常会遇到多个设备需要显示相同参数(组)的情况,比如现场有许多个电机,每个电机需要显示和控制的参数(组)都相同,只是不同电机的参数数值不同。采用画面模板的方式,能够避免多次重复组态相同的画面,减少组态人员的工作量,又能避免日后项目维护时期的大量工作,提高系统的可维护性。

画面模板实现方法主要有以下种:

1?用户自定义对象

用户自定义对象是由多个WINCC对象组合而成的。只需选择用户需要的对象,生成新的对象,同时用户可以选择需要的属性作为对象的自定义属性。

2?画面原型

画面原型是建立在用户自定义对象的基础之上,使用结构变量和动态向导的方法建立画面模板。首先做好自定义对象的模板,利用动态向导下的“Add dynamics to the prototype”在输入输出值属性里连接结构变量,将这个模板复制多份,分别创建标准动态下的“Link a prototype to a??structure or rename an existing link”,在创建的过程中,可以选择和原型结构类型相同的其他前缀。

3?使用变量前缀的画面窗口

画面窗口功能灵活、内容丰富,在WINCC中使用广泛,非常适合最为画面模板使用。通常做法是,首先组态一个画面模板,画面中的对象不是与变量相连,而是与结构元素相连(如Motor.Current,则连接名为Current),然后在主画面中组态画面窗口对象,画面名称选择模板画面,变量前缀可以定义或者动态定义为相应的结构变量前缀

4?利用动态向导实现

先在模板画面中组太好要用到的对象(不用连接变量),画面做好后保存,如module.pdl.然后点击该模板画面背景,创建画面模板的动态向导,双击动态向导Picture modules下的Picture Module template-V1.14,出现对话框要求连接画面中的对象与结构变量元素的链接,动态向导创建完成后会生成一个新的模板画面@TYPE_module.pdl,这个画面模板上方有个蓝色的输入输出域,它可以连接Wincc中任意一个字符串型的变量,修改这个字符串的值为摸个变量前缀,则画面窗口中元素名前会自动加载这个前缀名,从而显示结构变量。

二 几种实现方法的优缺点

用户自定义对象和画面原型两种种方法主要用于一些对象集合需要多次使用,连接多套参数的情况,但是不能使用脚本,动态对话框等。

利用变量前缀,可以将结构元素关联到画面中对象的属性里,也能关联到对象的事件,包括脚本动作和直接连接。

利用动态向导生成的模板,只能将结构元素关联到画面中对象的属性里,不能关联对象的事件。

三 无变量前缀对象和控件的实现方法

使用画面窗口,在指定画面窗口的“变量前缀”属性后,画面中出现的所有变量都会自动添加前缀。前缀可以自由定义,单必须与结构变量的名称相匹配,必须以句点结尾,如“Motor.”。改变变量前缀只有在在再次装载画面时才起作用。使用名称“TagPrefix”,可以是变量前缀属性动态化,非常容易显示画面模板。一般的对象都支持TagPrefix属性,控件只有“Wincc Fauge Control(量表控件)”和“Wincc Slider Control(滚动条控件)”提供“TagPrefix”属性。

对于支持“TagPrefix”属性的对象或控件,只需关联到结构元素上,然后在画面窗口属性中设置“TagPrefix”内容即可。

对于没有提供“TagPrefix”属性的对象或控件,如果像支持“TagPrefix”属性的对象一样使用,只需获得变量前缀即可。

下面以趋势图控件为例说明

1?创建结构变量

在项目中创建一个名为Motor的结构类型,如图1,

然后创建两个结构实例Motor_1,Motor_2,如图2,WINCC自动创建结构变量

2?建立变量归档

将建立的变量添加入变量归档中,名称为:“ProcessValueArchive”

3?组态画面

新建画面,并保存为Motor.pdl

添加所需的对象如输入输出域,静态文本,量表控件,滚动条控件,趋势图控件等。如图3.

趋势图控件中,因为趋势图控件不支持“TagPrefix”属性,属性中的“TagName”无法和变量前缀一起组成结构变量,因此是无法显示归档数值的。

处理方法是在控件属性“TagName”中添加一个C动作,关联所需的结构变量,如图4.

代码如下:
[cc]
// syntax: #define PicNameInAction “PictureName”

// next PicID : 1

// WINCC:PICNAME_SECTION_END

/****************设置变量名***********************/

#define Current_Tag “Current”???//设置变量名电流

#define Voltage_Tag “Voltage”//设置变量名电压

#define Speed_Tag “Speed”//设置变量名速度

 

 

/****************分配完整变量名存储区域********/

static char??Current_Trend_Tag[120];?//设置电流变量名存储区域

static char??Voltage_Trend_Tag[120];//设置电压变量名存储区域

static char Speed_Trend_Tag[120];//设置速度变量名存储区域

 

/**************************设置索引***********************/

static long int Index_Trend = 0;

 

/************************获取完整归档变量名***************/

//获取电流完整归档变量名

sprintf( Current_Trend_Tag,”ProcessValueArchive%s”Current_Tag,GetTagPrefix(GetParentPicture(lpszPictureName), GetParentPictureWindow(lpszPictureName)));

//获取电压完整归档变量名

sprintf( Voltage_Trend_Tag,”ProcessValueArchive%s”Voltage_Tag,GetTagPrefix(GetParentPicture(lpszPictureName), GetParentPictureWindow(lpszPictureName)));

//获取速度完整归档变量名

sprintf( Speed_Trend_Tag,”ProcessValueArchive%s”Speed_Tag,GetTagPrefix(GetParentPicture(lpszPictureName), GetParentPictureWindow(lpszPictureName)));

/************连接多个归档变量*****************/

SetIndex(lpszPictureName, “控件3”, Index_Trend);//设置索引

if (Index_Trend == 0){

Index_Trend++;//索引递增

return Current_Trend_Tag;

}

if (Index_Trend == 1){

Index_Trend++;//索引递增

return Voltage_Trend_Tag;

}

if (Index_Trend == 2){

Index_Trend = 0;//索引递增

return Speed_Trend_Tag;

}

}
[/cc]
代码中
[cc]
sprintf( Voltage_Trend_Tag,”ProcessValueArchive%s”Voltage_Tag,GetTagPrefix(GetParentPicture(lpszPictureName), GetParentPictureWindow(lpszPictureName)));
[/cc]
为关键部分,首先使用GetParentPicture函数获得当前图片的名称,也就是画面窗口所在图片的名称,然后使用GetParentPictureWindow获得当前画面窗口的名称,再使用GetTagPrefix获得当前画面窗口的变量前缀属性,最后使用sprintf函数建立归档数据。其中,”ProcessValueArchive%s”Voltage_Tag,ProcessValueArchive为归档名称,s代表的是前缀,Voltage_Tag代表的是结构元素名称,如:ProcessValueArchiveMotor_1.Voltage.

2010年05月28日 - xuanjidaoren_2098 - 玄极道人

1

2010年05月28日 - xuanjidaoren_2098 - 玄极道人

2

?

?2010年05月28日 - xuanjidaoren_2098 - 玄极道人

?

3

2010年05月28日 - xuanjidaoren_2098 - 玄极道人

4

同时,文中还实现了对连接多个归档变量。这里不再叙述。

四.????运行效果

运行效果如图5所示。

2010年05月28日 - xuanjidaoren_2098 - 玄极道人

 

图5

运行效果分析:

从图5可以看出,无论是从支持变量前缀的对象和控件,还是不支持变量前缀的对象和控件,都很好的达到了预期效果。

参考:

1?《深入浅出WINCC》

2?《WINCC中的画面模板》

3?《如何使用结构变量组态画面模板》文档编号:A0443

发表在 网络知识 | 实现无变量前缀属性对象或控件的画面模板已关闭评论

三菱FX系列PLC与三菱变频器通讯应用实例

对象:
① 三菱PLC:FX2N + FX2N-485-BD
② 三菱变频器:A500系列、E500系列、F500系列、F700系列、S500系列
两者之间通过网线连接(网线的RJ45插头和变频器的PU插座接),使用两对导线连接,即将变频器的SDA与PLC通讯板(FX2N-485-BD)的RDA接,变频器的SDB与PLC通讯板(FX2N-485-BD)的RDB接,变频器的RDA与PLC通讯板(FX2N-485-BD)的SDA接,变频器的RDB与PLC通讯板(FX2N-485-BD)的SDB接,变频器的SG与PLC通讯板(FX2N-485-BD)的SG接。
A500、F500、F700系列变频器PU端口:
点击浏览下一页
E500、S500系列变频器PU端口:
点击浏览下一页 继续阅读

发表在 网络知识 | 三菱FX系列PLC与三菱变频器通讯应用实例已关闭评论

代码高亮插件

[cc]code[/cc]

支持的语言:

abap, actionscript, actionscript3, ada, apache, applescript, apt_sources, asm, asp, autoit, avisynth, bash, basic4gl, bf, bibtex, blitzbasic, bnf, boo, c, c_mac, caddcl, cadlisp, cfdg, cfm, cil, cmake, cobol, cpp-qt, cpp, csharp, css, d, dcs, delphi, diff, div, dos, dot, eiffel, email, erlang, fo, fortran, freebasic, genero, gettext, glsl, gml, gnuplot, groovy, haskell, hq9plus, html4strict, idl, ini, inno, intercal, io, java, java5, javascript, kixtart, klonec, klonecpp, latex, lisp, locobasic, lolcode, lotusformulas, lotusscript, lscript, lsl2, lua, m68k, make, matlab, mirc, modula3, mpasm, mxml, mysql, nsis, oberon2, objc, ocaml-brief, ocaml, oobas, oracle11, oracle8, pascal, per, perl, php-brief, php, pic16, pixelbender, plsql, povray, powershell, progress, prolog, properties, providex, python, qbasic, rails, rebol, reg, robots, ruby, sas, scala, scheme, scilab, sdlbasic, smalltalk, smarty, sql, tcl, teraterm, text, thinbasic, tsql, typoscript, vb, vbnet, verilog, vhdl, vim, visualfoxpro, visualprolog, whitespace, whois, winbatch, xml, xorg_conf, xpp, yaml, z80.

官方连接

http://kpumuk.info/projects/wordpress-plugins/codecolorer/

发表在 网络知识 | 代码高亮插件已关闭评论

思科学习好软件

思科开发的针对思科产品的模拟器软件,可以做CCNA的实验,图形化界面,可以看到设备的样子,可以和真实的设备一样进行配置,拓扑清晰,还能够跟踪数据包,查看数据包内容。

简介:

Packet Tracer 是由Cisco公司发布的一个辅助学习工具,为学习思科网络课程的初学者去设计、配置、排除网络故障提供了网络模拟环境。用户可以在软件的图形用户界面上直接使用拖曳方法建立网络拓扑,并可提供数据包在网络中行进的详细处理过程,观察网络实时运行情况。可以学习IOS的配置、锻炼故障排查能力。软件还附带4个学期的多个已经建立好的演示环境、任务挑战,目前最新的版本是 Packet Tracer 5.5。它支持VPN,AAA认证等高级配置。
PacketTracer5.3版的汉化文件,复制到语言目录就可以了

chinese.zip

发表在 网络知识 | 思科学习好软件已关闭评论

强制关闭程序进程

系统中运行的程序,都会有一个与之对应的进程。木马、病毒同样如此。一些用户在“任务管理器”的“标程”标签中经常会发现一些来历不明的进程,因此毫不犹豫的就将它们中止。但是在中止的时候却出现了问题,无法关闭这些正在运行的进程!这该怎么办呢?看看我们是如何强制关闭这些进程的吧!

继续阅读

发表在 网络知识 | 强制关闭程序进程已关闭评论

AB PLC500的串口编程电缆

 

CP3串口电缆的制作方法。有些人说只需要2、3、5就可以,没有试过。

发表在 网络知识 | AB PLC500的串口编程电缆已关闭评论