Bit Block Read

This function is to assign PLC device memory directly to read bit block. The data can be assigned up to 16 pieces repeatedly.

But, The total sum of the word data is not to be over 1024 bits.

image-20240325-023605.png

 

 

 

Requested Format (PC -> PLC)

  • Bit Block Read(Master sends.)

  • Cmd – 72h

 

ID

Frame No.

Cmd

Res.

Length

Data

Check Sum

 

ID : This is a 9-byte string like "KDT_PLC_M".

 

FrameNo : This, 1-byte data with the range from 0 to 127, is the number of the frame controlled by Master party.

 

Cmd : 1 Byte, 72h(Word Block Read)

 

Res : 1 byte of a reserved device (00h)

 

Length : Total number of the bytes of a frame data device

 

Data : (Ex.) The case to read 128 bits from ‘T0000’

Offset (Byte)

Meaning of Data

Ex.

Remarks

0

Main Device Prefix (ASCII)

‘T’

Assigns the ASCII Prefix of the bit device supported from a PLC.

1

Sub-Device Prefix

or ‘0’ (ASCII)

‘0’

Sub-Prefix in case of the 2-character prefix device (TC, TS, CC, CS)

2

Device Address

(ASCII)

‘0’

The bit address of a corresponding device is used.

3

‘0’

4

‘0’

5

‘0’

6

‘0’

7

‘0’

8

Read Size (Bit)

00h

Value in the range from 0001h to 0400h (1~1024)

9

80h

 

Check Sum : This is 2-byte value. After the entire frame is binary-summed by the byte, the lower 2-byte in the result value is used.

 

 

Responded Format

 

ACK Response

This is the frame sending the data of the bit block that Master requests to read, in case of receiving Master’s request correctly and responding.

Cmd – 72h

 

 

Data Device

Offset (Byte)

Meaning of Data

Ex.

Remarks

0 ~ 9

Block Address

-

The first 10 bites in the data of the block assigned to a Master frame are copied and stored.

10

Bit Data #0

‘1’

The first bit data of Read Block

11

Bit Data #1

‘1’

The second bit data of Read Block

.......

m

Bit Data #n

 

The last bit data of Read Block

 

 

NACK Response

In case that the service to ‘Word Block Read’ cannot be given due to error in a system or other reason,

Cmd – 41h

In the case of responding to Error Code (Refer to the Error Code table for the Exclusive Service.)

 

 

Data Device

Offset (Byte)

Meaning of Data

Ex.

Remarks

0

Error Code

00h

Error Code (Error in the size of the requested data)

1

04h