当前位置:网站首页>倍福TwinCAT 3 气缸动作程序编写
倍福TwinCAT 3 气缸动作程序编写
2022-06-22 03:29:00 【黄昏和星空】
倍福TwinCAT 3 气缸动作程序编写
//干涉
bStateAllow:=TRUE;
CylinderStatus.bInterferenceError:=FALSE;
FOR i:=1 TO 4 BY 1 DO
IF CylinderSignal.bInterference[i] THEN
bStateAllow:=FALSE;
CylinderStatus.bInterferenceError:=TRUE;
END_IF
END_FOR
//气缸控制
IF bStateAllow THEN
IF CylinderControl.nControl=nCylinderReset THEN
CylinderStatus.bOpen:=FALSE;
CylinderStatus.bClose:=FALSE;
ELSIF CylinderControl.nControl=nCylinderClose THEN
CylinderStatus.bOpen:=FALSE;
CylinderStatus.bClose:=TRUE;
ELSIF CylinderControl.nControl=nCylinderOpen THEN
CylinderStatus.bOpen:=TRUE;
CylinderStatus.bClose:=FALSE;
END_IF
//ELSE
//CylinderStatus.bOpen:=FALSE;
//CylinderStatus.bClose:=FALSE;
END_IF
//气缸动作延时
tonCylinderOpen(IN:=(CylinderStatus.bOpen) , PT:=tDelay , Q=> , ET=> );
tonCylinderClose(IN:=(CylinderStatus.bClose) , PT:=tDelay , Q=> , ET=> );
//气缸动作错误
IF tonCylinderOpen.Q
AND NOT CylinderSignal.bOpenSensor
AND NOT CylinderOther.bOpenShield THEN
CylinderStatus.bOpenError:=TRUE;
ELSE
CylinderStatus.bOpenError:=FALSE;
END_IF
IF tonCylinderClose.Q
AND NOT CylinderSignal.bCloseSensor
AND NOT CylinderOther.bCloseShield THEN
CylinderStatus.bCloseError:=TRUE;
ELSE
CylinderStatus.bCloseError:=FALSE;
END_IF
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//描述信息
ACT_comment();
//干涉(若有则添加)
//气缸功能块控制
FOR i:=1 TO nCylinderMaxNum BY 1 DO
cylinder[i].FB(
CylinderControl:=cylinder[i].control ,
CylinderSignal:=cylinder[i].signal ,
CylinderOther:=cylinder[i].other ,
CylinderStatus=>cylinder[i].status );
END_FOR
边栏推荐
- Operating instructions for tcp202 current probe of Tektronix oscilloscope
- 泛微 E-cology V9 信息泄露漏洞
- Fastdfs-5.0.5 installation
- std::move与std::forward右值引用研究
- If you specify it as a gateway, does it become a gateway
- 剑指 Offer 68 - II. 二叉树的最近公共祖先
- NXP imx8mp学习记录
- 华硕重装系统键盘灯失效 =>重装ATK驱动
- TX2 mirror source settings
- Fastdfs5.0.11 installation
猜你喜欢

PHP uses composer

【NVMe2.0b 8】NVMe 队列仲裁机制

php使用composer

Project management software development project management

fastdfs-5.0.5安装

我们如何解决了RealSense偏色问题?

cmd看控制台输出红桃、方块、黑桃、梅花乱码解决

When 618 attacks, how to choose between Beibei X3 and Jimi h3s? Take you all-round in-depth analysis

OAK相机如何实现同步?

Modèle stratégique
随机推荐
Summary of image classification based on pytoch: swing transformer
selenium入门级项目 - 豆豆玩竞猜
Project management software development project management
On the auto increment of int type primary key in MySQL
【NVMe2.0b 5】NVM Subsystem
3000 yuan projector comparison and evaluation, dangbei D3x beats Jimi new Z6 x
Understand virtual memory from the root
What is an SSL certificate and what are the benefits of having an SSL certificate?
76. 最小覆盖子串-滑动窗口法
【NVMe2.0b 12】NVM 容量模型
[microservices | Nacos] quickly realize the configuration center function of Nacos, and complete configuration update and version iteration
Rabbmitmq simple mode < 1 >
不规范的命名
克隆的vmware虚拟主机网卡无法启动解决办法
std::move与std::forward右值引用研究
Selenium entry level project - Doudou quiz
Why is the first program a programmer writes "Hello world!"
3de 保存到收藏夹
golang标准库time
【NVMe2.0b 11】NVMe Reset