OK teckhno2002
First to know whether to program OB82 or OB122 you have to do the following.
Simulate wire break, then when SF light of the CPU is ON press Ctrl+D (PLC-->Module Information) and goto diagnostic buffer tab.Here see which OB is being called. Say OB82.
Now in simatic manager highlight OB82 and press F1.Now here you can see which bytes or bool means what. I found this in OB82 help.
B82_INT_FAULT, type:BOOL, means--> Internal fault
OB82_EXT_FAULT, type: BOOL, means--> External fault
OB82_PNT_INFO, type: BOOL, means--> Channel fault
Now open OB82
Suppose you need to switch on Hooter(Q0.0) when external fault in a module occurs.So you will write
A #OB82_EXT_FAULT
= Q0.0
Similary you have to proceed for other. You just need to Put "#" and copy paste rest of the thing from Help File.
l #OB82_MDL_TYPE
T MB 0
And then utilize bits M0.0 to M0.7 for your use.