.

Relation

Overview

Overview

The Relation block performs the specified comparison operation on two inputs. The relational comparision operations are >, >=, ==, ~=, <=, and <. The output of the block is 1 (TRUE) when the comparison is true, and it is 0 (FALSE) when the comparison is false.

The configuration values for this block are as follows:

 
op Operation Code: 0 is >, 1 is >=, 2 is ==, 3 is ~=, 4 is <=, 5 is <.
Subsample Code A code which determines the schedule for updating this block (every sample, even samples only, etc.) See Subsampling.

Matlab/Simulink

Simulink Interface

bin_img1

The Output is a 1 (TRUE) when the relation comparison is true, and the output is 0 (FALSE) when the relation comparison is false.

The op parameter determines the relational comparison:

0 > (Greater than)
1 >= (Greater than or equal to)
2 == (equal to)
3 =~ (not equal to)
4 <= (less than)
5 < (less than or equal to)

The block has two user data fields (User Data 0, User Data 1) to store application-specific data for convenient storage and retrieval. See User Data Storage for details.

The block's update schedule is determined by the Subsample Code (See Subsampling). The following Parameter Dialog Box can be opened by double-clicking on the block in a Simulink Model:

C++ API

ROLBlock

Declaration

Public Method

 
ROLBlock&   ROL();
  Required Header: mechaware.h

Description

The Relation block performs the specified comparison operation on two inputs. The relational comparision operations are >, >=, ==, ~=, <=, and <. The output of the block is 1 (TRUE) when the comparison is true, and it is 0 (FALSE) when the comparison is false.

 
long ROL().Op

Operation Code:

0 is >
1 is >=
2 is ==
3 is ~=
4 is <=
5 is <

Methods

Block Methods

See Also

Binary Relation
Compare

       Legal Notice  |  Tech Email  |  Feedback
      
Copyright ©
2001-2012 Motion Engineering