论坛专区
在线教育
 
 

LKS 安全型控制系统 指令手册

更新日期:2018-04-23 16:28   浏览次数:1629   下载次数:25
  • 文件类型:PDF文档 | 文件大小:4.96M | 加入收藏
  • 下载
  •  
    详细介绍
     本手册给出了每个算法块的全面、详细的介绍和实例,帮助您更好地理解每个块的信息,从而正确 选择和使用。
        2.1库指令使用说明..................................................................................................................5
        2.2标准库.................................................................................................................................5
        2.2.1数学运算.................................................................................................................................5
        2.2.1.1ADD(加)...................................................................................................................5
        2.2.1.2SUB(减)...................................................................................................................6
        2.2.1.3MUL(乘)..................................................................................................................7
        2.2.1.4DIV(除)....................................................................................................................7
        2.2.1.5MOD(取余).............................................................................................................8
        2.2.1.6ADD_WORD(加)......................................................................................................9
        2.2.1.7SUB_WORD(减).......................................................................................................9
        2.2.1.8MUL_WORD(乘)....................................................................................................10
        2.2.1.9DIV_WORD(除).....................................................................................................10
        2.2.1.10MOD_WORD(取余)...............................................................................................11
        2.2.1.11ADD_INT(加).........................................................................................................11
        2.2.1.12SUB_INT(减)..........................................................................................................12
        2.2.1.13MUL_INT(乘).........................................................................................................13
        2.2.1.14DIV_INT(除)...........................................................................................................13
        2.2.1.15MOD_INT(取余)....................................................................................................14
        2.2.1.16DIV_DWORD(除)...................................................................................................14
        2.2.1.17DIV_DINT(除)........................................................................................................15
        2.2.1.18DIV_REAL(除)........................................................................................................16
        2.2.1.19DIV_LREAL(除).......................................................................................................17
        2.2.1.20ABS(绝对值)..........................................................................................................18
        2.2.1.21SQRT(平方根).......................................................................................................19
        2.2.1.22LOG(常用对数).....................................................................................................20
        2.2.1.23LN(自然对数)........................................................................................................20
        2.2.1.24EXP(指数)..............................................................................................................21
        2.2.1.25SIN(正弦)...............................................................................................................22
        2.2.1.26COS(余弦)..............................................................................................................22
        2.2.1.27TAN(正切)..............................................................................................................23
        2.2.1.28ASIN(反正弦).........................................................................................................24
        2.2.1.29ACOS(反余弦).......................................................................................................24
        2.2.1.30ATAN(反正切)........................................................................................................25
        2.2.1.31EXPT(幂)................................................................................................................26
        2.2.1.32SQRT_R(单精度平方根运算)................................................................................27
        2.2.1.33LOG_R(单精度常用对数运算)..............................................................................28
        2.2.1.34LN_R(单精度自然对数运算)................................................................................29
        2.2.1.35EXP_R(单精度指数运算)......................................................................................29
        2.2.1.36ASIN_R(单精度反正弦运算).................................................................................30
        2.2.1.37ACOS_R(单精度反余弦运算)...............................................................................31
        2.2.1.38EXPT_R(单精度幂运算)........................................................................................32
        2.2.1.39SQRT_LR(双精度平方根运算)..............................................................................33
        2.2.1.40LOG_LR(双精度常用对数运算)............................................................................34
        2.2.1.41LN_LR(双精度自然对数运算)..............................................................................35
        2.2.1.42EXP_LR(双精度指数运算)....................................................................................36
        2.2.1.43ASIN_LR(双精度反正弦运算)...............................................................................37
        2.2.1.44ACOS_LR(双精度反余弦运算)..............................................................................38
        2.2.1.45EXPT_LR(双精度幂运算).......................................................................................39
        2.2.1.46MOVE(赋值)..........................................................................................................40
        2.2.2逻辑运算...............................................................................................................................41
        2.2.2.1AND(与).................................................................................................................41
        2.2.2.2OR(或)...................................................................................................................42
        2.2.2.3XOR(异或)..............................................................................................................43
        2.2.2.4NOT(非).................................................................................................................44
        2.2.2.5AND_FB(与)...........................................................................................................45
        2.2.2.6OR_FB(或).............................................................................................................46
        2.2.2.7NOT_FB(非)...........................................................................................................47
        2.2.2.8AND3(3取与)........................................................................................................48
        2.2.2.9OR3(3取或)..........................................................................................................49
        2.2.3比较运算...............................................................................................................................50
        2.2.3.1GT(大于)................................................................................................................50
        2.2.3.2LT(小于).................................................................................................................51
        2.2.3.3GE(大于等于)........................................................................................................52
        2.2.3.4LE(小于等于).........................................................................................................53
        2.2.3.5EQ(等于)................................................................................................................54
        2.2.3.6NE(不等于)............................................................................................................55
        2.2.3.7GT_DINT_FB(大于(长整型))..............................................................................56
        2.2.3.8LT_DINT_FB(小于(长整型))...............................................................................57
        2.2.3.9GE_DINT_FB(大于等于(长整型))......................................................................58
        2.2.3.10LE_DINT_FB(小于等于(长整型)).......................................................................59
        2.2.3.11EQ_DINT_FB(等于(长整型))..............................................................................60
        2.2.3.12GT_REAL_FB(大于(实型))..................................................................................61
        2.2.3.13LT_REAL_FB(小于(实型))...................................................................................62
        2.2.3.14GE_REAL_FB(大于等于(实型))..........................................................................63
        2.2.3.15LE_REAL_FB(小于等于(实型))..........................................................................64
        2.2.3.16EQ_REAL_FB(等于(实型)).................................................................................65
        2.2.4选择运算...............................................................................................................................66
        2.2.4.1SEL(二选一)...........................................................................................................66
        2.2.4.2MAX(取最大值)....................................................................................................67
        2.2.4.3MIN(取最小值).....................................................................................................68
        2.2.5移位运算...............................................................................................................................68
        2.2.5.1SHL(左移)..............................................................................................................68
        2.2.5.2SHR(右移).............................................................................................................69
        2.2.5.3ROL(循环左移)......................................................................................................70
        2.2.5.4ROR(循环右移).....................................................................................................71
        2.2.6数据类型转换.......................................................................................................................72
        2.2.6.1BYTE_TO(BYTE类型转换).....................................................................................72
        2.2.6.2WORD_TO(WORD类型转换)...............................................................................74
        2.2.6.3DWORD_TO(DWORD类型转换)..........................................................................76
        2.2.6.4SINT_TO(SINT类型转换)......................................................................................78
        2.2.6.5INT_TO(INT类型转换)..........................................................................................80
        2.2.6.6DINT_TO(DINT类型转换).....................................................................................82
        2.2.6.7REAL/LREAL_TO(REAL/LREAL类型转换)..............................................................84
        2.2.6.8TIME_TO(TIME类型转换)....................................................................................86
        2.2.6.9DATE_TO(DATE类型转换)....................................................................................88
        2.2.6.10DT_TO(DT类型转换)............................................................................................90
        2.2.6.11TOD_TO(TOD类型转换).......................................................................................92
        2.2.7沿触发器...............................................................................................................................94
        2.2.7.1R_TRIG(上升沿检测触发器)................................................................................94
        2.2.7.2F_TRIG(下降沿检测触发器).................................................................................94
        2.2.8双稳态触发器.......................................................................................................................95
        2.2.8.1SR(置位优先双稳态器)........................................................................................95
        2.2.8.2RS(复位优先双稳态器)........................................................................................96
        2.2.9计数器...................................................................................................................................98
        2.2.9.1CTD(递减计数器).................................................................................................98
        2.2.9.2CTU(递增计数器).................................................................................................99
        2.2.9.3CTUD(递增/递减计数器)...................................................................................100
        2.2.10定时器.................................................................................................................................102
        2.2.10.1TON(开延时定时器)...........................................................................................102
        2.2.10.2TONR(保持型开延时定时器).............................................................................103
        2.2.10.3TOF(关延时定时器)............................................................................................105
        2.2.10.4TP(普通定时器)..................................................................................................106
        2.2.10.5RTC(设定时间计时)............................................................................................107
        2.3基础应用库......................................................................................................................109
        2.3.1BCD转换指令.....................................................................................................................109
        2.3.1.1BCD_TO_INT(BCD码转整型)..............................................................................109
        2.3.1.2INT_TO_BCD(整型转BCD码).............................................................................110
        2.3.2位_字节操作指令...............................................................................................................110
        2.3.2.1UNPACK(位拆分指令).........................................................................................110
        2.3.2.2EXTRACT(位提取指令)........................................................................................112
        2.3.2.3PACK(位整合指令)..............................................................................................113
        2.3.2.4PUTBIT(位赋值命令)...........................................................................................114
        2.3.3数学辅助功能.....................................................................................................................115
        2.3.3.1DERIVATIVE(微分)...............................................................................................115
        2.3.3.2INTEGRAL(积分)..................................................................................................116
        2.3.3.3STATISTICS_INT(整型统计)..................................................................................118
        2.3.3.4STATISTICS_REAL(实型统计)...............................................................................119
        2.3.3.5VARIANCE(平方偏差)..........................................................................................120
        2.3.4控制器指令.........................................................................................................................121
        2.3.4.1PID(比例积分微分控制器).................................................................................121
        2.3.5信号发生器指令.................................................................................................................125
        2.3.5.1Blink(脉冲信号发生器).....................................................................................125
        2.3.5.2GEN(典型周期信号发生器)...............................................................................126
        2.3.5.3RAND(随机数发生器).........................................................................................130
        2.3.6模拟量处理指令.................................................................................................................131
        2.3.6.1RAMP_INT(整型限速).........................................................................................131
        2.3.6.2RAMP_REAL(实型限速)......................................................................................133
        2.3.6.3CHARCURVE(特征曲线)......................................................................................134
        2.3.6.4HYSTERESIS(滞后)...............................................................................................135
        2.3.6.5LIMITALARM(上下限报警)..................................................................................137
        2.3.6.6HEX_ENGIN(16进制数转换为工程量数据)......................................................139
        2.3.6.7ENGIN_HEX(工程量数据转换为16进制数据).................................................140
        2.4系统库.............................................................................................................................141
        2.4.1时间相关指令.....................................................................................................................141
        2.4.1.1GetTickCnt(获取开机计数)................................................................................141
        2.4.1.2TimeDelay(时间延时).........................................................................................142
        2.4.1.3SET_RTC(设置实时时钟).....................................................................................142
        2.4.1.4GET_RTC(读取实时时钟)....................................................................................143
        2.4.2模块信息指令.....................................................................................................................146
        2.4.2.1sysGetCPUModuleVern(获取控制器的固件版本信息).....................................146
        2.4.2.2sysGetComModuleVern(获取通信模块固件版本信息)....................................147
        2.4.2.3sysGetCheckTime(获取检验时间)......................................................................149
        2.4.2.4sysGetEthMac(获取Mac地址)..........................................................................151
        2.4.2.5sysGetBatteryAlarm(获取电池电量报警)..........................................................153
        2.4.2.6sysGetTEMP(获取主控CPU温度)......................................................................154
        2.4.2.7sysGetModel(获取模块型号).............................................................................155
        2.4.2.8sysGetModuleSN(获取模块序列号)...................................................................156
        2.4.3系统状态指令.....................................................................................................................160
        2.4.3.1sysGetRunTime(获取任务运行时间).................................................................160
        2.4.3.2sysGetKeyState(获取钥匙开关状态)..................................................................163
        2.4.3.3sysGetDPMasterState(获取DP主卡状态).........................................................164
        2.4.3.4sysGetCPULoad(获取控制器负荷).....................................................................166
        2.4.3.5sysGetRedState(获取系统冗余状态).................................................................167
        2.4.3.6sysMasterSwitchToSlave(主从切换)...................................................................169
        2.4.3.7sysGetDPSlaveState(获取DP从站诊断)............................................................170
        2.4.3.8sysGetCPUDiagInfo(获取主控模块诊断)...........................................................171
        2.4.3.9sysGetComModuleDiagInfo(获取通讯模块诊断)..............................................172
        2.4.3.10sysSetProfiOareq(安全从站Profisafe确认).......................................................175
     
    按分类浏览
    本类下载排行
    总下载排行
     

    本网站所有文档及文件资料,除特别标明本站原创外,均来自互联网及网友上传,如有涉及版权问题,请联系我们,我们将第一时间处理。
    我们保留版权,任何涉嫌侵犯本站版权的行为,本站保留追究其法律责任的权利。

    Copyright © 2018-2020 www.gkwo.net  滨州新大新机电科技有限公司 版权所有 鲁ICP备11011731号-4