Mitsubishi Electric MELSEC FX Series Structured Programming Manual page 155

Hide thumbs Also See for MELSEC FX Series:
Table of Contents

Advertisement

FXCPU Structured Programming Manual
(Application Functions)
Cautions
1) Use the function having "_E" in its name to connect a bus.
2) When handling 32-bit data in structured programs, you cannot specify 16-bit devices directly, different
from simple projects. Use labels when handling 32-bit data.
You can specify 32-bit counters directly, however, because they are 32-bit devices.
Use global labels when specifying labels.
Program example
In this program, word [unsigned]/bit string [16-bit] data stored in a device specified in
by "n" bits, and the obtained data is output to a device specified in
device specified in
1) Function without EN/ENO(SHR)
[Structured ladder]
g_word1=16#EEEE
g_const_word1=16#0006
[ST]
g_word2:=SHR(g_word1,g_const_word1);
2) Function with EN/ENO(SHR_E)
[Structured ladder]
g_bool1
g_const_word1
[ST]
g_bool3:=SHR_E(g_bool1,g_word1,g_const_word1,g_word2);
.
s
SHR
_IN
_K
SHR_E
EN
ENO
g_word1
_IN
_N
using the data type of data stored in a
d
g_word2=16#03BB
g_bool3
g_word2
5.4 Standard Bit Shift Functions
is shifted rightward
s
153
1
2
3
4
5
6
A

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx-kp-ok-e09r927

Table of Contents