<< Prev        Next >>

ID : 459

I/O Type

I/O type data have I/O port status (ON or OFF) as a value.

I/O status can be changed by overwriting the I/O type variable. Output I/O is readable/writable, while input I/O is read-only.

Data types of I/O Type Data

I/O type data can be treated as any of the following type data depending on data types.

Bit

Unsigned 1-bit data.

Value range: 0 to 1

Byte

Unsigned 8-bit data.

Value range: 0 to 255

Most significant port number: Start port address + 7

Word

Unsigned 16-bit data.

Value range: 0 to 65535

Most significant port number: Start port address + 15

Short

Signed 16-bit data.

Value range: -32768 to 32767

Most significant port number: Start port address + 15

Integer

Signed 32-bit data.

Value range: -2147483648 to 2147483647

Most significant port number: Start port address + 31

Single

32-bit single precision real number type data.

Expression mode is the IEEE 754 format.

Value range: -3.4E+38 to 3.4E+38

Sign part port number: Start port address + 31

Exponent port number: Start port address + 30 to start port address + 23

Mantissa port number: Start port address + 22 to start port address

I/O type Global Variable

For I/O type global variable, all connected I/O ports are registered as Bit type in advance, so they are accessible from all tasks without further declaration. The Index number of I/O type global variable is the port number.

I/O Type Local Variable

Declare the I/O type local variable by using a DefIO statement. For declaration, designate an I/O port corresponding to the data type.

Related Terms

Declaring I/O Variable by Array

ID : 459

<< Prev        Next >>