首頁(yè) > 專家說(shuō)

西門子PLC編程 I_DI、DI_R、DIV_R、CTCH、MUL_R、ROUND什么意思

來(lái)源:新能源網(wǎng)
時(shí)間:2024-08-17 10:15:40
熱度:

西門子PLC編程 I_DI、DI_R、DIV_R、CTCH、MUL_R、ROUND什么意思【專家解說(shuō)】:I_DI,整數(shù)(INT)轉(zhuǎn)為雙整數(shù)(DINT)DI_R,雙整數(shù)(DINT)轉(zhuǎn)

【專家解說(shuō)】:I_DI,整數(shù)(INT)轉(zhuǎn)為雙整數(shù)(DINT)
DI_R,雙整數(shù)(DINT)轉(zhuǎn)為浮點(diǎn)數(shù)(實(shí)數(shù)REAL)
DIV_R,浮點(diǎn)數(shù)(REAL)除法
CTCH,未找到這條指令;
MUL_R,浮點(diǎn)數(shù)(REAL)乘法
ROUND,浮點(diǎn)數(shù)(REAL)取整為雙整數(shù)(DINT)

I,即INT,(單)整數(shù);
DI,即DINT,雙整數(shù);
R,即REAL,浮點(diǎn)數(shù);
一般有四則運(yùn)算符(加ADD、減SUB、乘MUL、除DIV)之后加“_I”,就是對(duì)整數(shù)進(jìn)行運(yùn)算;加“_DI”,就是對(duì)雙整數(shù)進(jìn)行算;加“_R”,就是對(duì)浮點(diǎn)數(shù)進(jìn)行運(yùn)算。