ENO - Output

Top 

 

Out of the ENO-output of blocks comes a boolean value that will be ‘1’ if two conditions are met:

1.) At the EN-input has to be a ‘1’ or it has to be unconnected.

2.) While processing the block an error must not occur.

 

Internally the ENO-output corresponds to the BR-Bit (Binary Result). You will be able to see this if you look at the STL-display of the following network:

 

corresponds in STL:

 


A  I   1.1

// If not I 1.1


JNB _001

// Then jump to _001 and transfer



// the RLO (=0) into the BR - Bit before


L   30000

// Otherwise execute the addition


L    1000



+I



T   MW  10



UN OV

// Has an overflow (=error) occurred?


SAVE

// Save the (negated) overflow in the BR


CLR

// Set the RLO back (But why?)

_001:

A  BR

// Load the BR


=  M   2.1

// Store the BR in M 2.1

 

For the understanding of this code you should read through JNB, SAVE, CLR and BR.

 

The ENO-output is often used to make the execution of further operations dependent on the happened (and successful!) execution of an previous operation, e.g.:

 

Here the division will be executed but only if the addition has not produced an overflow.

By this it is avoided that in MW12 an absurd value is stored. In a fault scenario the marker M5.2 is set to 1 and is able to indicate the further program that an error has occured and that it has to get rid of it.

 

If you write own functions or function blocks and you want to make use of the ENO-output-functionality you will have to set the BR-bit in the called block to zero if an error occures.

 

By JNB the BR-bit will automatically be set to 1 if the jump is not executed. You will not need to set the BR-bit if no error occures.

 

See also:

EN-input