This manual contains text, diagrams and explanations which will guide the reader through the safe and
correct installation, use, and operation of the FX Series function for structured programs. It should be read
and understood before attempting to install or use the unit.
Store this manual in a safe place so that you can take it out and read it whenever necessary. Always forward
it to the end user.
This manual confers no industrial property rights or any rights of any other kind, nor does it confer any patent licenses.
Mitsubishi Electric Corporation cannot be held responsible for any problems involving industrial property rights which may occur as a
result of using the contents noted in this manual.
• This manual provides information for the use of the FX Series Programmable Controllers. The manual has
been written to be used by trained and competent personnel. The definition of such a person or persons is
as follows;
a) Any engineer who is responsible for the planning, design and construction of automatic equipment
using the product associated with this manual should be of a competent nature, trained and qualified
to the local and national standards required to fulfill that role. These engineers should be fully aware of
all aspects of safety with regards to automated equipment.
b) Any commissioning or service engineer must be of a competent nature, trained and qualified to the
local and national standards required to fulfill that job. These engineers should also be trained in the
use and maintenance of the completed product. This includes being completely familiar with all
associated documentation for the said product. All maintenance should be carried out in accordance
with established safety practices.
c) All operators of the completed equipment should be trained to use that product in a safe and
coordinated manner in compliance to established safety practices. The operators should also be
familiar with documentation which is connected with the actual operation of the completed equipment.
Note: the term 'completed equipment' refers to a third party constructed device which contains or uses
the product associated with this manual
• This product has been manufactured as a general-purpose part for general industries, and has not been
designed or manufactured to be incorporated in a device or system used in purposes related to human life.
• Before using the product for special purposes such as nuclear power, electric power, aerospace, medicine
or passenger movement vehicles, consult with Mitsubishi Electric.
• This product has been manufactured under strict quality control. However when installing the product
where major accidents or losses could occur if the product fails, install appropriate backup or failsafe
functions in the system.
• When combining this product with other products, please confirm the standard and the code, or regulations
with which the user should follow. Moreover, please confirm the compatibility of this product to the system,
machine, and apparatus with which a user is using.
• If in doubt at any stage during the installation of the product, always consult a professional electrical
engineer who is qualified and trained to the local and national standards. If in doubt about the operation or
use, please consult the nearest Mitsubishi Electric distributor.
• Since the examples indicated by this manual, technical bulletin, catalog, etc. are used as a reference,
please use it after confirming the function and safety of the equipment and system. Mitsubishi Electric will
accept no responsibility for actual use of the product based on these illustrative examples.
• This manual content, specification etc. may be changed without a notice for improvement.
• The information in this manual has been carefully checked and is believed to be accurate; however, you
have noticed a doubtful point, a doubtful error, etc., please contact the nearest Mitsubishi Electric
distributor.
Registration
•Microsoft® and Windows® are either registered trademarks or trademarks of Microsoft Corporation in the
United States and/or other countries.
• CompactFlash is a trademark of SanDisk Corporation in the United States and other countries.
• The company name and the product name to be described in this manual are the registered trademarks or
trademarks of each company.
This manual explains application functions for structured programs provided by GX Works2. Refer to other
manuals for devices, parameters and sequence instructions.
Refer to each corresponding manual for analog, communication, positioning control and special units and
blocks.
This manual explains application functions for structured programs provided
by GX Works2.
FX3G/FX3U/FX
This manual explains details of analog special function blocks and analog special
adapters for FX
Explanation of instructions and instructions used in program examples are expressed
for GX Developer.
3UC
User's Manual- Analog Control Edition
3U
/FX
3UC
/FX3G PLCs and PID instruction.
(Additional Manual)
FX
FX
3U
FX
3UC
FX
3G
Special
unit/block
FX Series User's Manual -Data Communication Edition
This manual explains details of simple N:N link, parallel link, computer link, no-protocol
communication (RS and RS2 instructions), programming communication and inverter
communication for FX PLCs.
Explanation of instructions and instructions used in program examples are expressed
for GX Developer.
FX3G/FX3U/FX
This manual explains details of wiring, instructions and operations of the positioning
function built in FX
Explanation of instructions and instructions used in program examples are expressed
for GX Developer.
Individual manuals
This manual explains details of each special unit/block.
Explanation of instructions and instructions used in program examples are expressed
for GX Developer.
*1. Detailed explanation may be provided by a separate manual in some products.
3UC
Series User's Manual -Positioning Edition
3U
/FX
3UC
/FX3G PLC main units.
(Manual supplied with product or additional Manual )
This manual explains application functions for structured programs provided
Structured
by GX Works2.
(Additional Manual)
(Additional Manual)
(Additional Manual)
FX
Special
unit/block
FX Series User's Manual -Data Communication Edition
This manual explains details of simple N:N link, parallel link, computer link, no-protocol
communication (RS instruction), programming communication and inverter communication
for FX PLCs.
Explanation of instructions and instructions used in program examples are expressed for
GX Developer and FX-PCS/WIN.
Individual manuals
This manual explains details of each special unit/block.
Explanation of instructions and instructions used in program examples are expressed
for GX Developer and FX-PCS/WIN.
*1. Detailed explanation may be provided by a separate manual in some products.
(Manual supplied with product or additional Manual )
This manual explains application functions for structured programs provided
Structured
by GX Works2.
(Additional Manual)
(Additional Manual)
(Additional Manual)
FX
Special
unit/block
FX Series User's Manual -Data Communication Edition
This manual explains details of parallel link, computer link, no-protocol communication
(RS instruction) and programming communication for FX PLCs.
Explanation of instructions and instructions used in program examples are expressed for
GX Developer and FX-PCS/WIN.
Individual manuals
This manual explains details of each special unit/block.
Explanation of instructions and instructions used in program examples are expressed
for GX Developer and FX-PCS/WIN.
*1. Detailed explanation may be provided by a separate manual in some products.
(Manual supplied with product or additional Manual )
This manual explains devices and parameters for structured programs provided by GX Works2.
Refer to other manuals for sequence instructions and applied functions.
This chapter introduces only reference manuals for this manual and manuals which describe the hardware
information of PLC main units.
Manuals not introduced here may be required in some applications.
Refer to the manual of the used PLC main unit and manuals supplied together with used products.
Contact the distributor for acquiring required manuals.
FX3U Series Hardware ManualJY997D18801Supplied with product
FX3U Series User's Manual- Hardware
Edition
FX3UC (D, DSS) Series Hardware
Manual
FX3UC-32MT-LT-2 Hardware ManualJY997D31601Supplied with product
FX3UC Series User's Manual ÂHardware Edition
FX3G Series Hardware ManualJY997D33401Supplied with product
FX3G Series User's Manual- Hardware
Edition
SH-080782Additional Manual
JY997D26001Additional Manual
JY997D34701Additional Manual
JY997D34801Additional Manual
JY997D16501Additional Manual
JY997D28601Supplied with product
JY997D28701Additional Manual
JY997D31301Additional Manual
Supplied with product
or Additional Manual
Supplied with product
or Additional Manual
Contents
Programming methods, specifications, functions,
etc. required to create structured programs
Devices, parameters, etc. provided in structured
projects of GX Works2
Sequence instructions provided in structured
projects of GX Works2
Application functions provided in structured
projects of GX Works2
Contents
I/O specifications, wiring and installation of the
PLC main unit FX3U extracted from the FX3U
Series User’s Manual - Hardware Edition. For
detailed explanation, refer to the FX3U Series
User’s Manual - Hardware Edition.
Details about the hardware including I/O
specifications, wiring, installation and
maintenance of the FX3U PLC main unit.
I/O specifications, wiring and installation of the
PLC main unit FX3UC (D, DSS) extracted from the
FX3UC Series User’s Manual - Hardware Edition.
For detailed explanation, refer to the FX3UC
Series User’s Manual - Hardware Edition.
I/O specifications, wiring and installation of the
PLC main unit FX3UC-32MT-LT-2 extracted from
the FX3UC Series User’s Manual - Hardware
Edition. For detailed explanation, refer to the
FX3UC Series User’s Manual - Hardware Edition.
Details about the hardware including I/O
specifications, wiring, installation and
maintenance of the FX3UC PLC main unit.
I/O specifications, wiring and installation of the
PLC main unit FX3G extracted from the FX3G
Series User’s Manual - Hardware Edition. For
detailed explanation, refer to the FX3G Series
User’s Manual - Hardware Edition.
Details about the hardware including I/O
specifications, wiring, installation and
maintenance of the FX3G PLC main unit.
1.1 Outline of Structured Programs and Programming
1.Outline
This manual explains applied functions for structured programs provided by GX Works2.
Refer to a different manual for devices, parameters and sequence instructions.
Refer to the following manual for labels, data types and programming languages for structured programs:
1.1Outline of Structured Programs and Programming Languages
1.1.1Outline of structured programs
You can construct two or more programs (program blocks) into one program.
Because you can divide the entire machine processing into small sub processes and create a program for
each sub process, you can efficiently create a program for a large system.
1. Structured program
Program structuring is a technique to divide the contents of control executed by the PLC CPU into
hierarchical small units (blocks) of processing, and then construct a program. By using this technique, you
can design a program while recognizing structuring of a sequence program.
1 Outline
Advantages of hierarchical program
• You can examine the outline of a program at first, and then design its details gradually.
• Program blocks located at the lowest level in the hierarchy are extremely simple and highly independent.
Advantages of program consisting of program blocks
• Because the processing of each block is clear, the entire program is easy to understand.
• The entire program can be divided into several blocks that are created by several people.
• The program reusability is improved, and the development efficiency is improved accordingly.
2. Improved reusability of programs
You can save program blocks in a library. Program resources in the library can be shared, and often used
again.
The following programming languages can be used in each program block.
Graphic languages
1. Structured ladder language
This graphic language is created based on the relay circuit design technology.
Any circuit always starts from the bus line located on the leftmost.
The structured ladder language consists of contacts, coils, functions and function blocks. These components
are connected with vertical lines and horizontal lines.
1 Outline
1.2 PLC Series and Programming Software Version
1
2
Outline
Function List
1
2
X000X001Y000
Y000
X001
D0
When X001 is ON, the contents
of D0 are transferred to D2.
MOV
ENENO
sd
Output Y000
D2
Text language
1. ST (Structured text) language
The ST language can describe control achieved by syntax using selective branches with conditional
statements and repetition by repetitive statements in the same way as high-level languages such as C
language.
By using the ST language, you can create simple programs easy to understand.
Y000:=(X000 OR Y000) AND NOT X001;
IF X001 THEN
D2:=D0; (When X001 is ON, the contents of D0 are transferred to D2.)
END_IF;
IF X002 THEN
D4:=D4+1; (When X002 is ON, the contents of D4 are added by "1".)
ELSE
D6:=D6+1; (When X002 is OFF, the contents of D6 are added by "1".)
END_IF;
Refer to the following programming manual for detailed operations of and cautions on devices and
parameters:
→ FX Structured Programming Manual (Device & Common)
1.3.1I/O processing and response delay
1. Operation timing of I/O relays and
response delay
FX PLCs execute the I/O processing by
repeating the processing (1) to processing (3).
Accordingly, the control executed by PLCs
contains not only the drive time of input filters
and output devices but also the response
delay caused by the operation cycle.
Acquiring the latest I/O information
For acquiring the latest input information or
immediately outputting the operation result in
the middle of the operation cycle shown
above, the I/O refresh instruction (REF) is
available.
(1)
Scan
time
(operation
cycle)
[Input processing]
Input image
memory is read.
(2)
[Program processing]
Image memory of
each device is updated.
Batch I/O method
(Refresh method)
The ON/OFF status of input
terminals is received at one time.
Input image is read, and
operation is executed
according to program.
(3)
[Output processing]
Result is transferred to
output latch memory.
Output
devices
are driven.
1 Outline
2. Short pulses cannot be received.
The ON duration and OFF duration of inputs in PLCs require longer time than "PLC cycle time + Input filter
response delay".
When the response delay "10 ms" of the input filter is considered and the cycle time is supposed as "10 ms",
the ON duration and OFF duration should be at least 20 ms respectively.
Accordingly, PLCs cannot handle input pulses at 25 Hz (= 1000 /(20 + 20)) or more. However, the situation
can be improved by PLC special functions and applied instructions.
Convenient functions for
improvement
By using the following functions, PLCs
can receive pulses shorter than the
operation cycle:
1.3.2Double output (double coil) operation and countermeasures
This subsection explains the double output (double coil) operation and countermeasures.
1. Operation of double outputs
When a coil (output variable) is used twice (double coils) in another program block to be executed or in the
same program block, the PLC gives priority to the latter coil.
Suppose that the same coil Y003 is used in two positions as
shown in the right figure.
For example, suppose that X001 is ON and X002 is OFF.
Input processing
X001=ON X002=OFF
1 Outline
1
2
Outline
Function List
In the first coil Y003, the image memory is set to ON and the
output Y004 is also set to ON because the input X001 is ON.
In the second coil Y003, however, the image memory is set to
OFF because the input X002 is OFF.
As a result, the actual output to the outside is "Y003: OFF, Y004:
ON".
X001
Y003
X002
Output processing
Y003=OFF Y004=ON
First
Second
Y003
Y004
Y003
2. Countermeasures against double outputs
Double outputs (double coils) do not cause an illegal input error (program error), but the operation is
complicated as described above.
Change the program as shown in the example below.
AB
Y000
Ignored
AB
CE
D
Y000
3
Function
Construction
4
How to Read
Explanation of
Functions
5
Applied
Functions
6
Standard
Function Blocks
CE
D
The SET and RST instructions or jump instruction can be used instead, or a same output coil can be
programmed at each state using step ladder instructions STL and RET.
When you use the step ladder instructions STL and RET, note that the PLC regards it as double coils if you
program, inside the state, an output coil located outside the RET instruction from another program block or
the STL instruction.
1.3.3Circuits not available in structured ladder programs and countermeasures
1. Bridge circuit
A circuit in which the current flows in both directions should be changed as shown in the right figure (so that a
circuit without D and a circuit without B are connected in parallel).
AB
FF
CE
B
1 Outline
E
C
D
A
AE
C
D
2. Coil connection position
• You can program a contact on the right side of a coil. In this case, make sure to program a coil (including a
function or function block) at the end of the circuit.
ABDA
C
Or
BD
AB
E
E
CE
D
C
1.3.4Handling of general flags
The following flags are valid in general sequence instructions:
(Examples)
M8020:Zero flagM8021:Borrow flagM8022:Carry flag
M8029:Instruction execution complete flagM8090:Block comparison signal
M8328:Instruction non-execution flag
M8304:Zero flag
*1.Supported only in FX3U/FX3UC PLCs.
*2.Supported only in FX
Each of these flags turns ON or OFF every time the PLC executes a corresponding instruction. These flags
do not turn ON or OFF when the PLC does not execute a corresponding instruction or when an error occurs.
Because these flags are related to many sequence instructions, their ON/OFF status changes every time the
PLC executes each corresponding instruction.
Refer to examples in the next page, and program a flag contact just under the target sequence instruction.
*1
M8306:Carry flag
3U/FX3UC/FX3G PLCs.
*1
*1
*1
M8329:Instruction execution abnormal complete flag
1. Program containing many flags (Example of instruction execution complete flag M8029)
If you program the instruction execution complete flag M8029 twice or more together for two or more
sequence instructions which actuate the flag M8029, you cannot judge easily by which sequence instruction
the flag M8029 is controlled. In addition, the flag M8029 does not turn ON or OFF correctly for each
corresponding sequence instruction.
Refer to the next page when you would like to use the flag M8029 in any position other than the position just
under the corresponding sequence instruction.
Good example
1.3 Cautions on Creation of Fundamental Programs
1 Outline
1
2
Outline
Function List
Bad example
M8029 works as
a flag to indicate
that execution of
DSW is completed.
M8029 works as
a flag to indicate
that execution of
DPLSY is
completed.
M8029 works as
a flag to indicate
that execution of
DPLSY (on the
lower side) is
completed.
M8029 works as
a flag to indicate
that execution of
DSW is completed.
M8000
M8029
Execution is
completed.
X000
M0
M8029
Execution is
completed.
M8029
Execution is
completed.
M8000
X000
ENs1ENO
X010
1D0
s2d2
ENs1ENO
D0
s2
10
M0
S
DPLSY
ENs1ENO
1000Y000
Number of
output pulses
X010
1
s2
M0
R
M0
R
ENs1ENO
s2d2
M0
S
DSW
d1Y010
MUL
Number of output pulses
d
d
Program for DPLSY (on the upper side)
DSW
Y010
d1
D0
3
Function
Construction
4
How to Read
Explanation of
Functions
5
Applied
Functions
6
Standard
Function Blocks
A
Correspondence
between Devices
and Addresses
M8029 works as a
flag to indicate that
execution of DPLSY
(on the upper side)
is completed.
2. Introduction of a method to use flags in any positions other than positions just under
sequence instructions
If two or more sequence instructions are programmed, general flags turn ON or OFF when each
corresponding instruction is executed.
Accordingly, when using a general flag in any position other than a position just under a sequence instruction,
set to ON or OFF another device (variable) just under the sequence instruction, and then use the contact of
such device (variable) as the command contact.
1.3 Cautions on Creation of Fundamental Programs
1 Outline
DSW execution
complete flag
M8029 is changed
to M100.
DPLSY execution
complete flag
M8029 is changed
to M200.
When there is an error in the instruction construction, target device or target device number range and an
error occurs while operation is executed, the following flag turns ON and the error information is stored.
1 Outline
1.3 Cautions on Creation of Fundamental Programs
1
Outline
1. Operation error
Error flag
M8067D8067
Device which stores
error code
FX0/FX0S/FX0N/FXU/FX2C/FX1S
/FX1N/FX2N/FX1NC/FX2NC/FX3G
*1.When an error occurs in a step up to the step No. 32767 in the FX3U/FX3UC PLC, you can check the
error occurrence step also in D8069 (16 bits).
• When an operation error has occurred, M8067 turns ON, D8067 stores the operation error code, and the
specified device (shown in the table above) stores the error occurrence step.
• When another error occurs in another step, the stored data is updated in turn to the error code and step
number of the new error. (These devices are set to OFF when errors are cleared.)
• When the PLC mode changes from STOP to RUN, these devices are cleared instantaneously, and then
turn ON again if errors have not been cleared.
Device which stores error occurrence step
FX3U/FX3UC
D8069
*1
D8315, D8314
2. Operation error latch
Error flag
M8068-
Device which stores
error code
FX0/FX0S/FX0N/FXU/FX2C/FX1S
/FX1N/FX2N/FX1NC/FX2NC/FX3G
*2.When an error occurs in a step up to the step No. 32767 in the FX3U/FX3UC PLC, you can check the
error occurrence step also in D8068 (16 bits).
• When an operation error has occurred, M8068 turns ON, and the device shown in the table above stores
the error occurrence step.
• Even if another error occurs in another step, the stored data is not updated and remains held until these
devices are forcibly set to OFF or until the power is turned OFF.
3.1 Applied Function Expression and Execution Type
3.Function Construction
This chapter explains the construction of applied functions.
3.1Applied Function Expression and Execution Type
Applied function and argument
• The name expressing the contents is given to each function.
For example, the function name "SHL (bit shift left)" is given.
• Each function consists of arguments which indicate I/O data used in the function.
SHL_E
ENENO
D10D0_IN
*1
_NK1
3 Function Construction
_IN () : An argument whose contents do not change even if the function is executed is called
*1() : An argument whose contents change when the function is executed is called "destination",
K1 () : Arguments not regarded as source or destination are expressed in "m", "n", etc.
s
"source", and expressed in this symbol.
d
and expressed in this symbol.
n
Argument target devices
• The input variable (label or device) specifies the target.
• Bit device themselves such as X, Y, M and S may be handled.
• Bit devices may be combined in a way "KnX", "KnY", "KnM" and "KnS" to express numeric data.
→ FX Structured Programming Manual (Device & Common)
• Current value registers of data registers (D), timers (T) and counters (C) may be handled.
• 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 have 32-bit length. Use global labels
when specifying devices.
When 32-bit data is handled, two consecutive 16-bit data registers D are combined.
For example, when data register D0 is defined as an argument of a 32-bit instruction by a label, 32-bit data
stored in D1 and D0 is handled. (D1 offers high-order 16 bits, and D0 offers low-order 16-bits.)
When the current value register of a timer or counter is used as a general data register, it is handled in the
same way.
• The universal data type indicates data type of a label which combines several basic data types.
The data type name begins with "ANY".
ANY_SIMPLE
ANY
3 Function Construction
3.2 Labels
*1*1
ArrayStructure
1
2
Outline
Function List
ANY_NUMANY_BIT
ANY_REAL
FLOAT
(Single
Precision)
FLOAT
(Double
Precision)
Word
[unsigned]/
Bit String
[16-bit]
ANY16
ANY_INT
Word
[signed]
Double word
[signed]
Word
[signed]
Bit
Word
[unsigned]/
Bit String
[16-bit]
Double Word
[unsigned]/
Bit String
[32-bit]
ANY32
Double Word
[unsigned]/
Bit String
[32-bit]
TimeString
Double word
[signed]
The "ANY" type on a higher layer contains types
on the lower layer.
The "ANY" type on the top layer contains all types.
3
Function
Construction
4
How to Read
Explanation of
Functions
5
Applied
Functions
6
Standard
Function Blocks
*1 Refer to the following manual for details.
Q/FX Structured Programming Manual (Fundamentals)
A
Correspondence
between Devices
and Addresses
31
FXCPU Structured Programming Manual
r
(Application Functions)
3.3Device and Address
Devices can be described in two methods, device method and address method.
Device method
In this method, a device is described using the device name and device number.
X 0D 100
3 Function Construction
3.3 Device and Address
Device name
Device number
Address method
This method is defined in IEC61131-3, and used as shown in the table below.
1st character:
Head
%
%I X 0%M X 1 . 863
Memory area
position
Position
IInput(Omitted)BitThis number is provided for
QOutput XBit
MInternalWWord (16 bits)
Size Classification Numbe
2nd character: Size
DDouble word (32 bits)
LLong Word (64 bits)
• Memory area position
The memory area position in which data is assigned is classified into "input", "output" or "internal".
X(X Device method) : I(Input)
Y(Y Device method) : Q(Output)
Any other device: M(Internal)
•Size
The principle of the description method corresponding to the device method (MELSEC description method)
is as follows:
Bit device: X(Bit)
Word device : W(Word (16 bits)), D(Double word (32 bits))
• Classification
The 3rd and later characters indicate the device type which cannot be specified only by the position and
size explained above.
The classification is not required for devices "X" and "Y".
Refer to the following for the device description method:
3rd and later characters:
Classification
detailed classification.
Period (.) is used to delimit
the subsequent "Number".
The characters for
classification may be omitted.
Number
This decimal number
corresponds to the device
number.
Execution of an instruction can be controlled when the instruction contains "EN" in its name.
• "EN" inputs the instruction execution condition.
• "ENO" outputs the instruction execution status.
• The table below shows the "ENO" status corresponding to the "EN" status and the operation result.
ENENOOperation result
TRUE(Executes operation.)
FALSE(Stops operation.)FALSEIndefinite value
TRUE(Operation error did not occur.) Operation output value
FALSE(Operation error occurred.)Indefinite value
3 Function Construction
3.4 EN and ENO
Construction
1
2
3
Outline
Function List
Function
X000
In the above example, the function "BOOL_TO_STR_E"
is executed only when X000 is "TRUE".
When the function is executed normally, "TRUE" is output to M1.
BOOL_TO_STR_E
ENENO
_BOOL
M1
VAR_D10
4
How to Read
Explanation of
Functions
5
Applied
Functions
6
Standard
Function Blocks
A
Correspondence
between Devices
and Addresses
33
FXCPU Structured Programming Manual
4 How to Read Explanation of Functions
(Application Functions)
4.How to Read Explanation of Functions
Function explanation pages have the following configuration.
1)
2)
3)
4)
5)
6)
7)
34
* The above page is prepared for explanation, and is different from the actual page.
This chapter explains the operation outline of each applied function, symbols, I/O data type, equivalent circuit
in sequence instructions, target models, cautions and program examples.
Refer to the following manual for variables, operators, data types and program languages:
In explanation of functions, I/O variables inside ( ) are described.
Explanation of function and operation
This function converts bit data stored in a device specified in into word [signed] data, and outputs the
data obtained by conversion to a device specified in .
When the input value is "FALSE", this function outputs "0" as the word [signed] data value.
When the input value is "TRUE", this function outputs "1" as the word [signed] data value.
FALSE0
TRUE1
Bit dataWord [signed] data
Cautions
Use the function having "_E" in its name to connect a bus.
In this program, bit data stored in a device specified in is converted into word [signed] data, and the data
obtained by conversion is output to a device specified in .
In explanation of functions, I/O variables inside ( ) are described.
Explanation of function and operation
This function converts bit data stored in a device specified in into double word [signed] data, and outputs
the data obtained by conversion to a device specified in .
FALSE0
TRUE1
Bit dataDouble word [signed] data
s
d
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.
In this program, bit data stored in a device specified in is converted into double word [signed] data, and
the data obtained by conversion is output to a device specified in .
In this program, bit data stored in a deice specified in is converted into string data, and the data obtained
by conversion is output to a device specified in .
In explanation of functions, I/O variables inside ( ) are described.
Explanation of function and operation
This function converts bit data stored in a device specified in into word [unsigned]/bit string [16-bit] data,
and outputs the data obtained by conversion to a device specified in .
When the input value is "FALSE", this function outputs "0H" as the word [unsigned]/bit string [16-bit] data
value.
When the input value is "TRUE", this function outputs "1H" as the word [unsigned]/bit string [16-bit] data
value.
FALSE0H
TRUE1H
Bit dataWord [unsigned]/
bit string [16-bit] data
s
d
Cautions
Use the function having "_E" in its name to connect a bus.
In this program, bit data stored in a device specified in is converted into word [unsigned]/bit string [16-bit]
data, and the data obtained by conversion is output to a device specified in .
In explanation of functions, I/O variables inside ( ) are described.
Explanation of function and operation
This function converts bit data stored in a device specified in into double word [unsigned]/bit string [32Âbit] data, and outputs the data obtained by conversion to a device specified in .
When the input value is "FALSE", this function outputs "0H" as the double word [unsigned]/bit string [32Âbit]data value.
When the input value is "TRUE", this function outputs "1H" as the double word [unsigned]/bit string [32-bit]
data value.
FALSE0H
TRUE1H
Bit dataDouble Word [unsigned]
Bit string [32-bit] data
s
d
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.
In this program, bit data stored in a device specified in is converted into double word [unsigned]/bit string
[32-bit] data, and the data obtained by conversion is output to a device specified in .
In explanation of functions, I/O variables inside ( ) are described.
Explanation of function and operation
This function converts bit data stored in a device specified in into time data, and outputs the data
obtained by conversion to a device specified in .
FALSE0
TRUE1ms
Bit dataTime data
d
s
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.
In this program, bit data stored in a device specified in is converted into time data, and the data obtained
by conversion is output to a device specified in .
In explanation of functions, I/O variables inside ( ) are described.
Explanation of function and operation
This function converts word [signed] data stored in a device specified in into double word [signed] data,
and outputs the data obtained by conversion to a device specified in .
12341234
Word [signed] dataDouble word [signed] data
s
d
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.
In this program, word [signed] data stored in a device specified in is converted into double word [signed]
data, and the data obtained by conversion is output to a device specified in .
In explanation of functions, I/O variables inside ( ) are described.
Explanation of function and operation
This function converts double word [signed] data stored in a device specified in into word [signed] data,
and outputs the data obtained by conversion to a device specified in .
12341234
Double word [signed] dataWord [signed] data
d
s
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.
In this program, double word [signed] data stored in a device specified in is converted into word [signed]
data, and the data obtained by conversion is output to a device specified in .
In explanation of functions, I/O variables inside ( ) are described.
Explanation of function and operation
This function converts word [signed] data stored in a device specified in into bit data, and outputs the
data obtained by conversion to a device specified in .
d
When the input value is "0", this function outputs "FALSE".
When the input value is any value other than "0", this function outputs "TRUE".
0FALSE
1567TRUE
Word [signed] dataBit data
s
Cautions
Use the function having "_E" in its name to connect a bus.
In this program, word [signed] data stored in a device specified in is converted into bit data, and the data
obtained by conversion is output to a device specified in .
In explanation of functions, I/O variables inside ( ) are described.
Explanation of function and operation
This function converts double word [signed] data stored in a device specified in into bit data, and outputs
the data obtained by conversion to a device specified in .
d
When the input value is "0", this function outputs "FALSE".
When the input value is any value other than "0", this function outputs "TRUE".
0FALSE
12345678TRUE
Double word [signed] dataBit data
s
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.
In this program, double word [signed] data stored in a device specified in is converted into bit data, and
the data obtained by conversion is output to a device specified in .
In explanation of functions, I/O variables inside ( ) are described.
Explanation of function and operation
This function converts word [signed] data stored in a device specified in into float (single precision) data,
and outputs the data obtained by conversion to a device specified in .
12341234.0
Word [signed] dataFloat (single precision) data
s
d
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.
In this program, word [signed] data stored in a device specified in is converted into float (single
precision) data, and the data obtained by conversion is output to a device specified in .
In explanation of functions, I/O variables inside ( ) are described.
Explanation of function and operation
This function converts double word [signed] data stored in a device specified in into float (single
precision) data, and outputs the data obtained by conversion to a device specified in .
1654352116543521.0
Double word [signed] dataFloat (single precision) data
s
d
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.
In this program, double word [signed] data stored in a device specified in is converted into float (single
precision) data, and the data obtained by conversion is output to a device specified in .
In explanation of functions, I/O variables inside ( ) are described.
Explanation of function and operation
1) This function converts word [signed] data stored in a device specified in into string data, and outputs
the data obtained by conversion to a device specified in .
High-order byte
ASCII code for ten-thousands place
ASCII code for hundreds place
ASCII code for ones place
Word [signed] data
Automatically stored at the end of the character string
d
Low-order byte
Sign data
ASCII code for thousands place
ASCII code for tens place
0000H
2) In "Sign data", "20H (space)" is stored when the input value is positive, and "2DH (-)" is stored when the
input value is negative.
3) "20H (space)" is stored in high-order digits when the number of significant figures is small.
Example: When "-123" is input
-123
Word [signed] data
High-order byte
20H (space)
31H (1)20H (space)
33H (3)
0000H
Low-order byte
2DH (-)
32H (2)
4) "00H" is automatically stored at the end (4th word) of the character string.
s
String
1st word
2nd word
3rd word
4th word
String
1st word
2nd word
3rd word
4th word
Cautions
60
1) Use the function having "_E" in its name to connect a bus.
2) When handling string data in structured programs, you cannot specify 16-bit devices directly, different
from simple projects. Use labels when handling string data.
Use global labels when specifying labels.
An operation error occurs in the following case. The error flag M8067 turns ON, and D8067 stores the error
code.
5 Applied Functions
5.1 Type Conversion Functions
1
Outline
1) When the number of points occupied by the string data storage destination (device specified in )
exceeds the range of the corresponding device
(Error code: K6706)
Program example
In this program, word [signed] data stored in a device specified in is converted into string data, and the
data obtained by conversion is output to a device specified in .
In explanation of functions, I/O variables inside ( ) are described.
Explanation of function and operation
1) This function converts double word [signed] data stored in a device specified in into string data, and
outputs the data obtained by conversion to a device specified in .
High-order byte
ASCII code for billions place
Double word [signed] data
ASCII code for ten-millions place
ASCII code for hundred-thousands place
ASCII code for thousands place
ASCII code for tens place
00H
Automatically stored at the end of the character string
ASCII code for hundred-millions place
ASCII code for millions place
ASCII code for ten-thousands place
ASCII code for hundreds place
ASCII code for ones place
d
Low-order byte
Sign data
2) In "Sign data", "20H (space)" is stored when the input value is positive, and "2DH (-)" is stored when the
input value is negative.
3) "20H (space)" is stored in high-order digits when the number of significant figures is small.
Example: When "-123456" is input
-123456
Double word [signed] data
High-order byte
20H (space)
20H (space)20H (space)
31H (1)
33H (3)
35H (5)
00H
Low-order byte
2DH (-)
20H (space)
32H (2)
34H (4)
36H (6)
4) "00H" is automatically stored at the end (high-order byte of the 6th word) of the character string.
s
String
String
1st word
2nd word
3rd word
4th word
5th word
6th word
1st word
2nd word
3rd word
4th word
5th word
6th word
1) Use the function having "_E" in its name to connect a bus.
2) When handling string data and 32-bit data in structured programs, you cannot specify 16-bit devices
directly, different from simple projects. Use labels when handling string data and 32-bit data.
You can specify 32-bit counters directly, however, because they are 32-bit devices.
Use global labels when specifying labels.
Error
An operation error occurs in the following case. The error flag M8067 turns ON, and D8067 stores the error
code.
1) When the number of points occupied by the string data storage destination (device specified in )
exceeds the range of the corresponding device
(Error code: K6706)
Program example
In this program, double word [signed] data stored in a device specified in is converted into string data,
and the data obtained by conversion is output to a device specified in .
In explanation of functions, I/O variables inside ( ) are described.
Explanation of function and operation
This function converts word [signed] data stored in a device specified in into word [unsigned]/bit string
[16-bit] data, and outputs the data obtained by conversion to a device specified in .
221365678H
Word [signed] dataWord [unsigned]/
bit string [16-bit] data
s
d
Cautions
Use the function having "_E" in its name to connect a bus.
In this program, word [signed] data stored in a device specified in is converted into word [unsigned]/bit
string [16-bit] data, and the data obtained by conversion is output to a device specified in .
In explanation of functions, I/O variables inside ( ) are described.
Explanation of function and operation
This function converts double word [signed] data stored in a device specified in into word [unsigned]/bit
string [16-bit] data, and outputs the data obtained by conversion to a device specified in .
12345678
Double word [signed] data
12345678
00000000
0
11111 11 111110000000 0 000
614E
The information stored in high-order 16 bits is discarded.
614EH
Word [unsigned]/
bit string [16-bit] data
111 11 110 00000000
s
d
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.
In this program, double word [signed] data stored in a device specified in is converted into word
[unsigned]/bit string [16-bit] data, and the data obtained by conversion is output to a device specified in .
In explanation of functions, I/O variables inside ( ) are described.
Explanation of function and operation
This function converts word [signed] data stored in a device specified in into double word [unsigned]/bit
string [32-bit] data, and outputs the data obtained by conversion to a device specified in .
-325
0000FEBBH
-325
Word [signed] dataDouble word [unsigned]/
0000000
00
0
0
0
0
0
Each of high-order 16 bits becomes
"0" after data conversion.
0000FEBBH
bit string [32-bit] data
1111111 1 111 11000
Data conversion
0
0
1111111 1 111 110
00
s
d
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.
68
FXCPU Structured Programming Manual
A
(Application Functions)
Program example
In this program, word [signed] data stored in a device specified in is converted into double word
[unsigned]/bit string [32-bit] data, and the data obtained by conversion is output to a device specified in .
In explanation of functions, I/O variables inside ( ) are described.
Explanation of function and operation
This function converts double word [signed] data stored in a device specified in into double word
[unsigned]/bit string [32-bit] data, and outputs the data obtained by conversion to a device specified in .
12345678BC614EH
Double word [signed] dataDouble word [unsigned]/
bit string [32-bit] data
s
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.
In this program, double word [signed] data stored in a device specified in is converted into double word
[unsigned]/bit string [32-bit] data, and the data obtained by conversion is output to a device specified in .
In this program, word [signed] data stored in a device specified in is converted into BCD data, and the
data obtained by conversion is output to a device specified in .
In explanation of functions, I/O variables inside ( ) are described.
Explanation of function and operation
1
1
1
111
1
0
Ones
place
s
0
1
0
1
This function converts double word [signed] data stored in a device specified in into BCD data, and
0
0
0
1
1
0
Hundreds
place
d
0
0
1
1
1
2
10
0
11
1
10
0
0
Tens
place
outputs the data obtained by conversion to a device specified in .
99999999
Double word [signed] dataANY_BIT data
31
2
99999999
0
0
0
0
Make sure to set them to "0".
7
10
8421842184218421842184218421842
99999999H
0
0
1
1
Ten-millions
place
0
1
6
1
0
Millions
place
0
1
10
0
1
thousands
1
1
1
5
10
1
0
0
Hundred-
place
1
1
99999999H
16217218219220221222223224225226227228229230
2
2152142132122112102928272625242322212
1
1
0
1
0
1
1
Conversion into BCD data
4
10
1
0
0
Ten-
thousands
3
1
0
1
0
Thousands
place
10
place
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.
An operation error occurs when the value stored in a device specified in is outside the range from "0" to
"99,999,999".
5 Applied Functions
5.1 Type Conversion Functions
s
1
Outline
Program example
In this program, double word [signed] data stored in a device specified in is converted into BCD data,
and the data obtained by conversion is output to a device specified in .
In explanation of functions, I/O variables inside ( ) are described.
Explanation of function and operation
This function converts word [signed] data stored in a device specified in into time data, and outputs the
data obtained by conversion to a device specified in .
FFFFh1m5s535ms
Word [signed] dataTime data
d
s
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.
In this program, word [signed] data stored in a device specified in is converted into time data, and the
data obtained by conversion is output to a device specified in .
In explanation of functions, I/O variables inside ( ) are described.
Explanation of function and operation
This function converts double word [signed] data stored in a device specified in into time data, and
outputs the data obtained by conversion to a device specified in .
7FFFFFFFh
Double word [signed] dataTime data
24d20h31m23s647ms
d
s
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.
In this program, double word [signed] data stored in a device specified in is converted into time data, and
the data obtained by conversion is output to a device specified in .
In explanation of functions, I/O variables inside ( ) are described.
Explanation of function and operation
This function converts float (single precision) data stored in a device specified in into word [signed] data,
and outputs the data obtained by conversion to a device specified in .
1234.01234
Float (single precision) dataWord [signed] data
The portion after the decimal
point is rounded off.
d
s
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.
3) The function is provided in the FX
4) In the data obtained by conversion, the portion after the decimal point of the float (single precision) data
(source data) is rounded off.
In this program, float (single precision) data stored in a device specified in is converted into word
[signed] data, and the data obtained by conversion is output to a device specified in .
In explanation of functions, I/O variables inside ( ) are described.
Explanation of function and operation
This function converts float (single precision) data stored in a device specified in into double word
[signed] data, and outputs the data obtained by conversion to a device specified in .
16543521.016543521
FLOAT (single precision) dataDouble word [signed] data
The portion after the decimal
point is rounded off.
s
d
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.
3) The function is provided in the FX
4) In the data obtained by conversion, the portion after the decimal point of the float (single precision) data
(source data) is rounded off.
In this program, float (single precision) data stored in a device specified in is converted into double word
[signed] data, and the data obtained by conversion is output to a device specified in .
In explanation of functions, I/O variables inside ( ) are described.
Explanation of function and operation
1) This function converts float (single precision) data stored in a device specified in into string
(exponent) data, and outputs the data obtained by conversion to a device specified in .
Float
(single
precision)
data
.
(integer part)
E
Sign (exponent part)Sign
Added
automatically
High-order byte
20H (space)
ASCII code (2EH)
for decimal point (.)
ASCII code
for 2nd decimal place
ASCII code
for 4th decimal place
45H(E)
ASCII code for tens
place of exponent part
00H
Automatically stored at the end of the character string
2) The string data obtained by conversion is output to a device specified in as follows:
a) The number of digits is fixed respectively for the integer part, decimal part and exponent part as
follows:
Integer part: 1, decimal part: 5, exponent part: 2
"2EH (.)" is automatically stored in the 3rd byte, and "45H (E)" is automatically stored in the 9th byte.
Total number of digits (12 digits)
Integer part
(1 digit)
Decimal part
(5 digits)
d
Exponent part
(2 digits)
5 Applied Functions
5.1 Type Conversion Functions
1
2
Outline
Function List
-12.3456
Float (single precision)
data
"2EH (.)" is stored.
E-1 . 23456+01
"45H (E)" is stored.
b) In "Sign data (integer part)", "20H (space)" is stored when the input value is positive, and "2DH (-)" is
stored when the input value is negative.
c) The 6th and later digits of the decimal part are rounded.
Total number of digits (12 digits)
7
-12.345678
Float (single precision)
data
-1 .2345786
Number of digits
of decimal part (5)
E
+01
These digits are rounded.
d) "30H (0)" is stored in the decimal part when the number of significant figures is small.
Total number of digits (12 digits)
-12.34
Float (single precision)
data
Number of digits of decimal part (5)
E-1 .23400+01
"30H (0)" is stored.
e) In "Sign data (exponent part)", "2BH (+)" is stored when the input value is positive, and "2DH (-)" is
stored when the input value is negative.
f) "30H (0)" is stored in the tens place of the exponent part when the exponent part consists of 1 digit.
Total number of digits (12 digits)
3
Function
Construction
4
How to Read
Explanation of
Functions
5
Applied
Functions
6
Standard
Function Blocks
Number of digits of exponent part (2)
-12.3456
Float (single precision)
data
E-1 . 23456+01
"30H (0)" is stored.
3) "00H" is automatically stored at the end (7th word) of the character string.
Cautions
1) Use the function having "_E" in its name to connect a bus.
2) When handling character string data and 32-bit data in structured programs, you cannot specify 16-bit
devices directly, different from simple projects. Use labels when handling string data and 32-bit data.
You can specify 32-bit counters directly, however, because they are 32-bit devices.
Use global labels when specifying labels.
An operation error occurs in the following cases. The error flag M8067 turns ON, and D8067 stores the error
code.
5 Applied Functions
5.1 Type Conversion Functions
1) When the value stored in a device specified in is outside the following range:
0, ±2
-126
≤ (Value of device specified in ) ≤ ±2
s
s
128
(Error code: K6706)
2) When the range of a device which will store the character string obtained by conversion (device specified
d
in ) exceeds the range of the corresponding device
(Error code: K6706)
3) When the conversion result exceeds the specified total number of digits
(Error code: K6706)
Program example
In this program, float (single precision) data stored in a device specified in is converted into string data,
and the data obtained by conversion is output to a device specified in .
This function converts word [unsigned]/bit string [16-bit] data stored in a device specified in into bit data,
and outputs the data obtained by conversion to a device specified in .
0HFALSE
1567HTRUE
Word [unsigned]/
bit string [16-bit] data
Bit data
d
s
Cautions
Use the function having "_E" in its name to connect a bus.
In this program, word [unsigned]/bit string [16-bit] data stored in a device specified in is converted into bit
data, and the data obtained by conversion is output to a device specified in .
This function converts double word [unsigned]/bit string [32-bit] data stored in a device specified in into
bit data, and outputs the data obtained by conversion to a device specified in .
0HFALSE
12345678HTRUE
Double word [unsigned]/
bit string [32-bit] data
Bit data
d
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.
In this program, double word [unsigned]/bit string [32-bit] data stored in a device specified in is converted
into bit data, and the data obtained by conversion is output to a device specified in .
This function converts word [unsigned]/bit string [16-bit] data stored in a device specified in into word
[signed] data, and outputs the data obtained by conversion to a device specified in .
5678H22136
Word [unsigned]/
bit string [16-bit] data
Word [signed] data
d
Cautions
Use the function having "_E" in its name to connect a bus.
In this program, word [unsigned]/bit string [16-bit] data stored in a device specified in is converted into
word [signed] data, and the data obtained by conversion is output to a device specified in .
This function converts word [unsigned]/bit string [16-bit] data storeds in a device specified in into double
word [signed] data, and outputs the data obtained by conversion to a device specified in .
5678H
22136
5678H
Word [unsigned]/
bit string [16-bit] data
Each of high-order 16 bits becomes
"0" after data conversion.
Double word [signed] data
22136
0101011001111000
Data conversion
00000000000000000
1
0
1
0
1
1
0
0
1
1
1
1
0
0
0
d
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.
In this program, word [unsigned]/bit string [16-bit] data stored in a device specified in is converted into
double word [signed] data, and the data obtained by conversion is output to a device specified in .
This function converts double word [unsigned]/bit string [32-bit] data stored in a device specified in into
word [signed] data, and outputs the data obtained by conversion to a device specified in .
BC614EH
24910
BC614EH
Double word [unsigned]/
bit string [32-bit] data
000000010111100001100 00101001110
The information stored in
high-order 16 bits is discarded.
24910
Word [signed] data
0
1
1
0
0
0
0
1
0
1
0
0
1
1
0
1
d
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.
In this program, double word [unsigned]/bit string [32-bit] data stored in a device specified in is converted
into word [signed] data, and the data obtained by conversion is output to a device specified in .
This function converts double word [unsigned]/bit string [32-bit] data stored in a device specified in into
double word [signed] data, and outputs the data obtained by conversion to a device specified in .
BC614EH12345678
Double word [unsigned]/
bit string [32-bit] data
Double word [signed] data
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.
In this program, double word [unsigned]/bit string [32-bit] data stored in a device specified in is converted
into double word [signed] data, and the data obtained by conversion is output to a device specified in .