当前位置:网站首页>倍福 PLC 字符串类型string操作
倍福 PLC 字符串类型string操作
2022-06-22 03:29:00 【黄昏和星空】
基于倍福的PLCString类型的函数功能介绍如下:
1、两个字符串的连接:CONCAT
VAR_INPUT
STR1 : STRING(255);
STR2 : STRING(255);
END_VAR
IL示例:
LD ‘SUSI’
CONCAT ‘WILLI’
ST Var1 (* Result is ‘SUSIWILLI’ *)
ST示例:
Var1 := CONCAT (‘SUSI’,‘WILLI’);
2、删除某位置连续字符:DELETE
删除第POS位置(从1开始算起)连续LEN长度后剩下的字符串作为返回值;
VAR_INPUT
STR : STRING(255);
LEN:INT;
POS:INT
END_VAR
IL:
LD ‘SUXYSI’
DELETE 2,3
ST Var1
结果是:’SUSI’
ST:
Var1 := DELETE (‘SUXYSI’,2,3);
结果是:’SUSI’
3、在字符串中查找子字符串:FIND
语法格式:FIND(STR1,STR2)
功能:在STR1中找到STR2第一次出现的位置,作为返回值返回;
VAR_INPUR
STR1: STRING(255);
STR2: STRING(255)
END_VAR
例子:
IL:<
边栏推荐
- std::move与std::forward右值引用研究
- Implementation of synchronization and atomic operation by mutex mutex in golang concurrent programming
- 指针与指针的指针
- 3de 移动物体的位置
- TX2挂载SD卡,jtop
- gdb调测使用整理
- 剑指 Offer 68 - II. 二叉树的最近公共祖先
- Atcoder beginer contest 252 (Dijkstra, reverse thinking)
- Analyzing iceberg merge tasks to resolve data conflicts
- 指定它为网关,它就成为网关了么
猜你喜欢

AtCoder Regular Contest 142

在请求目标中找到无效字符。有效字符在RFC 7230和RFC 3986中定义

Why is setinterval so easy to get stuck in the high and low level

(problem solving) missing gcr io/kubebuilder/kube-rbac-proxy:v0.8.0

多线程 interrupt用法

【NVMe2.0b 5】NVM Subsystem
![[nvme2.0b 12] NVM capacity model](/img/e5/c898cb1eeeabce757a2b07b08f9219.png)
[nvme2.0b 12] NVM capacity model

Opencv installation (x86/tx2 cuda/ shared library)

powerdesigner CDM中联系理解

Kubernetes介绍和使用
随机推荐
深度学习期末复习
[nvme2.0b 10] controller shutdown and NVM subsystem shutdown
Talk about the Flink waterline
Attributes, comments and field information of fields in MySQL query table
关于在dialog中调用edittext这个件事
TX2 mirror source settings
Fastdfs-5.0.5 installation
VIM common commands
Why is setinterval so easy to get stuck in the high and low level
Rabbmitmq publishing keyword mode < 3 >
1690. stone game vii- dynamic programming method
Summary of image classification based on pytoch: swing transformer
策略模式
克隆的vmware虚拟主机网卡无法启动解决办法
powerdesigner CDM中联系理解
gdb调测使用整理
3de从设计中恢复
FastDFS-6.0.6
618来袭,当贝X3和极米H3S怎么选?带你全方位深度解析
2022.6.21-----leetcode.1108