6 DATA COMMUNICATION USING THE NON PROCEDURE PROTOCOL MELSEC-Q

(Program example)

When Q series C24 I/O signals are from X/Y00 to X/Y1F:

The transmission command is converted into pulse.

Transmission data is stored.

Designate the number of the interface(CH) that will send the data.

Clear the transmission result storage device to 0.

 

 

 

 

 

 

 

 

 

 

 

Designate the transmission data count in word units.

 

 

 

 

 

 

 

 

 

 

 

(Designate K10 when the unit is bytes.)

 

 

 

 

 

 

 

 

 

 

 

The transmission data stored in the designated device

 

 

 

 

 

 

 

 

 

 

 

is sent.

 

 

 

 

 

 

 

 

 

 

 

After the OUTPUT instruction is executed, the user

 

 

 

 

 

 

 

 

 

 

 

designated transmission complete signal (M0) turns ON

 

 

 

 

 

 

 

 

 

 

 

for one scan.

 

 

 

 

 

 

 

 

 

 

 

Storing the transmission data and writing the

 

 

 

 

 

 

 

 

 

 

 

transmission data count in the buffer memory, and

 

 

 

 

 

 

 

 

 

 

 

issuing a transmission request to the Q series C24 are

 

 

 

 

 

 

 

 

 

 

 

all executed by the PLC CPU.

 

 

 

 

 

 

 

 

 

 

 

The completion flag is reset by an external command.

 

 

 

 

 

 

 

 

 

 

 

 

Q series C24

 

 

 

 

 

 

 

 

 

Address

 

Buffer memory

 

 

 

 

 

 

 

 

 

 

 

For normal completion

 

 

 

 

 

 

 

257H

 

Data transmission result storage area

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

D 0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Interface number

(0001H)

 

 

 

 

 

 

 

400H

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Transmission data count designation area

D 1

Transmission result

(0000H)

D 2

 

 

 

 

 

 

 

 

 

401H

 

 

 

 

Transmission data count

(0005H)

 

 

 

 

 

 

 

 

 

 

 

to

 

Transmission data designation area

 

 

 

 

 

 

 

 

 

 

 

D11

 

(4241H)

 

 

 

 

 

 

 

5FFH

 

 

 

 

 

 

 

 

 

 

 

 

 

to

Transmission data

to

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

D15

 

(0A0DH)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

For abnormal completion

 

 

 

 

 

 

 

 

 

 

 

 

D 0

Interface number

(0001H)

 

 

 

 

 

 

 

 

 

 

 

 

D 1

Transmission result (other than 0000H)

 

 

 

From buffer memory (address 257H)

 

 

 

D 2

Transmission data count

(0005H)

 

 

 

 

 

 

 

 

 

 

 

 

D11

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(4241H)

 

 

 

 

 

 

 

 

 

 

 

 

to

Transmission data

to

 

 

 

 

 

 

 

 

 

 

 

 

D15

 

(0A0DH)

 

 

 

 

 

 

 

 

 

 

 

 

POINT

(1)The SPBUSY instruction is used to read the execution status when using a dedicated instruction. (See Chapter 9.)

(2)More than one OUTPUT instruction cannot be executed simultaneously. Execute the next OUTPUT instruction only after the execution of the first OUTPUT instruction is completed.

6 - 27

6 - 27