工控编程吧
标题:
西门子PROFINET IS BASE 用户编程手册 中文超清版
[打印本页]
作者:
qq263946146
时间:
2015-1-5 19:56
标题:
西门子PROFINET IS BASE 用户编程手册 中文超清版
工控编程吧 gkbc8 com
西门子PROFINET IS BASE 用户编程手册 中文超清版
文档手册目录或截图为:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
目录
前言..................................................................................................................................................3
1 IO 控制器功能快速入门...................................................................................................................15
1.1 步骤.................................................................................................................................... 15
1.2 产品功能概述...................................................................................................................... 16
2 实时模式概述..................................................................................................................................19
2.1 实时和等时实时模式........................................................................................................... 19
3 IO 控制器的 IO-Base 用户编程接口概述..........................................................................................21
3.1 IO 控制器 IO-Base 用户编程接口的典型应用..................................................................... 21
3.2 PC 内的软件架构................................................................................................................ 22
3.3 IO 控制器中 IO-Base 控制器用户程序的典型顺序.............................................................. 24
3.3.1 初始化阶段......................................................................................................................... 24
3.3.2 生产运行阶段...................................................................................................................... 25
3.3.3 完成阶段............................................................................................................................. 27
3.4 IO-Base 函数的基本数据交换............................................................................................. 28
3.5 非等时访问周期性 IO 数据 (RT).......................................................................................... 28
3.5.1 状态的周期性写入............................................................................................................... 31
3.5.2 状态的周期性读取............................................................................................................... 32
3.6 等时实时和非等时实时访问周期性 IO 数据 (IRT)................................................................ 33
3.6.1 访问 IRT 数据..................................................................................................................... 35
3.7 PROFINET IO 设备寻址..................................................................................................... 35
3.8 回调机制............................................................................................................................. 36
4 IO 控制器数据类型与函数的说明.....................................................................................................39
4.1 管理函数............................................................................................................................. 39
4.1.1 PNIO_controller_open( )(将设备注册为 IO 控制器)........................................................ 39
4.1.2 PNIO_register_cbf( )(回调函数注册).............................................................................. 41
4.1.3 PNIO_controller_close( )(取消注册)............................................................................... 43
4.2 与模式相关的函数............................................................................................................... 44
4.2.1 PNIO_set_mode( )(设置工作模式)................................................................................. 46
4.2.2 回调事件 PNIO_CBE_MODE_IND(报告自身工作模式变化)........................................... 47
4.2.3 PNIO_device_activate( )(激活/取消激活 IO 设备).......................................................... 48
4.2.4 回调事件 PNIO_CBE_DEV_ACT_CONF(将连接状态通知给 IO 设备)........................... 49
4.3 用于读取 IO 数据的函数..................................................................................................... 50
4.3.1 PNIO_data_read( )(读取输入数据)..................................................................................51
4.3.2 PNIO_output_data_read( )(读取输出数据)......................................................................54
4.3.3 PNIO_data_read_cache_refresh( )(将 IO 数据传输至读取缓存).....................................56
4.3.4 PNIO_data_read_cache( )(从读取缓存中读取 IO 数据)..................................................57
4.4 用于写入 IO 数据的函数......................................................................................................59
4.4.1 PNIO_data_write( )(写入 IO 数据)...................................................................................60
4.4.2 PNIO_data_write_cache( )(将 IO 数据写至写入缓存) .....................................................63
4.4.3 PNIO_data_write_cache_flush( )(将 IO 数据从写入缓存写至过程映像)..........................65
4.5 用于读取数据记录的接口.....................................................................................................66
4.5.1 PNIO_rec_read_req( )(发送读取数据记录作业)..............................................................67
4.5.2 回调事件 PNIO_CBE_REC_READ_CONF(指示读取数据记录作业的结果)....................69
4.6 用于写入数据记录的接口.....................................................................................................70
4.6.1 PNIO_rec_write_req( )(发送写入数据记录作业)..............................................................70
4.6.2 回调事件 PNIO_CBE_REC_WRITE_CONF(指示写入数据记录作业的结果)...................72
4.7 报警接口..............................................................................................................................73
4.7.1 回调事件 PNIO_CBE_ALARM_IND(指示报警)...............................................................73
4.8 读出组态..............................................................................................................................75
4.8.1 PNIO_ctrl_diag_req( )(触发诊断请求).............................................................................76
4.8.2 回调事件 PNIO_CBE_CTRL_DIAG_CONF(指示诊断请求的结果)..................................77
4.9 用 LED 发出指示的站..........................................................................................................78
4.9.1 回调事件 PNIO_CBE_START_LED_FLASH_IND(激活 LED 的闪烁模式)......................78
4.9.2 回调事件 PNIO_CBE_STOP_LED_FLASH_IND(禁用 LED 的闪烁模式)........................79
4.10 回调事件 PNIO_CBE_CP_STOP_REQ(指示远程下载请求)...........................................80
4.11 等时实时模式 (IRT) 接口.....................................................................................................81
4.11.1 PNIO_CP_register_cbf( )(注册回调) ...............................................................................81
4.11.2 回调事件 PNIO_CP_CBE_STARTOP_IND(开始等时实时数据处理)...............................82
4.11.3 PNIO_CP_set_opdone( )(等时实时数据处理结束)..........................................................83
4.11.4 回调事件 PNIO_CP_CBE_OPFAULT_IND(违反等时实时模式)......................................84
4.12 用于通知新总线周期开始的接口..........................................................................................85
4.12.1 回调事件 PNIO_CP_CBE_NEWCYCLE_IND(新总线周期).............................................85
4.13 PROFIenergy 编程接口.......................................................................................................86
4.13.1 PROFIenergy 编程接口概览................................................................................................86
4.13.2 PROFIenergy 函数的描述...................................................................................................88
4.13.2.1 PNIO_register_pe_cbf().......................................................................................................88
4.13.2.2 PNIO_pe_cmd_req()............................................................................................................89
4.13.2.3 回调事件 PNIO_PE_CBF(PE 作业结果).........................................................................90
4.13.3 PROFIenergy 数据类型描述................................................................................................92
4.13.3.1 PNIO_PE_CBE_PRM(回调事件参数).............................................................................92
4.13.3.2 PE_CBE_HDR(PROFIenergy 回调事件标头).................................................................94
4.13.3.3 PNIO_PE_CMD_ENUM......................................................................................................95
4.13.3.4 PNIO_PE_CMD_MODIFIER_ENUM.................................................................................. 96
4.13.3.5 PNIO_PE_REQ_PRM......................................................................................................... 98
4.13.3.6 PNIO_PE_PRM_START_PAUSE_REQ............................................................................. 98
4.13.3.7 PNIO_PE_CMD_START_PAUSE_CONF........................................................................... 99
4.13.3.8 PNIO_PE_PRM_END_PAUSE_CONF............................................................................. 100
4.13.3.9 PNIO_PE_PRM_PE_IDENTIFY_CONF............................................................................ 100
4.13.3.10 PNIO_PE_PRM_PEM_STATUS_CONF...................................................................... 101
4.13.3.11 PNIO_PE_PRM_Q_MODE_LIST_ALL_CONF............................................................. 102
4.13.3.12 PNIO_PE_PRM_Q_MODE_GET_MODE_REQ........................................................... 103
4.13.3.13 PNIO_PE_PRM_Q_MODE_GET_MODE_CONF......................................................... 103
4.13.4 组态 PROFIenergy 设备................................................................................................... 105
4.13.4.1 PROFIenergy 设备(CP 1604/CP 1616)....................................................................... 105
4.14 数据类型........................................................................................................................... 107
4.14.1 基本数据类型.................................................................................................................... 107
4.14.2 PNIO_MODE_TYPE(运行模式类型)............................................................................ 107
4.14.3 PNIO_IO_TYPE(方向类型).......................................................................................... 108
4.14.4 PNIO_ADDR(地址结构)............................................................................................... 109
4.14.5 PNIO_CBE_TYPE(回调事件类型)................................................................................ 110
4.14.6 PNIO_CBE_PRM(回调事件参数)................................................................................. 110
4.14.7 PNIO_CBF(PNIO 回调函数)........................................................................................ 111
4.14.8 ExtPar(扩展参数)......................................................................................................... 112
4.14.9 PNIO_DEV_ACT_TYPE(用于激活和取消激活 IO 设备的类型).................................... 113
4.14.10 PNIO_IOXS(IO 数据的状态)........................................................................................ 113
4.14.11 PNIO_CTRL_DIAG(诊断请求)..................................................................................... 114
4.14.12 PNIO_CTRL_DIAG_ENUM(诊断服务)......................................................................... 115
4.14.13 PNIO_CTRL_DIAG_CONFIG_SUBMODULE(子模块组态信息)................................... 116
4.14.14 PNIO_CTRL_DIAG_CONFIG_IOROUTER_PRESENT(关于 IO 路由器的诊断请求)... 118
4.14.15 PNIO_CTRL_DIAG_CONFIG_OUTPUT_SLICE_LIST(关于 IO 路由器的诊断查询)..... 119
4.14.16 PNIO_CTRL_DIAG_CONFIG_NAME_ADDR_INFO_DATA............................................. 120
4.14.17 PNIO_DATA_TYPE(IO 数据类型)................................................................................ 121
4.14.18 PNIO_COM_TYPE(传送类型)...................................................................................... 122
4.14.19 PNIO_CP_CBE_TYPE(回调事件类型)......................................................................... 123
4.14.20 PNIO_CP_CBE_PRM(回调事件参数).......................................................................... 123
4.14.21 PNIO_CP_CBF(PNIO 回调函数).................................................................................. 124
4.14.22 PNIO_CYCLE_INFO(有关当前周期的信息)................................................................. 124
4.14.23 PNIO_CTRL_DIAG_DEVICE_STATE.............................................................................. 125
5 IO 设备功能快速入门....................................................................................................................127
5.1 步骤.................................................................................................................................. 127
5.2 产品功能概述.................................................................................................................... 128
6 IO 设备的 IO-Base 用户编程接口概述...........................................................................................131
6.1 IO-Base 设备用户编程接口的典型应用............................................................................. 131
6.2 具有 PROFINET IO 的 PC 上的软件架构..........................................................................132
6.3 IO-Base 设备用户程序的典型顺序.....................................................................................134
6.3.1 初始化阶段........................................................................................................................134
6.3.2 生产运行阶段.....................................................................................................................138
6.3.3 完成阶段............................................................................................................................143
6.4 IO-Base 设备函数的基本数据交换.....................................................................................144
6.5 非等时访问周期性 IO 数据 (RT) ........................................................................................145
6.5.1 状态的周期性读取.............................................................................................................145
6.5.2 状态的周期性写入.............................................................................................................146
6.6 等时实时和非等时实时访问周期性 IO 数据 (IRT)..............................................................147
6.6.1 访问 IRT 数据....................................................................................................................149
6.7 访问非周期性数据.............................................................................................................150
6.7.1 处理数据记录作业.............................................................................................................150
6.7.2 发送报警及接收报警确认...................................................................................................150
6.8 管理诊断数据.....................................................................................................................151
6.8.1 通道诊断数据.....................................................................................................................152
6.8.2 制造商特定诊断数据..........................................................................................................153
6.9 在生产运行阶段插拔模块的注意事项.................................................................................154
6.9.1 “子模块恢复”的注意事项....................................................................................................156
6.10 回调机制............................................................................................................................156
IO 设备数据类型与函数的说明......................................................................................................161
7.1 IO 设备的管理函数............................................................................................................161
7.1.1 PNIO_device_open( )(将设备注册为 IO 设备)...............................................................161
7.1.2 PNIO_device_close( )(取消将设备注册为 IO 设备).......................................................164
7.1.3 PNIO_device_start( )(启动 IO 设备)..............................................................................165
7.1.4 PNIO_device_stop( )(停止 IO 设备)..............................................................................166
7.1.5 回调函数 PNIO_CBF_DEVICE_STOPPED( )(报告设备停止).......................................167
7.2 IO 设备组态的接口............................................................................................................167
7.2.1 PNIO_api_add( )(设置 IO 设备应用程序进程标识符)....................................................168
7.2.2 PNIO_api_remove( )(移除 IO 设备配置文件)................................................................169
7.2.3 回调函数 PNIO_CBF_PULL_PLUG_CONF( )(确认插/拔).............................................170
7.3 插拔函数............................................................................................................................171
7.3.1 PNIO_mod_plug( )(插入模块).......................................................................................172
7.3.2 PNIO_mod_pull( )(拔出模块)........................................................................................174
7.3.3 PNIO_sub_plug_ext_IM( )(扩展的插入子模块)..............................................................176
7.3.4 PNIO_sub_pull( )(拔出子模块)......................................................................................178
7.3.5 PNIO_sub_plug( )(插入子模块,不用于新开发)............................................................180
7.3.6 PNIO_sub_plug_ext( )(扩展插入子模块,不用于新开发)..............................................182
7.4 用于在 IO 设备上写入 IO 数据的接口................................................................................184
目录
7.4.1 PNIO_initiate_data_write( )(启动写入 RT 数据)............................................................ 184
7.4.2 PNIO_initiate_data_write_ext( )(触发写入选择性数据)................................................. 185
7.4.3 回调函数 PNIO_CBF_DATA_WRITE( )(写入数据)....................................................... 187
7.5 用于在 IO 设备上读取 IO 数据的接口............................................................................... 188
7.5.1 PNIO_initiate_data_read( )(启动读取 RT 数据)............................................................ 188
7.5.2 PNIO_initiate_data_read_ext( )(启动读取选择性数据)................................................. 189
7.5.3 回调函数 PNIO_CBF_DATA_READ( )(读取数据)........................................................ 191
7.6 用于在 IO 设备上读取/写入数据记录的接口...................................................................... 192
7.6.1 回调函数 PNIO_CBF_REC_READ( )(处理读取数据记录作业)..................................... 192
7.6.2 回调函数 PNIO_CBF_REC_WRITE( )(处理写入数据记录作业)................................... 193
7.7 用于在 IO 设备上管理诊断数据的接口.............................................................................. 195
7.7.1 PNIO_build_channel_properties( )(生成通道属性)....................................................... 195
7.7.2 PNIO_diag_channel_add( )(将通道诊断数据存储在子插槽中)..................................... 197
7.7.3 PNIO_diag_ext_channel_add( )(将扩展通道诊断数据存储在子插槽中)........................ 199
7.7.4 PNIO_diag_channel_remove( )(从子插槽中删除诊断数据).......................................... 201
7.7.5 PNIO_diag_ext_channel_remove( )(从子插槽中删除扩展通道诊断数据)..................... 202
7.7.6 PNIO_diag_generic_add( )(将供应商特定诊断数据存储在子插槽中)........................... 203
7.7.7 PNIO_diag_generic_remove( )(从子模块中删除供应商特定诊断数据)......................... 204
7.8 IO 设备的报警接口........................................................................................................... 206
7.8.1 PNIO_process_alarm_send( )(发送过程报警).............................................................. 206
7.8.2 PNIO_diag_alarm_send( )(发送诊断报警).................................................................... 208
7.8.3 PNIO_ret_of_sub_alarm_send( )(发送子模块返回报警)............................................... 211
7.8.4 回调函数 PNIO_CBF_REQ_DONE( )(信号报警确认)................................................... 213
7.9 用于建立和终止 IO 设备连接的接口................................................................................. 214
7.9.1 PNIO_device_ar_abort( )(强制连接中止) ..................................................................... 214
7.9.2 PNIO_set_appl_state_ready( )(数据交换就绪信号)...................................................... 215
7.9.3 回调函数 PNIO_CBF_CHECK_IND( )(信号检查指示).................................................. 217
7.9.4 回调函数 PNIO_CBF_AR_CHECK_IND( )(报告应用关系检查指示)............................. 219
7.9.5 回调函数 PNIO_CBF_AR_INFO_IND( )(报告应用关系信息)........................................ 221
7.9.6 回调函数 PNIO_CBF_AR_INDATA_IND( )(报告应用关系 InData)............................... 222
7.9.7 回调函数 PNIO_CBF_AR_ABORT_IND( )(报告中止事件) ........................................... 222
7.9.8 回调函数 PNIO_CBF_AR_OFFLINE_IND( )(报告离线事件)......................................... 223
7.9.9 回调函数 PNIO_CBF_APDU_STATUS_IND( )(报告 IO 控制器状态)........................... 224
7.9.10 回调函数 PNIO_CBF_PRM_END_IND( )(报告 IO 控制器分配参数结束)...................... 225
7.10 用 LED 发出指示的站....................................................................................................... 226
7.10.1 PNIO_CBF_START_LED_FLASH( )(激活 LED 的闪烁模式) ....................................... 226
7.10.2 PNIO_CBF_STOP_LED_FLASH( )(取消激活 LED 的闪烁模式).................................. 227
7.11 常规回调函数 PNIO_CBF_CP_STOP_REQ( )(远程下载和重新组态请求) ................... 228
7.12 等时实时模式 (IRT) 接口 .................................................................................................. 229
7.12.1 PNIO_CP_register_cbf( )(注册回调)............................................................................. 229
7.12.2 回调事件 PNIO_CP_CBE_STARTOP_IND(开始等时实时数据处理)............................ 230
7.12.3 回调事件 PNIO_CP_CBE_OPFAULT_IND(违反等时实时模式)....................................232
7.12.4 PNIO_CP_set_opdone( )(等时实时数据处理结束)........................................................232
7.13 用于通知新总线周期开始的接口........................................................................................233
7.13.1 回调事件 PNIO_CP_CBE_NEWCYCLE_IND(新总线周期)...........................................234
7.14 I&M 数据记录(标识和维护)...........................................................................................234
7.14.1 概述...................................................................................................................................234
7.14.2 I&M 写入说明....................................................................................................................236
7.14.3 I&M 读取说明....................................................................................................................237
7.15 数据类型............................................................................................................................238
7.15.1 PNIO_ANNOTATION(版本 ID 结构).............................................................................239
7.15.2 PNIO_APPL_READY_LIST_TYPE(应用程序就绪).......................................................241
7.15.3 PNIO_AR_REASON(连接中止的原因) .........................................................................243
7.15.4 PNIO_AR_TYPE(应用关系)..........................................................................................246
7.15.5 PNIO_CFB_FUNCTIONS(回调函数注册结构)..............................................................247
7.15.6 PNIO_DEV_ADDR(IO 设备地址类型)...........................................................................249
7.15.7 PNIO_APDU_STATUS_IND(IO 控制器状态)................................................................250
7.15.8 PNIO_IOCR_TYPE(应用关系)......................................................................................251
7.15.9 PNIO_IOCS_TYPE(应用关系)......................................................................................252
7.15.10 PNIO_MODULE_TYPE(应用关系)................................................................................253
7.15.11 PNIO_SUBMOD_TYPE(应用关系)...............................................................................254
7.15.12 PNIO_ACCESS_ENUM(访问类型)...............................................................................256
7.15.13 PNIO_CP_CBE_TYPE(回调事件类型)..........................................................................257
7.15.14 PNIO_CP_CBE_PRM(回调事件参数)...........................................................................257
7.15.15 PNIO_CP_CBF(常规 PNIO 回调函数)..........................................................................258
7.15.16 PNIO_CYCLE_INFO(有关当前周期的信息)..................................................................259
7.15.17 PNIO_BLOCK_HEADER...................................................................................................260
7.15.18 PNIO_IM0_TYPE(I&M0 数据记录)................................................................................261
7.15.19 PNIO_IM1_TYPE(I&M1 数据记录)................................................................................263
7.15.20 PNIO_IM2_TYPE(I&M2 数据记录)................................................................................264
7.15.21 PNIO_IM3_TYPE(I&M3 数据记录)................................................................................265
7.15.22 PNIO_IM4_TYPE(I&M4 数据记录)................................................................................266
7.15.23 PNIO_diag_alarm_send( ) 函数的“pData”参数..................................................................267
8 特定于 CP 1616/CP 1604 的函数..................................................................................................271
8.1 PNIO_CP_set_appl_watchdog( )(用户程序看门狗).......................................................272
8.2 PNIO_CP_trigger_watchdog( )(用户程序看门狗)..........................................................273
8.3 PNIO_CBF_APPL_WATCHDOG( )(用户程序看门狗)...................................................274
8.4 SERV_CP_set_type_of_station.........................................................................................275
8.5 SERV_CP_get_fw_info......................................................................................................276
8.5.1 结构 SERV_FW_VERS_TYPE 的说明..............................................................................277
8.5.2 结构 SERV_CP_FW_INFO_TYPE 的说明.........................................................................278
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
更多目录内容,请 免费 下载 观看;
说明:所有资源,解压密码一律为工控编程吧网址 gkbc8 com;
下载地址为: (为增加互动交流,回复后可免费下载)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
欢迎光临 工控编程吧 (https://www.gkbc8.com/)
Powered by Discuz! X3.4