Sunday, December 11, 2016

What is the different between BOOL and EBOOL

Today, I read document about  Schneider's PLC, I found this concept BOOL and EBOOL. What is the different between them? I read this at Schneider's web site and want to share this information
There are two types of Boolean. These are:

1) BOOL type, which contains only the value FALSE (=0) or TRUE (=1) 


2) EBOOL type, which contains the value FALSE (=0) or TRUE (=1) but also information 
concerning the management of falling or rising edges and forcing

BOOL consumes single bit whereas EBOOL consumes one byte.

Other way, We can see the explaination below

Both EBOOL and BOOL are managed by Byte. The structure of EBOOL and BOOL is as follows:

BOOL:

7
6
5
4
3
2
1
0
Current Value

EBOOL:

7
6
5
4
3
2
1
0
Forcing Bit 
Previous Value 
Current Valur

As EBOOL has forcing bit, we can force EBOOL variables but not BOOL variables.

No comments:

Post a Comment