前辈您好!!我对P297DRvbase = 20105这个程序的理解就是循环执行这个程序,也就是每次循环的是从restart开始的。然后依次输出vbase = 20-vbase = 35(当然这个参数可以改)但是我想多数出几组数据,我就在restart后加了如下几句: [color=#0000FF]VR(500)=-1[/color]restart: RESET [color=#FF0000]VR(500)=VR(500)+1 IF VR(500)>2 THEN VR(500)=0 ENDIF[/color]
node = 3 ' Profibus node address debug = TRUE 'Set TRUE to get debug messages printed to terminal db=0 ' Daughter Board slot number vbase = 50+16*VR(500) ' VRs for data transfer localtimeout = 5000 'time in msec 后面略。。
以下是我看P297DR105不太明白的地方,的多为注释: 1)Get_Config buffer 2)PROFIBUS(db,1,cd_ptr,95)' number of input words:163 PROFIBUS(db,1,cd_ptr+1,111)' number of output words:16 首先是163会不会是16啊?还有就是能不能通过修改它改变输入输出的数量呢?要可以怎么改啊? 3)send the first input (input to master) buffer: 4)' Fetch the first diagnosis buffer, initialize service bytes: 5)set wd_baud_ctrl_val 6)New GC Command: 7)EN_CHG_CFG_BUFFER 8)Set EOI in DP_Din_Buffer_State_Machine: 急盼前辈啊!!!多谢啦!!