Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Function

Description

#

ABSOLUTE VALUE

Take absolute value of a number.

98

ADD

Add two numbers, or concatenate strings.

3

ARCCOS(x)

Find the arccosine of a number.

88

ARCSIN(x)

Find the arcsine of a number.

89

ARCTAN(x)

Find the arctangent of a number.

90

COSINE(x)

Find the cosine of a number.

85

DIVIDE BY

Divide two numbers, or return first byte of string.

6

EXP(x)

Calculate exponential (ex) value.

84

LOG(x)

Calculate natural logarithmic (ln(x)) value

83

MODULO DIVIDE

Divide two numbers and return fractional portion.

7

MULTIPLY

Multiply two numbers, or replace all occurrences in a string.

5

POWer (x^y)

Perform a power (xy) calculation.

82

RANDOM

Generate a random number.

81

SINE(x)

Find the sine of a number.

86

SQUARE ROOT

Calculate the square root of a number.

13

SUBTRACT

Subtract two numbers, or eliminate one string from another.

4

TANG(x)

Find the tangent of a number.

87

...

Function

Description

#

BIT-AND

Bit-wise AND two numbers, or replace all occurrences in string.

8

BIT-OR

Bit-wise OR two numbers, or replace all occurrences in string.

9

BIT-XOR

Bit-wise XOR two numbers, or replace all occurrences in string.

10

INVERT

Invert Boolean value, or bits in word, or 1.0/real number, or reverse order of a string.

14

String processing functions

Several of the other functions act as special case operations when operating on string values. 

Function

Description

#

ADD

Concatenate strings.

3

ASSIGN

Set a value into a register.

41

BIT-AND

Replace all occurrences of "<~Or?>" in string (use with BIT-OR or BIT-XOR).

8

BIT-OR

Replace all occurrences in string with the text "<~Or?>".

9

BIT-PACK

Take ASCII bytes from an integer and concatenate into an ASCII string.

54

BIT-XOR

Replace first occurrence in string with the text "<~Or?>".

10

DIVIDE BY

Return first byte of string.

6

EQUAL TO

Return True string is equal to another.

2

FORMAT

Store a value into a string using a defined number format.

17

GREATER THAN

Return True if string is greater than another.

0

INTEGER to ASCII BYTE

Convert integer value to printable ASCII representation.

76

INVERT

Reverse order of a string.

14

LESS THAN

Return True if string is less than another.

1

MULTIPLY

Replace all occurrences in a string.

5

NOT EQUAL TO

Returns True if strings are not equal.

93

STRING DROP PART

Drop a number of bytes from start or end of a string.

97

STRING GET PART

Keep only a number of bytes from start or end of a string.

96

STRING HEADER

Return bytes preceding a matching delimiter.

63

STRING LENGTH

Return length of a string.

67

STRING TO LOWER

Convert string to lowercase.

95

STRING TO UPPER

Convert string to uppercase.

94

STRING TRAILER

Return bytes following a matching delimiter.

64

STRING VALUE

Convert string to a numeric value.

35

SUBTRACT

Eliminate one string from another.

4


Program control

Function

Description

#

COMMENT

Add a comment or a row separator for readability.

47

DELAY

Sleep for a number of milliseconds.

16

EXIT

Exit from POD processing on true/non-zero.

58

FOR_LOOP

‘For’ loop for program iteration.

99

GO_SUB_POD

Call another POD program as a subroutine.

60

GOTO LABEL

Jump to another labeled POD program step on true/non-zero.

12

JUMP RELATIVE

Jump to another POD program step relative to the current step.

11

LABEL ONLY

Label a step to be used for a GOTO.

26

NOT EXIT

Exit from POD processing on false/zero.

124

NOT GOTO LABEL

Jump to another labeled POD program step on false/zero.

123

REPEAT UNTIL

Repeat loop of program iteration, similar to FOR_LOOP

126

RETURN

Return from a subroutine.

59

RUN POD(nnn)

Run another POD program without returning to current.

28

...

Function

Description

#

ASSIGN

Set a value into a register.

41

BIT-PACK

Pack Booleans into an integer register, or ASCII bytes from an integer and concatenate into an ASCII string.

54

BIT-UNPACK

Unpack bits of an integer register into Booleans.

53

COPY_DATA_ BLOCK

Copy block of registers from one RTDB to another.

15

EDGE DETECT

Detect rising or falling edge of a register.

118

FORCE REGs to VALUE

Force block of registers to a set value.

125

FORMAT

Store a value into a string using a defined number format.

17

INDEXed GET

Indirect read from an RTDB register.

36

INDEXed SAVE

Indirect write to an RTDB register.

91

INTEGER to ASCII BYTE

Convert integer value to printable ASCII representation.

76

LONG to REAL

Convert long integer to REAL32 (floating point) number.

70

PACK TIME

Pack date/time from 6 registers into long integer seconds.

100

QUALITY ASSIGNMENT

Set the ONLINE/offline quality flag for a register.

128

REAL to LONG

Convert REAL32 (floating point) number to long integer.

71

REVERSE [1,2,4] BYTE WORD

Reverse bytes of integer value.

106

STRING DROP PART

Drop a number of bytes from start or end of a string.

97

STRING GET PART

Keep only a number of bytes from start or end of a string.

96

STRING HEADER

Return bytes preceding a matching delimiter.

63

STRING LENGTH

Return length of a string.

67

STRING TO LOWER

Convert string to lowercase.

95

STRING TO UPPER

Convert string to uppercase.

94

STRING TRAILER

Return bytes following a matching delimiter.

64

STRING VALUE

Convert string to a numeric value.

35

ZERO Scratchpad Elements

Reset all 40 Scratchpad registers back to zero or NULL strings.

25

...

      Returns result of multiplying "Source Addr" data by Operand data, result will be an integer.

      String Replacement:

      If parameters are Strings then Operand Data should be an even number of characters. 

      The second half of the Operand string is scanned for matches in the Source Data. 

      Each matching occurance is then replaced by the first half of the Operand string.

      Example: If Operand contains "abcDEF", then the Source string register will be searched for "DEF". Each occurrence will be replaced by the string "abc".

      For more complex handling of string replacements (not requiring search and replace strings of equal length, for instance), see the BIT-OR, BIT-AND, BIT-XOR functions.

/ DIVIDE BY  Operand (Return 1st N (Operand-Value) of Source String)

...

      Drop a number of bytes from start or end of a string.  A positive negative value in Operand drops that number of bytes from the left of the string, and a negative positive number drops the number of bytes from the right.

...

      Keep only a number of bytes from start or end of a string.  A positive negative value in Operand keeps that number of bytes from the left of the string, and a negative positive number keeps the number of bytes from the right.

...