beautypg.com

Dounit – Visara Master Console Center Scripting Guide User Manual

Page 94

background image

Chapter 5 Script Commands

Scripting Guide

94

DOUNIT

Syntax:

DOUNIT( %Port[, %Operation]) ==> %DOSwitch

Description:

Controls the device connected to a DO unit.

Action:

The switch on the specified DO unit port is opened or closed, thereby

changing the status of the connected equipment. This effectively
switches the equipment ON and OFF.

Parameters:

%Port. Numeric expression. The assigned power port number to

which the CPU is connected. Refer to Ports on page 24 for more
information.
%Operation. Numeric expression. Optional. ON closes the switch
and OFF opens the switch. If not specified, the DO switch setting

remains the same.

Returns:

Numeric value, the setting of the DO switch.
Value

Meaning

0

OFF

1

ON

If the Operation parameter is specified, the return value is the old DO

switch setting value.
If the Operation parameter is not specified, the return value is the

current DO switch setting value.

Note: This is not the current status of the device connected to the DO

unit—use DIUNIT to retrieve that value.

Notes:

1. Refer to Manifest Constants on page 42 for the constants reference

list.

2. This function is not commonly used.

Example:

DOUNIT( 4, ON)
%DOSwitch := DOUNIT( 4, ON)
%DOSwitch := DOUNIT( 4)

See Also:

DIUNIT