beautypg.com

Abs (number), Acin, Acos (number) – Xylem System 5000 BASIC Manual User Manual

Page 15: Activeled

background image

13

Basic Commands and Functions

Returns the absolute value of the given number.

var = ABS(-2.5)

REM stores 2.5 in the var variable

var2 = ABS(100)

REM stores 100 in the var2 variable

ABS (number)

Used in conjunction with the GETVALUE command, ACIN requests a new measurement to be

made on the AC-In port and stores the value in the given variable.

GETVALUE ACIN, var

REM stores a new AC-In measurement from the

REM

daughterboard

in

the

var

variable

GETVALUE ACIN SLOT1, s$ REM stores a new AC-In measurement from

REM Slot 1 in the s$ string variable

ACIN

Returns the arc-cosine value of the given number.

var = ACOS(0)

REM stores 1.5707 (PI/2) in the var variable

var2 = ACOS(0.5)

REM stores 1.0472 (PI/3) in the var2 variable

ACOS (number)

Used in conjunction with the GETPOWER command, ACTIVELED requests the current state of

the Active LED on the top of the System 5000™ and stores the value in the given variable. A 1

is stored if On, 0 if Off.

Used in conjunction with the SETPOWER command, SETPOWER specifies the Active LED on

the top of the System 5000™ to be turned on or off. Numbers greater than zero will turn the

Active LED On, and numbers less than or equal to zero will turn the Active LED Off.

GETPOWER ACTIVELED, a REM stores 1 if On, 0 if Off for the Active LED

REM

into

the

a

variable

SETPOWER ACTIVELED, 1 REM turns the Active LED On

REM Turn off the Active LED if it is on

GETPOWER ACTIVELED, a REM retrieves the Active LED status

IF (a == 1) THEN

SETPOWER ACTIVELED, 0 REM turns the Active LED Off

ENDIF

ACTIVELED