当前位置:网站首页>倍福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
边栏推荐
- 3de 移动物体的位置
- FastDFS-6.0.6
- VIM common commands
- Implementation of synchronization and atomic operation by mutex mutex in golang concurrent programming
- 服装实体店如何突破销售困境
- Rabbmitmq publishing keyword mode < 3 >
- Fastdfs5.0.11 installation
- 基于51的超声波测距仪代码(截图版)
- Summary of image classification based on pytoch: swing transformer
- Vs loading symbols causes program to start slowly
猜你喜欢

多线程 interrupt用法

Project management software development project management

R data analysis: significance and practice of calibration curve and DCA curve in clinical prediction model

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

聊聊flink水位线

【NVMe2.0b 6】NVMe 队列模型

C51的一些日记

为什么在高并发下很容易就被setInterval给坑了

Why is setinterval so easy to get stuck in the high and low level
![[nvme2.0b 5] sous - système nvm](/img/4f/e60e62a04e617b2e7858494917f390.png)
[nvme2.0b 5] sous - système nvm
随机推荐
2022 low voltage electrician test question simulation test question bank and answers
逆向crackme之ESp定律脱壳
AtCoder Regular Contest 142
分析Iceberg合并任务解决数据冲突
c# 自定义排序
关于在dialog中调用edittext这个件事
Fastdfs5.0.11 installation
Policy mode
【NVMe2.0b 12】NVM 容量模型
Project management software development project management
【NVMe2.0b 5】NVM Subsystem
指定它为网关,它就成为网关了么
gdb调测使用整理
3de 保存到收藏夹
TX2 mirror source settings
3000 yuan projector comparison and evaluation, dangbei D3x beats Jimi new Z6 x
[网鼎杯 2018]Fakebook1 参考
3000元投影仪对比评测,当贝D3X完胜极米NEW Z6 X
装饰器《二》 property - 简答逻辑
告警日志中出现ORA-48132 ORA-48170