S7 OB86

L

Thread Starter

Lalo

The PLC lost communications with a profibus module, the ob86 was called but it didn´t have a routine programmed, so i had a robot crash.

I want to know how can i assure profibus is working fine... i know that when an error occurs ob86 is called, but what can i do? set a bit? ok if this is the case, when am i going to reset it?

I appreciate very much your help.

best regards.
 
G

Gabriele Corrieri

Hi Lalo,

in my opinion is a wrong approach to problem.

The robots (profibus slave) crashes (it couldn't, but this is another question, or a another branch of question).

Organization Block OB86 tell your plc software which error is occured and where (which rack or DP slave).

My opinion is read (in faulty condition) OB86 interface, or store-it to an DB for knowing which slave and which error is occurred.

Simultaneusly I suggest you to check profibus networks, terminations, connectors ... and last but no last cable quality and routing ... you can get a proof by routing profibus cable outside cable ducts and far away from power cables.

When profibus connection falls down, the slaves must stop, and, if is a intelligent slave and is programmed for do, it could be move in security area, it couldn't be move again and it couldn't be crashes against other objects.

Best regards.

Gabriele Corrieri
mailto:[email protected]
 
D

Dobrowolski, Jacek

Hi,

The simplest solution is to remove the OB86 from your CPU memory (and from your program also). Then after any error of Profibus the PLC goes to stop. You should only put error processing OBs into your program if you intend to
react to errors without stopping the CPU.

Regards,

Jacek Dobrowolski, Ms. Sc. E. E.
Software Engineer
 
<p>Hi,

<p>as next you see a short peace of code, how to handle the OB86 status information. Please remember, the OB86 is called two times (error comes and error goes). The example just counts an output byte up, if any station fails, in your case you should do a little bit more.
<pre>
// Fault event detected
// => incrementing fault counter
L #OB86_EV_CLASS
L B#16#39
==I
JC M001

// Fault corrected
// => BE (or alternative code in M002)
L #OB86_EV_CLASS
L B#16#38
==I
JC M002

M001: L QB 0
INC 1
T QB 0
BEU
M002: BE

// If you also want to record which station
// has failed and the type of fault, you
// must also evaluate variables
// 'OB86_MDL_ADDR' and 'OB86_Z23'.
</pre>
<p>Hope that information helps.

<p>Best regards,<br>
Konni ([email protected])
 
OB86 would not have 'caused' the slave problem. This is one of a group of error interrupts that are triggered by the S7 operating system when it has already detected some problem - in this case OB86 is associated with, according to Siemens' manual, "an I/O failure of an expansion rack, DP master system, or station for distributed I/O".

When your program code attempts to read or write an I/O address that is no longer accessible, the operating system will automatically trigger the execution of OB86. The code that you write in there is entirely up to you - what do you want the system to do under these circumstances? You can do a quick check of the TEMP variables in OB86 - each time it is triggered these will be populated with information regarding which rack or slave caused the problem. Perhaps depending on this information you might make a decision about what to do next. Alternatively, you may want to use the STOP instruction to bring the system to a complete halt regardless of the cause.

To check on Profibus status, you can download from Siemens' web-site a couple of blocks (FC125 or FB125) which you can call regularly to monitor network and slave health.

Good luck

Ken Muir
 
Top