Instruction sequence to read a profile, Profile command code descriptions, Creating a profile header (command code cp) – Despatch Protocol 3 Modbus Communications User Manual

Page 37

Advertising
background image

Modbus Programming Manual

A

DDRESS LIST

Version 2

37

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.

5. 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.

6. 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.3. Instruction Sequence to edit an existing Profile Header

When a profile header is changed, the segments associated with it remain unchanged. They must
be edited separately if required.

1. Determine the number of the profile to be edited. Use the Command Code value PS

(0x50, 0x53) which returns a list of all profile positions/numbers currently in use.

2. Write a new profile header data using the Command Code value EP (0x45, 0x50).

The profile number is echoed back by the instrument in the Edit Response Message.

2.9.4. Instruction Sequence to read a profile

1. Use the command RP to read the profile header data
2. Use the command RS to read the 1st segment’s data
3. Use the command RS to read the 2nd segment’s data.
4. Repeat steps 2 and 3 until an end segment is reached.

2.9.5. Profile Command Code Descriptions

2.9.5.1. Creating a profile header (Command Code CP)

Creating A Profile Header - Request (to instrument)

Field Name

Data

Comments

(Dec)

(Hex)

Unit Address

A/R

A/R

The ID address of the instrument.

Function Code

23

17

Requires the multi read/write function.

Read Start Address High Byte

32

20

Read Start Address Low Byte

06

06

Read Quantity Of Registers High Byte

00

00

Read Quantity Of Registers Low Byte

01

01

Write Start Address High Byte

32

20

Write Start Address Low Byte

06

06

Write Quantity Of Registers High Byte

00

00

Write Quantity Of Registers Low Byte

20

14

Byte Count

40

28

38dec / 0x26hex creating a profile at the
next available location.

Command Code High Byte

67

43

Create Profile (CP) = 17232dec / 0x4350hex

Command Code Low Byte

80

50

Profile Name Character 1

A/R

A/R

The ASCII codes equivalent to each of the

Profile Name Character 2

A/R

A/R

Advertising