Q Corresponding Serial Communication Module User's Manual


Add to my manuals
358 Pages

advertisement

Q Corresponding Serial Communication Module User's Manual | Manualzz

9 DEDICATED INSTRUCTIONS

MELSEC-Q

9.4 INPUT Instruction

Set data

(S)

(D1)

(D2)

Internal device

(System, user)

Bit

Word

This instruction receives data in any message format specified by the user using the non procedure protocol.

File register

Applicable device

MELSECNET/H,

MELSECNET/10

Direct J \

Bit Word

Special module

U \G

Index register Zn Constant Others

[Instruction code]

INPUT

[Executing condition]

Command

G.INPUT

Un (S) (D1)

(D2)

Set data

Set data

Un

(S)

(D1)

(D2)

Description

Start I/O signal of the module

(00 to FE: Top two-digit when I/O signals are expressed in 3-digit.)

Head number of the devices in which control data is stored.

Head number of the devices in which receive data is stored.

Bit device number to be turned on at completion of execution.

Set by

User

User, system

System

System

Data type

BIN16 bit

Device name

The file register per local device and program cannot be used as the set data.

Bit

Control data

Device

(S) + 0

(S) + 1

(S) + 2

(S) + 3

Item

Receive channel

Reception result

Receive data count

Allowable number of receive data

Set data

• Set receive channel

1: Channel 1 (CH1 side)

2: Channel 2 (CH2 side)

• Reception result by an INPUT instruction are stored.

0: Normal

Other than 0: Error code

1

• Receive data count is stored.

2

• Set the allowable number of words for received data that can be stored in (D1).

Setting range

1, 2

0 or more

1 or more

Set by

3

User

System

System

User

POINT

(1) The command of G.INPUT cannot be converted into pulse.

(2) G.INPUT should be executed while the read request of the input/output signal is turned on.

9 - 8 9 - 8

9 DEDICATED INSTRUCTIONS

MELSEC-Q

1 For error codes relating to abnormal completion, see Chapter 10 of the User's

Manual (Basic).

2 When setting "Word/byte units designation" by GX Configurator-SC, set the number of bytes when bytes are designated and set the number of words when words are designated.

3 The settings are done by either of the following:

• User: Data set by the user before executing the INPUT instructions.

• System: The PLC CPU stores the execution result of the INPUT instructions.

Function

(1) The function stores in the device designated in (D1) and succeeding devices the data received with the non procedure protocol of the module designated in Un, according to the control data of the device designated in (S) and succeeding devices.

(2) When an INPUT instruction is executed on a channel, other INPUT instructions cannot be executed on the channel at the same time.

If an attempt is made during execution of an INPUT instruction to execute another

INPUT instruction, the second instruction will not be executed until the execution of the first INPUT instruction is completed.

(3) In case of reading the receive data to the same interface, it cannot be used along with BUFRCVS instruction (for interrupt programs).

(4) Whether an INPUT instruction was completed normally or abnormally can be checked by the completion device ((D2)) or status display device at completion

((D2)+1).

(a) Completion device: Turns on at the END processing of the scan where the

INPUT instruction is completed, and turns off at the next

END processing.

(b) Status display device at completion : Turns on and off depending on the completion status of the INPUT instruction.

• Normal completion : Off with no change.

• Abnormal completion: Turns on at the END processing of the scan where the INPUT instruction is completed, and turns off at the next END processing.

[Operation during execution of an INPUT instruction]

Sequence program

END processing

END processing

Execution of INPUT instruction

INPUT instruction

END processing

END processing

Completion of reception by an INPUT instruction

ON

Completion device

OFF

ON

Abnormal completion

Status display device at completion

OFF

Normal completion

One scan

9 - 9 9 - 9

9 DEDICATED INSTRUCTIONS

MELSEC-Q

Error

(1) When a dedicated instruction is completed abnormally, the abnormal completion signal (D2)+1, turns on and the error code is stored in the transmission result

(S1)+1.

In case of operation errors, the error flag (SM0) turns on and the error code is stored in SD0.

See one of the following manuals according to the error code, and check and correct the error.

<Error code>

4FFF

H

or less : QCPU(Q Mode) User's Manual

(Hardware Design, Maintenance and Inspection)

7000

H

or more: Section 10.2 of the User's Manual (Basic)

Program example

The following example shows a program that stores data received via the nonprocedure protocol in D10 and later.

When the input/output signals of the Q series C24 are from X/Y00 to X/Y1F:

Designate the receive channel.

Clear the reception result and receive data count storage device to 0.

Designate the allowable receive data count.

With normal completion, the receive data within the allowable receive data count (user designated) is read from the receive data storage area in the buffer memory.

• Once the INPUT instruction is executed, the user

designated read completion signal (M0) turns ON for

1 scan.

The reading of receive data and switching of the

ON/OFF status are performed by the PLC CPU.

The abnormal completion flag is reset by an external command.

9 - 10 9 - 10

advertisement

Was this manual useful for you? Yes No
Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Related manuals

Download PDF

advertisement

Table of contents