<< Prev        Next >>

ID : 366

Reset

Function

To turn I/O type variable Bit to Off.

Syntax

Reset I/O type variable name

Guaranteed entry

I/O type variable name
Designate an I/O type variable name.

Description

All Bits of I/O type variable designated by I/O type variable name are turned Off. If some are masked at the time of I/O type local variable declaration (DefIO), only Bits that are not masked are turned Off.

I/O of consecutive Index numbers can be turned Off at one time.

Reset IO[128 To 160] 'Turn all of I/O ports 128-160 Off
DefIO aaa(3) = Byte, 128
Reset aaa(0 To 3) 'I/O type local variable aaa is all 0

Designated "To" expressions that can be stated for consecutive variables are Set and Reset only.

Related Terms

Set

Attention

-

Example

'!TITLE "Switching I/O Ports"
' If the I/O port number "240" is ON, set the I/O port number "241," and "220" through "225" to OFF
Sub Sample_Set

  ' Set the I/O port number "240" to ON
  Set IO[240]

  ' Set the I/O port number "241" to ON
  Set IO[241]

  ' Set the I/O port numbers "220" through "225" to ON
  Set IO[220 To 225]

  ' If the I/O port number "240" is ON
  If IO[240] Then

    ' Set the I/O port number "241" to OFF
    Reset IO[241]

    ' Set the I/O port numbers "220" through "225" to OFF
    Reset IO[220 To 225]

  End If

End Sub

ID : 366

<< Prev        Next >>