AMS serial reset frame configuration

Data field

Size in bytes

Value range/Default

Description

Magic Cookie

2

0xA501/0xA501

Id for detecting an AMS serial frame

Transmitter address

1

0..255 / 0

Address of the sending participant. This value can always be set to 0 for an RS232 communication, since it is a 1 to 1 connection and hence the participants are unique.

Receiver address

1

0..255 / 0..255

Receiver’s address. This value can always be set to 0 for an RS232 communication, since it is a 1 to 1 connection and hence the participants are unique.

Fragment number

1

0..255 / 0

Number of the frame sent. Once the number 255 has been sent, it starts again from 0. The receiver checks this number with an internal counter.

User data length

1

0..255 / 0..255

The max. length of the AMS packet to be sent is 255. If larger AMS packets are to be sent then they have to be fragmented (not published at the moment).

User data

n

 

The AMS packet to be sent.

CRC

2

0..65535

Frame checksum

An AMS packet can be transferred via RS232 with the help of an AMS serial frame. The actual AMS packet is in the user data field of the frame. The max. length of the AMS packet is limited to 255 bytes. Therefore the max. size of an AMS serial frame is 263 bytes. The fragment number is compared with an internal counter by the receiver. The frame number is simply accepted and not checked when receiving the first AMS frame or in case a timeout is exceeded. The CRC16 algorithm is used for calculating the checksum.

 

If an AMS serial frame has been received and the frame is OK (magic cookie OK, CRC OK, correct fragment number etc.), then the receiver has to send an acknowledge frame, to inform the transmitter that the frame has arrived.

Data field

Size in bytes

Value range/Default

Description

Magic Cookie

2

0x5A01/0x5A01

Id for detecting an AMS serial acknowledge frame

Transmitter address

1

0..255 / 0

Dedicated address.

Receiver address

1

0..255 / 0..255

Address of the participant who sent the original frame.

Fragment number

1

0..255 / 0

Corresponds to the fragment number transmitted by the transmitter.

User data length

1

0/ 0

Is always 0 since no user data is sent.

CRC

2

0..65535

Frame checksum

 

In case the transmitter does not receive a valid acknowledgement after multiple transmission, then a reset frame is sent. In this way the receiver is informed that a new communication is running, and the receiver then accepts the fragment number during the next AMS-Frame, without carrying out a check.

Data field

Size in bytes

Value range/Default

Description

Magic Cookie

2

0xA503 / 0xA503

Id for detecting an AMS serial reset frame

Transmitter address

1

0..255 / 0

Transmitter address.

Receiver address

1

0..255 / 0..255

Receiver’s address.

Fragment number

1

0/0

Is always 0.

User data length

1

0/ 0

Is always 0 since no user data is sent.

CRC

2

0..65535

Frame checksum