Industry Online Support
Technical Forum
3/9/2011 11:34 AM | |
Joined: 1/28/2009 Last visit: 5/2/2024 Posts: 6838 Rating: (1359) |
You can simulate a rack failure by triggering OB86 in PLCSIM. Insert OB86 in your program and write codes to detect which slave is missing. BR
AttachmentPROFIBUS_EV.pdf (279 Downloads) |
Last edited by: hdhosseini at: 3/9/2011 11:37 AM |
|
3/9/2011 11:47 AM | |
Joined: 1/28/2009 Last visit: 5/2/2024 Posts: 6838 Rating: (1359) |
Hi This is an example codes for OB86. The easiest way to know which DPslave is faulty is to save LB11 to a memory address like: [code]L LB11 T MB0 //slave address[/code] For all slaves in your project , create a bit to show the slave failure.When the error is comming , the bit corresponds to that slave should be set otherwise reset the bit. Using SFC51 is straight forward and give you the bit you want.check the attachment for more detail. use szl id= 16#292 and index=16#1 for this application. Check the data record for result of check. OB86: [code] CALL SFC51 "RDSYSST" REQ :=#IN0 SZL_ID :=W#16#292 INDEX :=W#16#1 RET_VAL :=#TEMP3 BUSY :=#TEMP31 SZL_HEADER:=#TEMP4 DR :=#TEMP32 JBI M004 //failure of SFC51 processing BEU M004: NOP 0 //READ CONTENT OF DATA RECORD AN #TEMP32.TEMP34 //ZERO SHOWS FAULT = DB16.DBX 4.7 //1ST SLAVE FAILING AN #TEMP32.TEMP35 = DB16.DBX 5.0 //2ND SLAVE FAILING AN #TEMP32.TEMP36 = DB16.DBX 5.1 //3RD SLAVE FAILING AN #TEMP32.TEMP37 = DB16.DBX 5.2 //4TH SLAVE FAILING[/code] best regards hdhosseini Attachmentsfc51.zip (151 Downloads) |
5/12/2011 12:38 PM | |
Posts: 32 Rating: (0) |
Thanks for valuable information! |
This contribution was helpful to1 thankful Users |
Follow us on