Using user i/o signals (common to both modes), I/o type variable declaration, I/o type global variables – Denso RC5 User Manual

Page 44: I/o type local variables, User input commands, 1 i/o, Type, Variable, Declaration, 2 i/o

Advertising
background image

24

2.4 Using User I/O Signals (common to both modes)

To use user I/O signals you need to first declare, in the program, the use of user I/O
as I/O type variables with a DEFIO command. Next, access the user I/O by writing it
to the I/O type variables or reading it.

2.4.1 I/O Type Variable Declaration

I/O type variables are classified into I/O type global variables that are available
without any declaration, and I/O type local variables that are not available without a
declaration.

2.4.2 I/O Type Global Variables

I/O type global variables are used to refer to or change user I/O signals bit by bit.
Since they are global variables, they can be used without any declaration.

I/O type global variables are expressed in either of the following two ways:

IO[nn]

(nn: terminal number)

Example: IO[104]

IOnn (nn: terminal number)

Example: IO104

2.4.3 I/O Type Local Variables

I/O type local variables are used to collectively refer to or change 1-bit, 8-bit, 16-bit or
32-bit user I/O signals starting from a specified terminal number.

I/O type local variables require a declaration, which will be made with a DEFIO
command, before they are used. For further information about declarations with a
DEFIO command, refer to the PROGRAMMER'S MANUAL (I), Chapter 9, Section
9.7 "DEFIO (Statement) [Conforms to SLIM]."

2.4.4 User Input Commands

There are two types of user input commands, IN and WAIT. The IN command
substitutes the input result for a variable. The WAIT command waits until the input
result meets specified conditions.

IN Command

The IN command inputs a signal from the user input specified by an IO type variable
and substitutes it for an arithmetic variable.

For further information about the IN command, refer to the PROGRAMMER'S
MANUAL (I), Chapter 13, Section 13.1 "IN."

WAIT Command

The WAIT command suspends the execution of the program until specified
conditions are met. If an I/O type variable is used for the conditional statement, this
command suspends the execution of the program until the status of the signal from a
specified user input is checked and meets the specified conditions. For further
information about the WAIT command, refer to the PROGRAMMER'S MANUAL (I),
Chapter 12, Section 12.5 "WAIT."

Advertising