Rockwell Automation 2708-DH5B2L_DH5B4L Attended Workstation User Manual

Page 176

Advertising
background image

Appendix M

Application Library Subroutines

M–9

The menu string is a string in which each menu entry is preceded by a “ | ”
(vertical bar). Thus a menu$ such as:

“Payment Type: | Mastercard | Visa | Amex \ “ + ” | Other | Cash“

has 5 entries; “Mastercard” is the 1st entry and may also be selected by
pressing M. “Cash” is the 4th entry and may also be selected by pressing C.
Note the use of “ \ ” to start a new line (the fact that the string was made by
adding two strings together cannot be detected by Menu%).

The actual menu displayed will look like:

Payment Type: <Mastercard> Visa

Amex

Other

Cash

The startingitem% is a value of 1 to 10, to indicate wh ich entry should be
selected first. Note that the global EXITOFFSET% is set to the entry which
was selected at exit.

e = Menu% ( startingitem%, menu$ )
FUNCTION Menu% ( sitem%, m$ )

LogE!

Returns the natural log of a value.

x! = LogE! ( x! )
FUNCTION LogE! ( x )

Log10!

Returns the base 10 log of a value.

x! – Log10! ( x! )
FUNCTION Log10! ( x )

Exponential!

Returns e to the x

x! = Exponential! ( x! )
FUNCTION Exponential! ( x )

Power!

Returns x to the power of y.

z! = Power! ( x!, y! )
FUNCTION Powerl! ( x, y )

CubeRoot!

Returns the cube root of x.

x! = CubeRoot! ( x! )
FUNCTION CubeRoot! ( x )

SquareRoot!

Returns the square root of x.

x! = SquareRoot! ( x! )
FUNCTION SquareRoot! ( x )

Advertising
This manual is related to the following products: