profibus DP通讯及取发数据

一、S7 200存取DP中的数据 Network 1 //Calculate the Output data pointer //If in data exchange mode: //1. Output buffer is an offset from VB0 //2. Convert Vmem offset to double integer //3. Add to VB0 address to get output data // pointer. LDB= SMB224, 2 MOVD &VB0, VD1000 ITD SMW226, AC0 +D AC0, VD1000 Network 2 //Calculate the Input data pointer. //If in data exchange mode: //1. Copy the output data pointer //2. Get the number of output bytes //3. Add to output data pointer to get // starting input data pointer. LDB= SMB224, 2 MOVD VD1000, VD1004 BTI SMB228, AC0 ITD AC0, AC0 +D AC0, VD1004 Network 3 //Set amount of data to be copied. //If in data exchange mode: //1. Get number of output bytes to copy //2. Get number of input bytes to copy LDB= SMB224, 2 MOVB SMB228, VB1008 MOVB SMB229, VB1009 Network 4 //Transfer Master outputs to CPU //outputs. Copy CPU inputs to the //Master inputs. If in data exchange mode: //1. Copy Master outputs to CPU outputs //2. Copy CPU inputs to Master inputs LDB= SMB224, 2 BMB *VD1000, QB0, VB1008 BMB IB0, *VD1004, VB1009 In the following sample program for a DP module in position 0, the DP configuration data in the SM memory area provides the configuration of the DP slave.

The program uses the following data: SMW220 DP Module Error Status SMB224 DP Status SMB225 Master Address

SMW226 V memory offset of outputs

profibus DP通讯及取发数据相关文档

最新文档

返回顶部