beautypg.com

Date & time read and write – NEC RS-232C User Manual

Page 20

background image

(20/50)

Note.) The maximum data length that can be written to the monitor at a time is 32bytes.
Ex.) The byte data 20h is encoded as ASCII characters '2' and '0' (34h and 30h).


Message

STX (02h): Start of Message
'0'-'0': Result code. No error.
'C'-'0'-'0'-'E' (43h, 30h, 30h, 45h): Asset Data write command
'0'-'0'(30h, 30h): Offset address from top of Asset data.

00h : Write data into from top of the Asset data area.

Data(0)

–- Data(N): Asset data. The data must be ASCII characters strings.

ETX (03h): End of Message


Check code

BCC: Block Check Code
Refer to the section 4.5

“Check code” for a BCC calculation.


Delimiter

CR (0Dh): End of packet

9. Date & Time read and write

9.1 Date & Time Read

This command is used in order to read the setting of Date & Time.

1) The controller requests the monitor to reply with the Date & Time.

Header

Message

Check code

Delimiter

SOH-'0'-Monitor
ID-'0'-'A'-'0'-'6'

STX-'C'-'2'-'1'-'1'-ETX

BCC

CR

Header

SOH (01h): Start Of Header
'0' (30h): Reserved
Monitor ID: Specify the Monitor ID of which you want to get status.

Ex.) If Monitor ID is '1', specify 'A'.

'0' (30h): Message sender is the controller.
'A' (41h): Message type is "Command".
'0'-'6'(30h, 36h): Message length

Message

STX (02h): Start of Message
'C'-'2'-'1'-'1' (43h, 32h, 31h, 31h): Date & time read request command.
ETX (03h): End of Message

Check code

BCC: Block Check Code
Refer to the section 4.5

“Check code” for a BCC calculation.


Delimiter

CR (0Dh): End of packet

2) The monitor replies Date & Time to the controller.

Header

Message

Check code

Delimiter

SOH-'0'-'0'-Monitor ID-'B'-'1'-'4'

STX-'C'-'3'-'1'-'1'-YY-MM-DD-WW-HH-MN
-DS-ETX

BCC

CR

Header

SOH (01h): Start of Header
'0' (30h): Reserved
'0' (30h): Message receiver is the controller
Monitor ID: Indicate a replying Monitor ID

Ex.)

When this byte is set to 'A', the replying Monitor ID is '1'.

'B' (42h): Message type is "Command reply"
'1'-'4'(31h, 34h): Message length

Message

STX (02h): Start of Message