EasyManuals Logo

IDEC MICROSmart FC6A Series Ladder Programming Manual

IDEC MICROSmart FC6A Series
604 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #529 background imageLoading...
Page #529 background image
FC6A S
ERIES
MICROS
MART
L
ADDER
P
ROGRAMMING
M
ANUAL
FC9Y-B1726 26-27
26: S
CRIPT
5. Bitwise Operators
Example 5.1 Logical AND
Script
Operation Description
If the bitwise logical AND operation on the value of D0000.01 and the value of D0001.01 is 1, D0002.01 is changed to 1.
If the bitwise logical AND operation on the value of D0000.01 and the value of D0001.01 is 0, D0002.01 is changed to 0.
The operation is the same as the following ladder diagram.
Example 5.2 Logical OR
Script
Operation Description
If the bitwise logical OR operation on the value of D0000.01 and the value of D0001.01 is 1, D0002.01 is changed to 1.
If the bitwise logical OR operation on the value of D0000.01 and the value of D0001.01 is 0, D0002.01 is changed to 0.
The operation is the same as the following ladder diagram.
Example 5.3 Logical XOR (exclusive OR)
Script
Operation Description
The logical XOR operation on the value of D0100 and each bit in 0xFF is stored in D0200.
For example, if the value of D0100 is 15 (0x0F), then 240 (0xF0) is stored in D0200.
Example 5.4 Inversion
Script
Operation Description
The bits in the value of D0100 are inverted and stored in D0200.
For example, if the value of D0100 is 0, then 65,535 is stored in D0200.
if ([D0000.01] & [D0001.01])
{
SET([D0002.01)]);
}
else
{
RST([D0002.01]);
}
D0000.01
D0001.01 D0002.01
if ([D0000.01] | [D0001.01])
{
SET([D0002.01]);
}
else
{
RST([D0002.01]);
}
D0000.01
D0002.01
D0001.01
[D0200] = [D0100] ^ 0xFF;
[D0200] = ~[D0100];

Table of Contents

Other manuals for IDEC MICROSmart FC6A Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the IDEC MICROSmart FC6A Series and is the answer not in the manual?

IDEC MICROSmart FC6A Series Specifications

General IconGeneral
BrandIDEC
ModelMICROSmart FC6A Series
CategoryComputer Hardware
LanguageEnglish

Related product manuals