.

Binary Relation

Overview

Overview

The Binary Relation block performs the specified logical (bitwise) operation on two inputs. The logical operations are AND, OR, Negative AND (NAND), Negative OR (NOR), and Exclusive OR (XOR).

The configuration values  for this block are as follows:

 
op

Operation Code: 0 = AND, 1 = OR, 2 = NAND, 3 = NOR, 4 = XOR.

Subsample Code A code which determines the schedule for updating this block (every sample, even samples only, etc.) See Subsampling.
User Data 0 Application-specific data. See User Data Storage.
User Data 1 Application-specific data. See User Data Storage.

Matlab/Simulink

Simulink Interface

bin_img1

The Output is a 32-bit integer formed from a logical operation on the 32-bit integer inputs.

The op parameter determines the operation:

0 AND
1 OR
2 NAND
3 NOR
4 XOR

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:

bin_img2

 

C++ API

BROLBlock

Declaration

Public Method

 
BROLBlock&   BROL();
  Required Header: mechaware.h
Description

The Binary Relation block performs the specified logical (bitwise) operation on two inputs. The logical operations are AND, OR, Negative AND (NAND), Negative OR (NOR), and Exclusive OR (XOR)

 
long BROL().Op

Operation Code: 0 = AND, 1 = OR, 2 = NAND, 3 = NOR, 4 = XOR.

See Also

Compare | Relation

 

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