11.27 User defined protocol

If the device does not support MODBUS standard, and the protocol is not list in PIStudio, then user can define the protocol by following instruction to realize simply communication functions like sending and receiving commands.

HMI settings

Items

Settings

Note

Protocol

User defined protocol

Connection

RS485/RS232

Baud rate

2400~187500

Stop bits

1/ 2

Data bits

7/ 8

Parity

None/ Even/ ODD

Operating procedures

1) Select [User defined protocol];

2) Click [User defined protocol] button to open setting window as below;

3) Configure user defined command;

No

Item

Description

1

Instruction edit

The required command.

2

Mode

Write to address or read from the address.

3

Format

Encode format: HEX or ASCII.

4

Other

No receiving: HMI does not respond to the receiving command.

Send after receiving: HMI responds to the receiving command.

5

Manually send

Respond once after trigger the address.

Address: set the trigger address.

6

Add

Save this setting.

7

Cancel

Cancel current settings.

8

Add

Add a new command.

8

Edit

Edit the selected command.

8

Delete

Delete the selected command.

8

Clear

Clear all the commands.

9

Instruction list

Display all current commands.

10

Address list

Display all the addresses added.

11

Import

Import the command files to the instruction list.

11

Export

Export current command settings to local storage.

11

Browse

Browse local command files.

11

Advanced

Combine two commands.

11

Exit

Complete editing and exit setting.

Operating procedures

1) Click [Add] to create a new command, as below shows;

2) Select mode, [Read] or [Write], and then select Format, there are two options [Hex] and [ASCII]. As below shows;

3) Other settings: [No receiving] means HMI only sends command, and it would not process the reply command which from device. [Send after receiving] means HMI will be receiving the command which from device firstly, and then sending the command to device. From example, when HMI receiving [00 FF 00] firstly and then send command, as below shows

4) Check [Manually send], and then please set the address for trigging, the setting range is 1~10, and please put Bit switch in project screen for it, and [OneCtrlBit] register is for [Manually send].

5) Instruction edit, when the data format is HEX, please use two numbers to represent one 16-bit number. ASCII format using characters to input;

6) Check settings;

No

Items

Description

1

Add checking

Add checking command when receiving the data.

2

Back checking

Add control character in ASCII format.

2

Differ with send check

Set return checking.

3

Add control character

Start position: select the start position of the data which need to check.

Length: The data length need to be checked.

7) Object settings;

No

Items

Description

1

Object settings

Object type: bit or word address;

Address: the triggering address;

Note: description to object;

2

Byte order

The numerical display order;

8) Data length settings;

No

Item

Description

1

Return data

Position: the start position of the return data.

Length: the return data length.

2

Write data

Position: the start position of the write data.

Length: the write data length.

9) Instruction length settings

No

Item

Description

1

Send length

The instruction data will only send designated data length.

2

Return length

The responds data length.

3

End code

Instruction will not be terminated until receiving [End code];

Cable wiring

1) RS485

2) RS232

Note:

COM3 is available in PI8000 series and advanced series.

Last updated