永宏PLC应用指令一览表 | |||||
分类 | FUN | 助记符 | 指令功能 | ||
流程控制指令 | 00 | MC | 主控回路开始指令 | ||
01 | MCE | 主控终止指令 | |||
02 | SKP | 跳过回路的开始指令 | |||
03 | SKPE | 跳过回路的结束指令 | |||
END | 程序执行终止点(除错用) | ||||
22 | BREAK | FOR与NEXT循环的跳出指令 | |||
65 | LBL | 标记(Lable) | |||
66 | JMP | 跳跃(Jump) | |||
67 | CALL | 呼叫(Call) | |||
68 | RTS | 子程序返回 (Return From subroutine) | |||
69 | RTI | 中断返回 (Return From Interrupt) | |||
70 | FOR | 循环开始 | |||
71 | NEXT | 循环结束 | |||
单点运作指令 | 04 | DIFU | 上微分(Differential Up)指令 | ||
05 | DIFD | 下微分(Differential Down)指令 | |||
10 | TOGG | 交替开关(Toggle Switch) | |||
位移/旋转指令 | 06 | BSHF | 位位移(Bit Shift) | ||
51 | SHFL | 向左位移(Shift Left) | |||
52 | SHFR | 向右位移(Shift Right) | |||
53 | ROTL | 向左旋转(Rotate Left) | |||
54 | ROTR | 向右旋转(Rotate Right) | |||
一般计时/计数指令 | Tnnn | 一般定时器(Timer) | |||
Cnnn | 一般计数器(Counter) | ||||
07 | UDCTR | 上/下数计数器(Up/Down Counter) | |||
搬移指令 | 08 | MOV | 搬移(Move) | ||
09 | MOV/ | 倒相后搬移(Move Inverse) | |||
40 | BITRD | 位数据读取(Bit Read) | |||
41 | BITWR | 位数据写入(Bit Write) | |||
42 | BITMV | 位数据搬移(Bit Move) | |||
43 | NBMV | 位数搬移(Nibble Move) | |||
44 | BYMV | 字节搬移(Byte Move) | |||
45 | XCHG | 资料互换(Exchange) | |||
46 | Swap | 字节数据对换(Byte Swap) | |||
47 | UNIT | 位数数据结合(Nibble Unite) | |||
48 | DIST | 位数数据分配(Nibble Distribute) | |||
49 | BUNIT | 字节数据结合(Byte Unite) | |||
50 | BDIST | 字节数据分配(Byte Distribute) | |||
160 | RWFR | 读/写档案缓存器 (Read /Write File Register) | |||
161 | WR-DP | 写入数据 至 数据记忆匣 (Write Data Pack) | |||
162 | RD-DP | 由数据记忆匣读取数据 (Read Data Pack) | |||
数学运算指令 | 11 | (+) | 加法运算(Addition) | ||
12 | (-) | 减法运算(Subtraction) | |||
13 | (*) | 乘法运算(Multiplication) | |||
14 | (/) | 除法运算(Division) | |||
15 | (+1) | 递增(加1) | |||
16 | (-1) | 递减(减1) | |||
23 | DIV48 | 48位除法运算(48-Bit Division) | |||
24 | SUM | 总和计算(Sum) | |||
25 | MEAN | 取平均值(Mean) | |||
26 | SQRT | 取平方根值(Square Root) | |||
27 | NEG | 取负数(Negation) | |||
28 | ABS | 取绝对值(Absolute) | |||
29 | EXT | 缓存器正负符号扩展(Sign Extention) | |||
30 | PID | 泛用PID运算指令 | |||
31 | CRC16 | CRC16计算指令 | |||
32 | ADCNV | 4~20mA 模拟量输入读值转换指令 | |||
33 | LCNV | 线性转换指令 | |||
34 | MLC | 多段线性转换指令 | |||
200 | I→F | 整数转换浮点数 (Conversion Of Integer to Floating Point Number ) | |||
201 | F→I | 浮点数转换整数 (Conversion Of Floating Point Number to Integer) | |||
202 | FADD | 浮点数加法运算 (Floating Point Number Addition) | |||
203 | FSUB | 浮点数减法运算 (Floating Point Number Subtraction) | |||
204 | FMUL | 浮点数乘 法 运算 (Floating Point Number Multiplication) | |||
205 | FDIV | 浮点数除 法 运算 (Floating Point Number Dividion ) | |||
206 | FCMP | 浮点数比较运算 (Floating Point Number Compare) | |||
207 | FZCP | 浮点数区域比较运算 (Floating Point Number Zone Compare) | |||
208 | FSQR | 浮点数开根号运算 (Floating Point Number Square Root) | |||
209 | FSIN | 浮点数表示法取三角函数(sin)运算 (sin Trigonometric Instruction) | |||
210 | FCOS | 浮点数表示法取三角函数(cos)运算 (cos Trigonometric Instruction) | |||
211 | FTAN | 浮点数表示法取三角函数(tan)运算 (tan Trigonometric Instruction) | |||
212 | FNEG | 浮点数取负值运算 (Change Sign of the Floating Point Number) | |||
213 | FABS | 浮点数取绝对值运算 (Floating Point Number Absolute Value) | |||
214 | FLN | 浮点数自然对数运算 ( Floating Point Napierian Logarithm, logeX) | |||
215 | FEXP | 浮点数自然指数运算 (Floating Point Exponential Function, ex) | |||
216 | FLOG | 浮点数对数运算 (Floating Point Logarithm, log10x) | |||
217 | FPOW | 浮点数乘幂运算 (Floating Point Power Function, xy) | |||
218 | FASIN | 浮点数反正弦函数运算 (Floating Point ARC sine Function, sin-1) | |||
219 | FACOS | 浮点数反余弦函数运算 (Floating Point arc cosine Function,cos-1 ) | |||
220 | FAtan | 浮点数反正切函数运算 (Floating Point arc tangent Function, tan-1) | |||
比较指令 | 17 | CMP | 数值比较(Compare) | ||
37 | ZNCMP | 区域比较(Zone Compare) | |||
170 | = | 相等比较指令 | |||
171 | > | 大于比较指令 | |||
172 | < | 小于比较指令 | |||
173 | <> | 不相等比较指令 | |||
174 | >= | 大于或等于比较指令 | |||
175 | =< | 小于或等于比较指令 | |||
逻辑运算指令 | 18 | AND | 逻辑与(AND)运算 | ||
19 | OR | 逻辑或(OR)运算 | |||
35 | XOR | 逻辑异或(XOR)运算 | |||
36 | XNR | 逻辑同或(XNR)运算 | |||
数码变换指令 | 20 | →BCD | BIN→BCD变换 | ||
21 | →BIN | BCD→BIN变换 | |||
32 | ADCNV | 4~20mA 模拟量输入读值转换指令 | |||
33 | LCNV | 线性转换指令(LCNV) | |||
34 | MLC | 多段线性转换指令 (Multiple Linear Conversion) | |||
55 | B→G | 二进制码转换格雷码 | |||
56 | G→B | 格雷码转换二进制码 | |||
57 | DECOD | 解码(Decode) | |||
58 | ENCOD | 编码(Encode) | |||
59 | →7SG | 7段显示码变换 | |||
60 | →ASC | ASCII码变换 | |||
61 | →SEC | 时:分:秒→秒 | |||
62 | →HMS | 秒数→时:分:秒 | |||
63 | →HEX | ASCII码转换为十六进制值 | |||
64 | →ASCII | 十六进制值转换为ASCII码 | |||
I/O指令 | 74 | IMDIO | 实时I/O更新 (Immidiate I/O Refresh) | ||
76 | TKEY | 10进位数字按键(Decimal Key-in) | |||
77 | HKEY | 16个键多任务输入(Hex-Key Input) | |||
78 | DSW | 指拨开关输入(Digital Swich) | |||
79 | 7SGD L | 7段显示器扫描输出 (7 Segment Output with Latch) | |||
80 | MUXI | 多任务接点输入(Multiplex Input) | |||
81 | PLSO | 脉冲输出指令(Pulse Output) | |||
82 | PWM | 脉冲宽度调变(Pulse Width Modulation) | |||
83 | SPD | 速度检测(Speed Detection) | |||
84 | TDSP | FBs-7SG 显示模块应用便利指令 七段⁄米字型显示器之文、数字显示字型转换 | |||
86 | TPCTL | PID温控便利指令 ( PID Temperature Control Instruction ) | |||
139 | HSPWM | 高速脉冲宽度调变 (High Speed Pulse Width Modulation) | |||
算型计时指令 | 87 | T.01S | 积算型定时器(0.01秒) | ||
88 | T.1S | 积算型定时器(0.1秒) | |||
89 | T1S | 积算型定时器(1秒) | |||
监控计时指令 | 90 | WDT | 监控定时器(Watchdog Timer)时间设定 | ||
91 | RSWDT | 清除监控定时器 (Reset Watchdog Timer) | |||
高速计数/计时指令 | 92 | HSCTR | 硬件高速计数器当前值(CV)读取 | ||
93 | HSCTW | 硬件高速计数器CV或PV值写入 | |||
报表打印指令 | 94 | ASCWR | ASCII档案数据输出 (ASCII File W RITE) | ||
缓升/缓降指令 | 95 | RAMP | D/A输出缓升/缓降指令 | ||
98 | RAMP2 | 追踪型模 拟 输出缓升 / 缓降指令 | |||
列表指令 | 100 | R→T | 缓存器→列表搬移 (Register to Table Move) | ||
101 | T→R | 列表→缓存器搬移 (Table to Register Move) | |||
102 | T→T | 列表→列表搬移 (Table to Table Move) | |||
103 | BT_M | 整个列表搬移(Block Table Move) | |||
104 | T_SWP | 整个列表互换(Block Table Swap) | |||
105 | R- T_S | 缓存器对 列 表找寻异 同 (Register TO Table Search) | |||
106 | T- T_C | 列表对列 表 比较异同 (Table TO Table Compare) | |||
107 | T_FI L | 列表填塞(Table Fill) | |||
108 | T_SHF | 列表位移(Table Shift) | |||
109 | T_ROT | 列表旋转(Table Rotate) | |||
110 | QUEUE | 贮列(Queue) | |||
111 | STACK | 堆栈(Stack) | |||
112 | BKCMP | 区块比较(凸轮开关Drum) (Block Compare) | |||
113 | SORT | 大小排序便利指令(Sorting) | |||
114 | Z-WR | 区域写入(Zone Write) | |||
矩阵指令 | 120 | MAND | 矩阵逻辑及运算(Matrix And) | ||
121 | MOR | 矩阵逻辑或运算(Matrix Or) | |||
122 | MXOR | 矩阵逻辑互斥或运算 (Matrix Exclusive Or) | |||
123 | MXNR | 矩阵互容或运算 (Matrix Enclusive Or) | |||
124 | MINV | 矩阵倒相(Matrix Inverse) | |||
125 | MCMP | 矩阵对矩阵比较异同(Matrix Compare) | |||
126 | MBRD | 矩阵位读取(Matrix Bit Read) | |||
127 | MBWR | 矩阵位写入(Matrix Bit Write) | |||
128 | MBSHF | 矩阵位位移(Matrix Bit Shift) | |||
129 | MBROT | 矩阵位旋转(Matrix Bit Rotate) | |||
130 | MBCNT | 矩阵位状态数量计算 (Matrix Bit Status Count) | |||
NC定位控制指令 | 140 | HSPSO | 高速脉冲输出指令 | ||
141 | MPARA | NC定位参数值设定指令 | |||
142 | PSOFF | 强制停止HSPSO脉冲输出指令 | |||
143 | PSCNV | 目前脉冲值转换为显示值(mm,Deg,lnch,PS)指令 | |||
147 | MHSPO | 多轴直线补间定位输出指令 | |||
148 | MPG | 手摇轮定位控制指令 | |||
中断控制指令 | 145 | EN | 允许外界输入或外围中断作动指令 | ||
146 | DIS | 禁止外界输入或外围中断作动指令 | |||
通讯指令 | 150 | M-BUS | Modbus RTU通讯协议(主站)通讯联机便利指令 (使PLC经由Port 1,2,3或4当作Modbus RTU通 协议的主 站 ) | ||
151 | CLINK | 通讯联机便利指令 (使PLC经由Port 1,2,3或4当作永宏通 讯 协议的主 站 ) |