5 - 35 5 - 35
5 MELSEC FUNCTIONS
5.7.5 16-bit data exchange XCH_M
The specified two BIN 16-bit data are exchanged.
Function definition
BOOL XCH_M (BOOL EN, ANY16 D1, ANY16 D2);
Argument Name
IN/OUT
Description
EN IN
Execution condition (Function is executed only when the
result is TRUE)
S1
IN/OUT
Data to be exchanged, exchange result (BIN 16-bit data)
D2
IN/OUT
Data to be exchanged, exchange result (BIN 16-bit data)
Return Value
Description
BOOL Execution
condition
Example of use
(* When execution condition X0 turns ON, the 16-bit data in D100 and D200 *)
(* are exchanged.
*)
XCH_M (XO, D100, D200);
Corresponding MELSEC command
XCH (16-bit data exchange)
5.7.6 32-bit data exchange DXCH_M
The specified two BIN 32-bit data are exchanged.
Function definition
BOOL DXCH_M (BOOL EN, ANY32 D1, ANY32 D2);
Argument Name
IN/OUT
Description
EN IN
Execution condition (Function is executed only when the
result is TRUE)
D1
IN/OUT
Data to be exchanged, exchange result (BIN 32-bit data)
D2
IN/OUT
Data to be exchanged, exchange result (BIN 32-bit data)
Return Value
Description
BOOL Execution
condition
Example of use
(* When execution condition X0 turns ON, the 32-bit data in dwData1 and
*)
(* dwData2 are exchanged.
*)
DXCH_M (X0, dwData1, dwData2);
Corresponding MELSEC command
DXCH (32-bit data exchange)
For the usable data type, refer to "3.2.2
About ANY type".
Содержание MELSEC L series
Страница 1: ...Programming Manual Structured Text ...
Страница 2: ......
Страница 73: ...4 33 4 33 4 ST PROGRAM EXPRESSIONS MEMO ...
Страница 297: ......