Functions
The system supports these functions:
Function | Description |
---|---|
Arithmetic Operations | |
ABS | Absolute value of a real value |
EXPT, POW | Exponent, power calculation of real values |
LOG | Logarithm of a real value |
MOD | Modulo |
SQRT | Square root of a real value |
RAND | Random value |
TRUNC | Truncate decimal part of a real value |
ACOS, ASIN, ATAN | Arc cosine, Arc sine, Arc tangent of a real value |
COS, SIN, TAN | Cosine, Sine, Tangent of a real value |
Array Manipulation | |
ARCREATE | Creates an array of integers |
ARREAD | Reads an element in an array of integers |
ARWRITE | Stores (writes) a value in an array of integers |
Binary Operations | |
AND_MASK | Integer bit-to-bit AND mask |
OR_MASK | Integer bit-to-bit OR mask |
XOR_MASK | Integer bit-to-bit Exclusive OR mask |
NOT_MASK | Integer bit-to-bit negation |
ROL, ROR | Rotate Left, Rotate Right an integer value |
SHL, SHR | Shift Left, Shift Right an integer value |
Boolean Operations | |
ODD | Odd parity |
Data Manipulation | |
MIN, MAX, LIMIT | Minimum, Maximum, Limit |
MUX4, MUX8 | Multiplexer (4 or 8 entries) |
SEL | Binary selector |
File Management (for Trusted® Toolset configurations only) | |
F_CLOSE | Closes a binary file |
F_EOF | Tests if end of a file has been reached |
F_ROPEN | Opens a binary file in read mode |
F_WOPEN | Opens a binary file in write mode |
FA_READ | Reads integer and real variables from a binary file |
FA_WRITE | Writes integer and real variables to a binary file |
FM_READ | Reads MESSAGE variables from a binary file |
FM_WRITE | Writes MESSAGE variables to a binary file |
String Manipulation | |
ASCII | Character -> ASCII code |
CHAR | ASCII code -> Character |
MLEN | Get string length |
DELETE, INSERT | Delete sub-string, Insert string |
FIND, REPLACE | Find sub-string, Replace sub-string |
LEFT, MID, RIGHT | Extract left, middle or right of a string |
Time Operations | |
DAY_TIME | Gives date or time of the day |
Provide Feedback