Comparison Blocks

Make the decision part of the flow.

Explore the comparison components in the general-block library. Review each block's conditions, inputs, and outputs before connecting it in a model.

Comparison Blocks


Odd

File: general_blocks/Comparison/odd.sim
Description
The model generates a logical TRUE (nonzero) if the port in is an odd integer.
If the port in is not an odd interger, the model generates a logical FALSE (zero).
Ports

Input Ports

  • in      Data Type: INTEGER

Output Ports

  • out Data Type:INTEGER

Parameters

  • none

Even

Even

File: general_blocks/Comparison/even.sim
Description
A logical TRUE is generated if the port in is an even number. A logical
FALSE is generated if on odd number in on port i n.
Ports

Input Ports

  • in        Data Type: INTEGER

Output Ports

  • out     Data Type: INTEGER

Parameters

  • none

Set_Equals

Set Eq

File: general_blocks/Comparison/Set_equals.sim
Description
The model compares the values of the two input set values.
If equal a logical TRUE  is on the port out . Otherwise a logical
FALSE is on the port out.
Ports

Input Ports

  • in1       Data Type: SETS
  • in2       Data Type: SETS

Output Ports

  • out      Data Type: INTEGER

Parameters

  • none

R_LessThanOrEqual

R LessThanEq

File: general_blocks/Comparison/R_lessthanorequal.sim
Description
The model compairs in1 and in2. If the value of in1 is less than or equal
to the value of in2, a logical TRUE is placed on the port out. Otherwise, the
value is a logical FALSE.
Ports

Input Ports

  • in1     Data Type: REAL
  • in2     Data Type: REAL

Output Ports

  • out     Data Type: INTEGER

Parameters

  • none

R_LessThan

R LessThan

File: general_blocks/Comparison/R_lessthan.sim
Description
The model compares in1 to in2. If the value of in1 is less than in2 ,
a logical TRUE is placed on the port out. Otherwise, the value of out will be zero.
Ports

Input Ports

  • in1     Data Type: REAL
  • in2     Data Type: REAL

Output Ports

  • out     Data Type: INTEGER

Parameters

  • none

R_GreaterThanOrEqual

R GreThanEq

File: general_blocks/Comparison/R_greaterthanorequal.sim

Description
The model compairs in1 and in2. If the value of in1 is greater than or equal
to the value of in2, a logical TRUE is placed on the port out. Otherwise, the
value is a logical FALSE.
Ports

Input Ports

  • in1      Data Type: REAL
  • in2      Data Type: REAL

Output Ports

  • out     Data Type: INTEGER

Parameters

  • none

R_GreaterThan

R GreThan

File: general_blocks/Comparison/R_greaterthan.sim

Description
The model compairs in1 and in2. If the value of in1 is greater than the value of in2,a logical TRUE is placed on the port out . Otherwise, the value is a logical FALSE.
Ports

Input Ports

  • in1     Data Type: REAL
  • in2     Data Type: REAL

Output Ports

  • out     Data Type: INTEGER

Parameters

  • none

R_Equals

R Equals

File: general_blocks/Comparison/R_equals.sim

Description
The model compares in1 to in2. If the values of the two inputs are equal,
a logical TRUE is placed on the port out. The out value will be a logical
FALSE otherwise.
Ports

Input Ports

  • in1     Data Type: REAL
  • in2     Data Type: REAL

Output Ports

  • out     Data Type: INTEGER

Parameters

  • none

I_LessThanOrEqualE

I LessThanEq

File: general_blocks/Comparison/I_lessthanorequal.sim
Description
The model compairs in1 and in2. If the value of in1 is less than or equal
to the value of in2, a logical TRUE is placed on the port out. Otherwise, the
value is a logical FALSE.
Ports

Input Ports

  • in1     Data Type: INTEGER
  • in2     Data Type: INTEGER

Output Ports

  • out Data Type: INTEGER

Parameters

  • none

I_LessThan

I LessThan

File: general_blocks/Comparison/I_lessthan.sim

Description
The model compares in1 to in2. If the value of in1 is less than in2 ,
a logical TRUE is placed on the port out. Otherwise, the value of out will be zero.
Ports

Input Ports

  • in1     Data Type: INTEGER
  • in2     Data Type: INTEGER

Output Ports

  • out Data Type: INTEGER

Parameters

  • none

I_GreaterThanOrEqual

I GreThanEq

File: general_blocks/Comparison/I_greaterthanorequal.sim

Description
The model compairs in1 and in2. If the value of in1 is greater than or equal
to the value of in2, a logical TRUE is placed on the port out. Otherwise, the
value is a logical FALSE.
Ports

Input Ports

  • in1     Data Type: INTEGER
  • in2     Data Type: INTEGER

Output Ports

  • out Data Type: INTEGER

Parameters

  • none

I_GreaterThan

I GreThan

File: general_blocks/Comparison/I_greaterthan.sim
Description
The model compares in1 to in2. If the value of in1 is greater than in2 ,
a logical TRUE is placed on the port out. Otherwise, the value of out will be zero.
Ports

Input Ports

  • in1     Data Type: INTEGER
  • in2     Data Type: INTEGER

Output Ports

  • out
    Data Type: INTEGER

Parameters

  • none

I_Equals

I Equals

File: general_blocks/Comparison/I_equals.sim

Description
The model compares in1 to in2. If the values of the two inputs are equal,
a logical TRUE is placed on the port out. The out value will be a logical

FALSE otherwise.
Ports

Input Ports

  • in1   Data Type:INTEGER - in2   Data Type:INTEGER

Output Ports

- out Data Type: INTEGER

Parameters

- none


StringEqualsParam

StringEqParam

File: general_blocks/Comparison/StringEqualsParam.sim

Description
The model compares the input String to the Parameter String. If the values of the two are equal, the input DSin passes through to the port True otherwise passes out the port False .
Ports

Input Ports

  • DSin        Data Type:DATA STRUCTURE
  • Strin       Data Type:STRING

Output Ports

- True
Data Type: DATA STRUCTURE**- False       Data Type: DATA STRUCTURE

Parameters

- String          Data Type: STRING


This page is an editorial rewrite of source documentation. Historical status, availability, and platform notes are not independently verified for a current release. Technical examples are reference material, not a live simulator.