当前位置:网站首页>SMART S7-200 PLC通道自由映射功能块(DO_Map)
SMART S7-200 PLC通道自由映射功能块(DO_Map)
2022-07-25 22:13:00 【RXXW_Dor】
有时我们希望设备的输出点可以自由映射,方便现场修改,异或是现场接线错误,我们不希望修改程序,只需要修改参数即可改变通道号,这篇博文给出算法供大家借鉴。限于本人能力和水平,文中难免出现错误和不足之处,诚恳的欢迎大家批评指正,同时感谢大家关注和订阅。
1、输出通道自由映射

3、输出通道自由映射

3、映射DO_Map_byte

4、STL代码
SUBROUTINE_BLOCK DO_Map_byte:SBR1
TITLE=输出地址映射
VAR_INPUT
byAddress:WORD; // 输出偏移地址
bRun:BOOL; // 输入
END_VAR
VAR_IN_OUT
byDout:BYTE;
END_VAR
BEGIN
Network 1
LDW= LW0, 0
LPS
A L2.0
ORB 1, LB3
LPP
AN L2.0
ANDB 16#FE, LB3
Network 2
LDW= LW0, 1
LPS
A L2.0
ORB 2, LB3
LPP
AN L2.0
ANDB 边栏推荐
- Mouseevent event -- mouse coordinate description -- Focus event -- input event -- throttle -- mousewheel (wheel event)
- Wechat card issuing applet source code - automatic card issuing applet source code - with flow main function
- 如何将一个域名解析到多个IP地址?
- JSP nine built-in objects
- 启牛商学院和微淼商学院哪个靠谱?老师推荐的开户安全吗?
- internship:普通常用的工具类编写
- JSP初识
- 开户就可以购买收益在百分之六以上的理财产品了吗
- VIM usage record
- 动画曲线天天用,你能自己整一个吗?看完这篇你就会了!
猜你喜欢
![[Fantan] how to design a test platform?](/img/54/5aca54c0e66f8a7c1c3215b8f06613.png)
[Fantan] how to design a test platform?

H5 lucky scratch lottery free official account + direct operation

访问者模式(visitor)模式

Application of breakthrough thinking in testing work

『Skywalking』. Net core fast access distributed link tracking platform

Children's programming electronic society graphical programming level examination scratch level 1 real problem analysis (judgment question) June 2022

Square root of X

JMeter websocket接口测试

Playwright tutorial (I) suitable for Xiaobai

Imitation Tiktok homepage interface
随机推荐
MySQL - subquery - column subquery (multi row subquery)
Leetcode 106. 从中序与后序遍历序列构造二叉树
如何实现一个App应用程序,限制用户时间使用?
Victoriametrics single node of kubernetes
在进行自动化测试,遇到验证码的问题,怎么办?
[assembly language 01] basic knowledge
ZigBee development board (nxpzigbee Development)
What is redis? Briefly describe its advantages and disadvantages
C language left value and right value description [easy to understand]
Jmeter--- set proxy recording request
五种分配方式是否会产生内部碎片、外部碎片
How to quickly build a picture server [easy to understand]
【汇编语言01】基础知识
Synchronized and volatile
Imitation Tiktok homepage interface
After 2 years of functional testing, I feel like I can't do anything. Where should I go in 2022?
mysql: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No suc
jenkins+SVN配置
Collation of SQL statement exercises
The file cannot be saved (what if the folder is damaged and cannot be read)