3. Instructions
1002
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Function
When the execution condition is ON, MSG(046) registers the 16 words of ASCII data (up to 32
characters including the null character) from M to M+15 for the message number specified by N. Once
a message has been registered, a Programming Console can be connected and the message will be
displayed after any error messages that have been generated.
After a message has been registered, the message display can be changed by overwriting the
message in the message storage area.
To clear a message that has been registered, execute MSG(046) with S set to the message number of
the message you want to clear and N set to a constant (0000 to FFFF).
A message registered during program execution will be retained even if program execution is stopped,
but all messages will be cleared when the program is executed again.
Precautions
• Registered messages are updated each time MSG(046) is executed.
• All message characters after the null character (00) are converted to spaces in the Programming
Console display.
• The character stored in the leftmost byte is displayed before the character in the rightmost byte.
Example Programming
When CIO 0.00 turns ON in the following example, the 16 words of data in D100 through D115 are read
as the 32 characters of ASCII data for message number 7 and displayed at the Peripheral device.
N+1
N
N+2
N+15
ABCDE
F
MSG
4
4
4
B
16 characters × 2 lines
Programming Console display
16 words
(32 characters)
4D 41
54 45
52 49
41 4C
20 53
48 4F
52 54
0.00
D100
D100
D101
D102
D103
D104
D105
D106
D107
D115
M:
N
M
Spaces
16 characters × 2 lines max.
Reads ASCII
data up to 00.
Leave out spaces.
(Values ignored)