Section 1 Outline of Macro Function
1-13
NS series Macro Referenc
Functions
The following functions are provided for macro of NS Series.
Action Function
Value (BIN code)->BCD code BCD Conversion between BCD
and BIN
BCD code->value (BIN code) BIN
Copy character string STRCPY/STRCPYW
Convert from ASCII code to
Unicode
STRM2W
Manipulating character
strings
Convert from Unicode to ASCII
code
STRW2M
Alarm/Event summary Clear the number of Alarm/Event
occurrence
RSTALARMCNT
Output written value and changed
value
GETNUMVAL
Switch screen SHOWPAGE/SHOWPAGEBCD
Movement of object display area MOVEPARTS
Display message dialog box MSGBOX
Get displayed rectangle of the
object
GETPARTS
Move pop-up window MOVEPOPW
Move pop-up window up MOVEPOPWUP
Move pop-up window down MOVEPOPWDOWN
Move pop-up window left MOVEPOPWLEFT
Move pop-up window right MOVEPOPWRIGHT
HMI exclusive statements
Close pop-up window CLOSEPOPW
Read data from specified address READCMEM
Write data to specified address WRITECMEM
Read bit data from specified
address
READHOSTB
Read word data from specified
address
READHOSTW
Write bit data to specified address
WRITEHOSTB
Communications
Write word data to specified
address
WRITEHOSTW
Process termination Terminate macro program RETURN
Set Date/Time Change settings of internal clock of
the PT
SETTIME
Read contents (values in binary) of
the specified file in a memory card
(CF) to PT memory.
READCF
Reading/writing data
Save the contents of PT memory in
a memory card (CF).
WRITECF
Write (0/1) to multiple bit addresses
in the PT memory
BITSET
Write to multiple addresses
Write a value to multiple word
addresses in the PT memory
MEMSET