Get MBLogic at SourceForge.net. Fast, secure and Free Open Source 
	software downloads

Help Topics

Topic Details for Soft Logic

Boolean Input Instructions


Boolean input instructions read a Boolean value from the data table or the logic stack, and output the result to the logic stack.

Instruction Description # Params X Y C T CT SC Symbol
AND AND bit with top of logic stack 1 X X X X X X boolean NO
ANDN AND NOT bit with top of logic stack 1 X X X X X X boolean NC
ANDSTR AND top two values on logic stack 0
OR OR bit with top of logic stack 1 X X X X X X boolean NO
ORN OR NOT bit with top of logic stack 1 X X X X X X boolean NC
ORSTR OR top two values on logic stack 0
STR Store bit onto logic stack 1 X X X X X X boolean NO
STRN Store NOT bit onto logic stack 1 X X X X X X boolean NC

Boolean input instructions have two types of input parameters, explicit and implicit. A Boolean input instruction will accept no more than one explicit parameter, and zero, one, or two implicit parameters.

All Boolean input instructions output their result by modifying the logic stack.

Boolean input instructions fall into three categories: AND, OR, and STORE.

All Boolean input instructions have both normal and "NOT" versions.

Example:


	NETWORK 1
	STR X1
	AND X2
	OR X3
	OUT Y1
	
	NETWORK 2
	STRN C10
	ANDN C11
	ORN C12
	OUT C21
	
	NETWORK 3
	STR Y1
	STR Y2
	ANDSTR
	STR Y3
	ORSTR
	OUT Y10


Ladder Examples

The following shows examples in ladder format. Each example shows the IL code as comments, followed by the ladder equivalent.

boolean example 1 boolean example 2 boolean example 3 boolean example 4