当前位置:网站首页>LM小型可编程控制器软件(基于CoDeSys)笔记二十三:伺服电机运行(步进电机)相对坐标转换为绝对坐标
LM小型可编程控制器软件(基于CoDeSys)笔记二十三:伺服电机运行(步进电机)相对坐标转换为绝对坐标
2022-07-07 01:39:00 【Gutie_bartholomew】
FUNCTION_BLOCK LSteppingMotor
VAR_INPUT
INPUT1: BOOL;(*工作标志*)
INPUT2: BOOL;(*工作标志*)
INPUT3: DINT;(*工作标志*)
Origin: BOOL;(*原点*)
Axis:BYTE; (*输出选择,1, QX0.0 2 QX0.3*)
Target:DINT; (*目标设定值*)
VMax:DWORD; (*最高频率y*)
ACCTime:WORD; (*加减速时间 (ms)*)
END_VAR
VAR_OUTPUT
OUT1: BOOL; (*控制方向*)
CV2: DINT; (*坐标值*)
PTO_X: BOOL;(**)
END_VAR
VAR
ADH164_PTO: ADH164_PTO;
EN_R:BOOL; (*enable bit*)
DIR_CTRL:BOOL; (*input connet with direction,don't use temporary*)
INT_EN:BOOL; (*interrupt enable bit *)
CV:DINT; (*pulse number have finished*)
Error:BYTE; (*error word*)
R_TRIG1: R_TRIG;
M1: BOOL;
TON1: TON;
Target_1: DINT;
m2: BOOL;
CV1: DINT;
PTO_X1: BOOL;
TON2: TON;
R_TRIG2: R_TRIG;
F_TRIG1: F_TRIG;
S2: BOOL;
M3: BOOL;
END_VAR
VAR RETAIN
Mode: BYTE := 1; (*motion mode*)
END_VAR
边栏推荐
- Convert numbers to string strings (to_string()) convert strings to int sharp tools stoi();
- 3428. Put apples
- The solution of a simple algebraic problem
- ST表预处理时的数组证明
- 苹果cms V10模板/MXone Pro自适应影视电影网站模板
- Database notes 04
- Storage of dental stem cells (to be continued)
- Introduction to the extension implementation of SAP Spartacus checkout process
- yarn入门(一篇就够了)
- Say sqlyog deceived me!
猜你喜欢
随机推荐
Apple CMS V10 template /mxone Pro adaptive film and television website template
Markdown 并排显示图片
开发者别错过!飞桨黑客马拉松第三期链桨赛道报名开启
外设驱动库开发笔记43:GPIO模拟SPI驱动
基于FPGA的VGA协议实现
Solve pod install error: FFI is an incompatible architecture
Ctfshow-- common posture
Laravel uses Tencent cloud cos5 full tutorial
JVM命令之- jmap:导出内存映像文件&内存使用情况
Jstat pour la commande JVM: voir les statistiques JVM
高并发大流量秒杀方案思路
JVM monitoring and diagnostic tools - command line
ML's shap: Based on the adult census income binary prediction data set (whether the predicted annual income exceeds 50K), use the shap decision diagram combined with the lightgbm model to realize the
Value range of various datetimes in SQL Server 2008
ETCD数据库源码分析——从raftNode的start函数说起
CMD permanently delete specified folders and files
牙齿干细胞的存储问题(未完待续)
当我们谈论不可变基础设施时,我们在谈论什么
可极大提升编程思想与能力的书有哪些?
Jstat of JVM command: View JVM statistics