New in Step7

Johny5

Member
Join Date
Sep 2008
Location
Toronto
Posts
15
Hi, there.
I've just started with Step7.

I'm monitoring a project. In a FC I have unconditional calls of several FCs. When I'm online the “true” lines are green. I wonder, why some of the FCs are green and some are not, when lines to the EN of FCs are green. Thanks.
 
If the block is being called but the block is not green then the ENO output from the block call is false. Who wrote the FC's that are being called ?
 
Yes, when the block is not green ENO is false. But why is not green, when EN is true? Same FC in the next network is green.

The entire project was delivered by an external contractor together with the production line.
 
Last edited:
You need to look in the FC to see why the ENO is false. The ENO Bit reflects the result of the logic chain in the FC.

You can directly influence the ENO state by using the SAVE command, but if this is in a system which has previously been working then the real solution is to find out what's wrong in the logic.
 
I can't see any reference to EN/ENO in the called FC.

I thought
if EN=1, ENO=1
if EN=0, ENO=0.

But in my project for same FC
Network X: EN=1, ENO=0
Network X+1: EN=1, ENO=1.
 
The ENO output from a block is called the block result BR, here's the help from Simatic manager. Depending on the processing it can be true for one call of an FC, but false for another call to the FC - it all depends on the parameters passed and the processing performed in the FC.

BR Binary Result Bit (Status Word, Bit 8)
The BR bit is bit 8 of the status word.
The BR bit transfers the results obtained from processing Statement List (STL) instructions on to the next instructions to be processed.
When writing a function block or function in STL that you want to call from LAD/FBD, you have to store the result of the logic operation (RLO) in the BR bit immediately before leaving the block in order to provide the enable output (ENO) for the LAD/FBD box. You do this using the SAVE, JCB, JNB instructions.
When you call a system function block (SFB) or a system function (SFC) in your program, the SFB or SFC indicates whether the CPU was able to execute the function with or without errors by providing the following information in the binary result bit:
· If an error occurred during execution, the BR bit is ‘’0”.
· If the function was executed with no error, the BR bit is ‘’1”.
 
You can't see the state of the ENO directly

here's an example of how it works

Code:
A M1.0
A M1.1
= M2.0
SAVE	//Transfer the result of the logic operation to the ENO

If the result of the two "AND" operations is TRUE then the ENO will be TRUE and vice versa

If you don't want to (or need to) do any error checking in your block, then you can force the ENO to be TRUE with the following instructions at the end of the block:

Code:
SET	 //force the RLO to TRUE
SAVE	//and transfer it to the ENO

However, in your case the programmer probably had a good reason to use the ENO bit as an error check and you really need to find out why the logic in the block is resulting in a FALSE state.
 
Is the ENO set by the RLO of the last operation?

FC114 is called 12x. How can I monitor RLO if the data in FC114 change very fast? I can monitor only inputs and outputs, EN and ENO of FC114 in the FC the FC114 is called from. And there I see some ENOs are true and some are faulse, eventough all EN are true.

The line is working fine. We are just geting fault message regarding the subsystem, where FC114 is involved. I'm sure the programmer did it for a purpose. And I want to know it.
 
To generate source code, open the editor and then use Options>Customize, select the sources tab and set as below.

If you open a block and then save it, the source code for that block will appear in the sources folder. Open the source code and then copy/paste the text. If it's too big, stick it in notepad and attach the notepad file to the post.

cus009.JPG
 
L D[AR2 said:
If you want to monitor a particular call of FC114, have a look at this thread where you can specify the call up path when monitoring an FC. http://www.plctalk.net/qanda/showthread.php?t=32789&highlight=call+path

I'm trying to monitor the FC but I don't have the "Monitor with Call-Up Path" option.
I also noticed, that in Call Environment of the Block the option “With Address” is not available.

L D[AR2 said:
Can you post the source code (in absolute addressing format) for FC114 ?

How can I open source code file?
 

Similar Topics

This is the first time I am working with Simatic Manager Step7 as I started my siemens journey with TIA which is pretty easy and do a lot of stuff...
Replies
3
Views
140
When you download a DB, the values get overwritten by what is in the "actual" column in offline DB. Does this happen at the start of the PLC...
Replies
6
Views
142
Hello Inside a FB, I´m trying to transfer a string from a DB to a IN_OUT var that was define as a UDT. The problem is that i can´t determine the...
Replies
4
Views
127
Hi all, I am trying to convert RSLogix 5000 program to Step7. I need to bit shift left my array of double integers for tracking the product on...
Replies
2
Views
519
I have a word in some DB which I want to load to AR1 and use as a pointer. In order to do this I need to write L DBxy.DBW xy SLD 3 LAR1 I...
Replies
3
Views
533
Back
Top Bottom