当前位置:网站首页>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 边栏推荐
- Ts:typera code fragment indentation display exception (resolved) -2022.7.24
- What should I do if I encounter the problem of verification code during automatic testing?
- MySQL --- 子查询 - 列子查询(多行子查询)
- 在腾讯干软件测试3年,7月无情被辞,想给划水的兄弟提个醒...
- win10搭建flutter环境踩坑日记
- 『Skywalking』.NET Core快速接入分布式链路追踪平台
- 3day
- Leetcode 106. 从中序与后序遍历序列构造二叉树
- Redis为何选择单线程?
- C语言:随机生成数+选择排序
猜你喜欢

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

All you want to know about interface testing is here

The second short contact of gamecloud 1608

jenkins+SVN配置

『Skywalking』.NET Core快速接入分布式链路追踪平台

手机端微信发朋友圈功能测试点总结

kubernetes之VictoriaMetrics单节点

聚名十年,说出你的故事,百万豪礼等你拿

QML module not found

6-18漏洞利用-后门连接
随机推荐
Recursive case -c
『SignalR』. Net using signalr for real-time communication
Leetcode 106. 从中序与后序遍历序列构造二叉树
2 lines of code to generate a solid desktop background
3. Editors (vim)
Leetcode 106. construct binary tree from middle order and post order traversal sequence
What should I do if I encounter the problem of verification code during automatic testing?
微信发卡小程序源码-自动发卡小程序源码-带流量主功能
Application of breakthrough thinking in testing work
What is partition and barrel division?
SQL basic statement DQL select and extract DML insert delete
JMeter websocket interface test
YUV420 yuv420sp image format "recommended collection"
6-18 vulnerability exploitation - backdoor connection
Redis master-slave architecture lock failure problem (master-slave)
The file cannot be saved (what if the folder is damaged and cannot be read)
Internship: writing common tool classes
After three years of software testing at Tencent, I was ruthlessly dismissed in July, trying to wake up my brother who was paddling
Why is the integer type 128 to byte -128
What is the difference between minor GC and full GC?