Despatch Protocol 3 Modbus Communications User Manual

Page 36

Advertising
background image

A

DDRESS LIST

Modbus Programming Manual

36

Version 2

Copyright © 2012 by Despatch Industries.

All rights reserved. No part of the contents of this manual may be reproduced, copied or transmitted in any form or by any
means including graphic, electronic, or mechanical methods or photocopying, recording, or information storage and
retrieval systems without the written permission of Despatch Industries, unless for purchaser's personal use.

Command Code

Value Decimal

Value Hex

Function

RS

21075

0x5253

Read Segment

PN

20558

0x504E

Read Profile Name

PS

20563

0x5053

Read the profiler memory status

The following rules apply when creating a profile over communications:

Profiles must always be terminated with an end segment.

Segments cannot be added after an end segment has been added.

All changes made to the selected profile are immediately saved in the instrument.

2.9.1. Instruction Sequence to create a profile at the next available

position

1. Create a profile by writing the profile header data using the Command Code value CP

(0x43, 0x50). This starts the profile creation process by reserving a profile memory slot.
The profile number is returned by the instrument in the Edit Response Message.

2. Write the first segment using the Command Code value Code WS (0x57, 0x53). This

command will fill the next available segment position and link it to the profile created in
step 1.

3. Write the second segment, again using Command Code WS. This fills the next available

segment position and links it to the segment created in step 2.

4. Continue writing segments until the profile is complete (whilst remaining within the

overall limit of 255 segments for all profiles combined). Each of these segments fills the
next available position and links it to the previous segment specified.

5. The very last segment of the profile must be one of the end type segments. Thereafter, no

more segments can be added to the specified profile. To add a segment to an existing
profile the insert segment command must be used.

2.9.2. Instruction Sequence to create a profile at a specified profile

position

CAUTION:

If this profile number is already in use then the profile header data is overwritten but the segments
associated with it are kept.

1. Determine which profile positions are being used by using the Command Code value PS

(0x50, 0x53). This command will return a list of all the profile positions currently being
used.

2. Choose a location that is not being used and write the profile header data using the

Command Code value WP (0x57, 0x50).
The profile number is echoed back by the instrument in the Edit Response Message.

3. Write the first segment using the Command Code value Code WS (0x57, 0x53). This

command will fill the next available segment position and link it to the profile created in
step 1.

4. Write the second segment, again using Command Code WS. This fills the next available

segment position and links it to the segment created in step 2.

Advertising