Syntax Reference JADE List Of Functions

List of Functions

Below is a list of functions available in the JADE expression language.

Conditional

SelectAndReevaluate

Evaluates the first argument (boolean condition; may be a string or an expression which will be evaluated to boolean) and then reevaluates / recomputes the second argument (if true) or third argument (if false) accordingly. This function is distinct from the ConditionalReturn / Select function in that the latter evaluates all expressions in the conditional statement upfront.

Synonyms:

Examples

SelectAndReevaluate("(4 > 3)", "Yes", "No")
// returns Yes

Call Signatures

Return Type: string
Parameters:
  - condition (string, required): boolean or string condition (evaluates to boolean)
  - valueIfTrue (string, required): return value if true (expressions here are reevaluated after the condition)
  - valueIfFalse (string, required): return value if false (expressions here are reevaluated after the condition)

ConditionalReturn

Returns the second argument if the condition is true, otherwise returns the third argument.

Synonyms: ConditionalAssignment, ReturnIf, Select

Examples

ConditionalReturn("4 > 3", "Yes", "No")
// returns Yes

Call Signatures

Return Type: string
Parameters:
  - condition (string, required): boolean or string condition
  - valueIfTrue (string, required): return value if true
  - valueIfFalse (string, required): return value if false

Case

Returns the value of a key in the supplied object if the supplied key matches, otherwise returns the default value.

Note: searchKey is compared to the keys of lookupObject using the type of searchKey so that, for example, searchKey = 9.000000 compared to key “9” will resolve to true.

Synonyms: Map, MapValue, Switch

Examples

Case("test", {"test": 2, "other": 3}, 0)
// returns 2

Call Signatures

Return Type: integer
Parameters:
  - searchKey (string, required): key to look for in the object
  - lookupObject (string, required): obj (key-value pairs)
  - defaultValue (integer, required): default value (returned if no keys match)

String

StringLength

Returns the length of the string.

Synonyms:

Examples

StringLength("test")
// returns 4

Call Signatures

Return Type: integer
Parameters:
  - text (string, required): string

StringRepeat

Returns a repeated string.

Synonyms:

Examples

StringRepeat("AB", 2)
// returns ABAB

Call Signatures

Return Type: string
Parameters:
  - string (string, required): string
  - numRepeats (integer, required): integer

StringReplace

Returns a string with text replaced.

Synonyms:

Examples

StringReplace("test", "t", "9", true, false, false)
// returns 9est9

Call Signatures

Return Type: string
Parameters:
  - subject (string, required): subject string
  - search (string, required): search for string
  - replace (string, required): replace with string
  - replaceAll (string, required): whether to replace all
  - ignoreCase (string, required): whether to ignore case
  - startAtOppositeEnd (boolean, required): whether to start at opposite end

ToUpperCase

Returns an upper case string.

Synonyms:

Examples

ToUpperCase("test")
// returns TEST

Call Signatures

Return Type: string
Parameters:
  - string (string, required): string

ToLowerCase

Returns a lower case string.

Synonyms:

Examples

ToLowerCase("TEST")
// returns test

Call Signatures

Return Type: string
Parameters:
  - string (string, required): string

StringEquals

.

Synonyms: StringEquals

Examples

()
// returns 

Call Signatures

Return Type: string
Parameters:
  

EvaluateStringToBoolean

Evaluates a string to a boolean

Note:
0. quotes are optional (though to be a function, what’s passed in must be a json type, so string wrapping with quotes will treat the general case)

  1. true, !0, !F, !false, and !null will evaluate to true
  2. everything else evaluates to false.

Synonyms:

Examples

EvaluateStringToBoolean("some wild thing")
// returns false

Call Signatures

Return Type: boolean
Parameters:
  - string (string, required): Any string to be evaluated to true / false

ZeroPad

Zero pads a number.

Synonyms:

Examples

ZeroPad(1.23, 5, "Right")
// returns 1.230

Call Signatures

Return Type: double
Parameters:
  - number (double, required): number to pad with zeros
  - totalWidth (integer, required): total desired width; this should include the decimal if present
  - sideToPad (string, required): “Left” or “Right” (defaults to “Left”)

Regex

RegexMatch

Returns a match to a regular expression.

Synonyms:

Examples

RegexMatch("[0-9]+", "12345ABC", 0)
// returns 12345

Call Signatures

Return Type: integer
Parameters:
  - regex (string, required): regular expression
  - subject (string, required): subject string
  - offset (integer, required): starting offset in the subject string

RegexTest

Returns true if the regex matches the input string starting from offset, false otherwise.

Synonyms:

Examples

RegexTest("[0-9]+", "12345ABC", 0)
// returns true

Call Signatures

Return Type: boolean
Parameters:
  - regex (string, required): regular expression
  - subject (string, required): subject string
  - offset (integer, required): starting offset in the subject string

RegexSearch

Returns the starting index of the match if found, -1 otherwise.

Synonyms:

Examples

RegexSearch("[0-9]+", "ABC12345DEF", 0)
// returns 3

Call Signatures

Return Type: integer
Parameters:
  - regex (string, required): regular expression
  - subject (string, required): subject string
  - offset (integer, required): starting offset in the subject string

RegexReplaceAll

Replaces all matches to a regex in the subject with the replacement string.

Synonyms:

Examples

RegexReplaceAll("[0-9]+", "ABC12345DEF", "999")
// returns ABC999DEF (index of start of match)

Call Signatures

Return Type: string
Parameters:
  - regex (string, required): regular expression
  - subject (string, required): subject string
  - replace (string, required): the string to replace with

RegexReplaceAllWithBackReferences

Replaces all matches to a regex in the subject with the replacement string with backreferences.

Synonyms:

Examples

RegexReplaceAllWithBackReferences("[0-9]+", "ABC12345DEF", "999")
// returns ABC999DEF

Call Signatures

Return Type: string
Parameters:
  - regex (string, required): regular expression
  - subject (string, required): subject string
  - replace (string, required): the string to replace with

Number

Add

Adds numbers (allows any number of arguments).

Synonyms: Sum

Examples

Add(1.1, 2.2)
// returns 3.3

Call Signatures

Return Type: double
Parameters:
  - number (double, required): a number to add
  - number (double, required): a number to add

Multiply

Multiplies numbers (allows any number of arguments).

Synonyms: Mult, Prod, Product

Examples

Multiply(2.1,3.0)
// returns 6.3

Call Signatures

Return Type: double
Parameters:
  - number (double, required): a number to multiply
  - number (double, required): a number to multiply

Rand

Returns a random number between the specified limits.

Synonyms:

Examples

Rand(0,3)
// returns 1.2749

Call Signatures

Return Type: double
Parameters:
  - lowerLimit (double, required): lower limit (inclusive)
  - upperLimit (double, required): upper limit (exclusive)

Subtract

Subtracts two numbers.

Synonyms: Sub

Examples

Subtract(5,3)
// returns 2

Call Signatures

Return Type: double
Parameters:
  - number (double, required): number to subtract from
  - number (double, required): number to subtract

Divide

Divides two numbers.

Synonyms: Div

Examples

Divide(6,3)
// returns 2

Call Signatures

Return Type: double
Parameters:
  - numerator (double, required): number to divide
  - denominator (double, required): number to divide by

Remainder

Returns the remainder when dividing.

Synonyms: Mod, Modulo, Modulus, Rem

Examples

Remainder(5,4)
// returns 1

Call Signatures

Return Type: integer
Parameters:
  - number (integer, required): number to divide
  - divisor (integer, required): number to divide by

Quotient

Returns the qoutient when dividing two numbers.

Synonyms: Quo

Examples

Quotient(5,4)
// returns 1

Call Signatures

Return Type: integer
Parameters:
  - number (integer, required): number to divide
  - divisor (integer, required): number to divide by

Power

Raises a number to a power

NOTE: in versions of JADE prior to 3.2.0 the order of the inputs was reversed, meaning the first parameter was the power and the second parameter was the number to raise to that power. This was a bug which is now fixed in JADE 3.2.0 and beyond.

Synonyms: Pow, PowerOfX

Examples

Power(2,3)
// returns 8

Call Signatures

Return Type: double
Parameters:
  - number (double, required): number to raise to a power
  - power (double, required): power to raise by

TimesPowerOfTwo

Returns a number multplied by a power of two.

Synonyms: ScaleByPowerOf2, ScaleByPowerOfTwo, TimesPowerOf2

Examples

TimesPowerOfTwo(6,3)
// returns 48

Call Signatures

Return Type: integer
Parameters:
  - number (double, required): number to multiply by
  - powerOfTwo (integer, required): power of two

IntegerInRange

Returns true if an integer is within a range, false otherwise.

Synonyms: IntInRange

Examples

IntegerInRange(0, 2, 3, false, false)
// returns true

Call Signatures

Return Type: boolean
Parameters:
  - lowerLimit (integer, required): min value
  - compare (integer, required): compare value
  - upperLimit (integer, required): max value
  - excludeLowerLiimit (boolean, required): exclude lower limit (defaults to false)
  - excludeUpperLimit (boolean, required): exclude upper limit (defaults to false)

DoubleInRange

Returns true if an integer is within a range, false otherwise.

Synonyms: DBLInRange, InRange

Examples

DoubleInRange(0, 2, 2.5, false, false)
// returns true

Call Signatures

Return Type: boolean
Parameters:
  - lowerLimit (double, required): min value
  - compare (double, required): compare value
  - upperLimit (double, required): max value
  - excludeLowerLiimit (boolean, required): exclude lower limit (defaults to false)
  - excludeUpperLimit (boolean, required): exclude upper limit (defaults to false)

IntegerCoerceIntoRange

Coerces an integer into a range.

Synonyms:

Examples

IntegerCoerceIntoRange(0, 3, 2, false, false)
// returns 2

Call Signatures

Return Type: integer
Parameters:
  - lowerLimit (integer, required): min value
  - compare (integer, required): compare value
  - upperLimit (integer, required): max value
  - excludeLowerLiimit (boolean, required): exclude lower limit (defaults to false)
  - excludeUpperLimit (boolean, required): exclude upper limit (defaults to false)

DoubleInRange

Returns true if an integer is within a range, false otherwise.

Synonyms: DBLInRange, InRange

Examples

DoubleInRange(0, 2, 2.5, false, false)
// returns true

Call Signatures

Return Type: boolean
Parameters:
  - lowerLimit (double, required): min value
  - compare (double, required): compare value
  - upperLimit (double, required): max value
  - excludeLowerLiimit (boolean, required): exclude lower limit (defaults to false)
  - excludeUpperLimit (boolean, required): exclude upper limit (defaults to false)

PowerOf10

Computes a power of 10.

Synonyms: Pow10, Power10

Examples

PowerOf10(3)
// returns 1000

Call Signatures

Return Type: integer
Parameters:
  - powerOfTen (integer, required): power of ten to compute

Increment

Increments a number (adds 1).

Synonyms: Inc, Plus1, PlusOne

Examples

Increment(3)
// returns 4

Call Signatures

Return Type: double
Parameters:
  - number (double, required): number to increment

Decrement

= number to decrement

decrements a number (subtracts 1).

Synonyms: Dec, Minus1, MinusOne

Examples

Decrement(3)
// returns 2

Call Signatures

Return Type: double
Parameters:
  - **** (double, required):

Sin

Computes the sine of a number.

Synonyms: Sine

Examples

Sin(0)
// returns 0

Call Signatures

Return Type: double
Parameters:
  - number (double, required): number to compute sine of

Cos

Computes the cosine of a number.

Synonyms: Cosine

Examples

Cos(0)
// returns 1

Call Signatures

Return Type: double
Parameters:
  - number (double, required): number to compute cosine of

Tan

Computes the tangent of a number.

Synonyms: Tangent

Examples

Tan( 0 )
// returns 0

Call Signatures

Return Type: double
Parameters:
  - number (double, required): number to compute tangent of

Sec

Computes the secant of a number.

Synonyms: Secant

Examples

Sec(1)
// returns 1.85081571768

Call Signatures

Return Type: double
Parameters:
  - number (double, required): number to compute secant of

Csc

Computes the cosecant of a number.

Synonyms: Cosecant

Examples

Csc(1)
// returns 1.18839510578

Call Signatures

Return Type: double
Parameters:
  - number (double, required): number to compute cosecant of

Cot

Returns the cotangent of a number.

Synonyms: Cotangent

Examples

Cot(1)
// returns 1.18839510578

Call Signatures

Return Type: double
Parameters:
  - number (double, required): number to compute cotangent of

Abs

Computes the absolute value of a number.

Synonyms: Absolute, AbsoluteValue

Examples

Abs(-2)
// returns 2

Call Signatures

Return Type: double
Parameters:
  - number (double, required): number to compute cotangent of

Round

Rounds a number to the nearest integer; if the value is midway between two integers, returns the nearest even integer.

Synonyms: Rnd

Examples

Round(1.2)
// returns 1

Call Signatures

Return Type: integer
Parameters:
  - number (double, required): number to round to nearest integer

Floor

Rounds a number down to the next lowest integer.

Synonyms: RoundDown

Examples

Floor(1.2)
// returns 1

Call Signatures

Return Type: integer
Parameters:
  - number (double, required): number to round down to the next lowest integer

RoundToDecimalPlace

Rounds a number to a decimal place.

Synonyms:

Examples

RoundToDecimalPlace(1.6666, 3)
// returns 1.667

Call Signatures

Return Type: double
Parameters:
  - number (double, required): number to round to specified decimal place
  - decimalPlaces (integer, required): decimal place to round to

TruncateAtDecimalPlace

Truncates a number at a decimal place.

Synonyms:

Examples

TruncateAtDecimalPlace(1.6666, 3)
// returns 1.666

Call Signatures

Return Type: double
Parameters:
  - number (double, required): number to truncate at specified decimal place
  - decimalPlace (integer, required): decimal place to truncate at

Ceil

Rounds a number up to the next highest integer.

Synonyms: Ceiling, RoundUp

Examples

Ceil(1.2)
// returns 2

Call Signatures

Return Type: integer
Parameters:
  - number (double, required): rounds up to the next highest integer

Sqrt

Returns the square root of a number.

Synonyms: SquareRoot

Examples

Sqrt(4)
// returns 2

Call Signatures

Return Type: double
Parameters:
  - number (double, required): number to take square root of

Square

Squares a number (multiplies it by itself).

Synonyms:

Examples

Square(4)
// returns 16

Call Signatures

Return Type: double
Parameters:
  - number (double, required): number to square

Reciprocal

Returns 1 divided by a number.

Synonyms: Reciprocate

Examples

Reciprocal(4)
// returns 0.25

Call Signatures

Return Type: double
Parameters:
  - number (double, required): number to reciprocate

Log

Returns the log (base 10) of a number.

Synonyms: Log10

Examples

Log(1)
// returns 0

Call Signatures

Return Type: double
Parameters:
  - number (double, required): number to compute log of (base 10)

ln

Returns the natural log (base e) of a number.

Synonyms: Log2

Examples

ln(1)
// returns 0

Call Signatures

Return Type: double
Parameters:
  - number (double, required): number to compute natural log of (base e)

Array

GenerateArray

Generates an array from an initial value, increment, and numElements.

Synonyms:

Examples

GenerateArray(0, 0.1, 5)
// returns [0, 0.1, 0.2, 0.3, 0.4]

Call Signatures

Return Type: array
Parameters:
  - initialValue (string, required): initial value
  - increment (string, required): the increment amount
  - numElements (integer, required): number of elements to put into the array

InArray

Returns true if a value is in an array, false otherwise.

Synonyms:

Examples

InArray(0, [0,1,2])
// returns true

Call Signatures

Return Type: boolean
Parameters:
  - value (string, required): the value to search for
  - array (array, required): the array to search in

RandomFromArray

Returns a random value from the array.

Synonyms:

Examples

RandomFromArray([0,1,2])
// returns 1

Call Signatures

Return Type: integer
Parameters:
  - array (array, required): array of elements from which to select a random value

ArrayToCSVRow

Returns a CSV row with data from an array.

Synonyms:

Examples

ArrayToCSVRow([0,1,2])
// returns 0,1,2

Call Signatures

Return Type: string
Parameters:
  - array (array, required): array to convert to CSV

ArraysIntersect

Returns the intersection of the arrays.

Synonyms:

Examples

ArraysIntersect([1,2,3], [0,1,2])
// returns true

Call Signatures

Return Type: boolean
Parameters:
  - array1 (string, required): array 1
  - array2 (array, required): array 2

ArraySize

Returns the size of the array.

Synonyms:

Examples

ArraySize([1,2,3])
// returns 3

Call Signatures

Return Type: integer
Parameters:
  - array (array, required): the array for which ato return the size

ArrayAND

Returns a logical AND applied to all elements of the array.

Synonyms:

Examples

ArrayAND([true, false, true])
// returns false

Call Signatures

Return Type: boolean
Parameters:
  - array (array, required): boolean array

ArrayOR

Returns a logical OR applied to all elements of the array.

Synonyms:

Examples

ArrayOR([true, false, true])
// returns true

Call Signatures

Return Type: boolean
Parameters:
  - array (array, required): array

ArrayIndex

Returns an element of an array at a specified index.

Synonyms:

Examples

ArrayIndex([1,2,3], 1)
// returns 2

Call Signatures

Return Type: integer
Parameters:
  - array (string, required): array
  - index (integer, required): index of desired value

ArrayAppend

Appends an element to an array.

Synonyms:

Examples

ArrayAppend([1,2,3], 4)
// returns [1,2,3,4]

Call Signatures

Return Type: array
Parameters:
  - array (string, required): array
  - value (integer, required): value to append

ArrayDeleteElement

Deletes an element from an array.

Synonyms:

Examples

ArrayDeleteElement([1,2,3], 1)
// returns [1,3]

Call Signatures

Return Type: array
Parameters:
  - array (string, required): array
  - index (integer, required): index of value to delete

ArrayReplaceElement

Replaces an element in an array.

Synonyms:

Examples

ArrayReplaceElement([1,2,3], 0, 4)
// returns [4,2,3]

Call Signatures

Return Type: array
Parameters:
  - array (string, required): array
  - append (string, required): value to append
  - **** (integer, required):

ArrayInsertElement

Inserts an element into an array.

Synonyms:

Examples

ArrayInsertElement([1,2,3], 0, 4)
// returns [4,1,2,3]

Call Signatures

Return Type: array
Parameters:
  - array (string, required): array
  - index (string, required): index to insert at
  - value (integer, required): value to insert

ArrayEqual

Returns true if two arrays are equal, false otherwise.

Synonyms:

Examples

ArrayEqual([1,2,3],[1,2,3], false)
// returns true

Call Signatures

Return Type: boolean
Parameters:
  - array1 (string, required): array 1
  - array2 (string, required): array 2
  - ignoreOrder (boolean, required): whether to ignore order (defaults to false)

Object

ObjectJoin

Joins two objects with a specified merge mode.

Synonyms: JSONJoin, JSONMerge, ObjectMerge

Examples

ObjectJoin("Upsert", {"test": 1}, {"other": 2})
// returns {"test": 1, "other": 2}

Call Signatures

Return Type: object
Parameters:
  - mode (string, required): join mode
  - object (object, required): json object
  - objectToJoin (object, required): json object

JSONEqual

Returns true if two objects (or the values at the specified paths) are equal, false otherwise.

Synonyms: ObjectEqual

Examples

JSONEqual({"test": 1}, {"test": 1}, "", "")
// returns true

Call Signatures

Return Type: boolean
Parameters:
  - object1 (object, required): json obj 1
  - object2 (object, required): json obj 2
  - path1 (string, required): path in json obj 1 (optional)
  - path2 (string, required): path in json obj 2 (optional)

Date and Time

GetDateTime

Returns a datetime string or time in seconds since 12:00 a.m., Friday, January 1, 1904, UTC Time [1904-01-01 00:00:00] if the first argument is the string “SecondsSinceEpoch”.

Synonyms:

Examples

GetDateTime("yyyy", true)
// returns 2018

Call Signatures

Return Type: integer
Parameters:
  - formatString (string, required): time format string or “SecondsSinceEpoch”
  - useUTC_or_Precision (boolean, required): UTC format? (boolean; if the first argument is a format) OR precision (double; if the first argument is SecondsSinceEpoch)

GetDateTimeStringFromSeconds

Gets the datetime string from a specified time in seconds since LabVIEW Epoch

Example: GetDateTimeStringFromSeconds(0, “yyyy-mm-ddThh.mm.ss.uuuZ”, true)

  • returns 1904-01-01T00.00.00.000Z

Note that ‘LabVIEW epoch’ time here refers to the number of seconds elapsed since 12:00 a.m., Friday, January 1, 1904, UTC Time [1904-01-01 00:00:00].

Synonyms:

Examples

GetDateTimeStringFromSeconds(0, "yyyy-mm-ddThh.mm.ss.uuuZ", true)
// returns 1904-01-01T00.00.00.000Z

Call Signatures

Return Type: string
Parameters:
  - secondsSinceLVEpoch (number, required): time in seconds since LabVIEW epoch
  - formatString (string, required): time format string
  - useUTC (boolean, required): a boolean where true means use UTC format

Wait

Waits a specified number of milliseconds.

Synonyms:

Examples

Wait(2000)
// returns value of the millisecond timer

Call Signatures

Return Type: string
Parameters:
  - milliseconds (integer, required): number to milliseconds to wait

GetTickCount

Returns the current count of an underlying millisecond counter.

Synonyms:

Examples

GetTickCount()
// returns value of the millisecond timer

Call Signatures

Return Type: string
Parameters:
  

System

GetDiskFreeSpace

Returns the free disk space on the specified drive.

Synonyms:

Examples

GetDiskFreeSpace("C:")
// returns 100392898560

Call Signatures

Return Type: integer
Parameters:
  - disk (string, required): a string representing the disk name to check for free space such as “C:”

ResolveSymbolicPath

Returns a resolved path by replacing symbolic path conponents within the specified in path.

Synonyms:

Examples

ResolveSymbolicPath("[Desktop]\some\path\file.txt")
// returns C:\Users\SomeUser\Desktop\some\path\file.txt

Call Signatures

Return Type: string
Parameters:
  - path (string, required): the path for which to resolve and replace symbolic path components

Data Type and Conversion

isNull

Returns true if a value is null.

Synonyms:

Examples

isNull(null)
// returns true

Call Signatures

Return Type: boolean
Parameters:
  - value (any, required): value to test if null

isBoolean

Returns true if a value is boolean.

Synonyms:

Examples

isBoolean(true)
// returns true

Call Signatures

Return Type: boolean
Parameters:
  - value (boolean, required): value to test if boolean

isNumber

Returns true if a value is a number.

Synonyms:

Examples

isNumber(10.7)
// returns true

Call Signatures

Return Type: boolean
Parameters:
  - value (double, required): value to test if number

isArray

Returns true if a value is an array.

Synonyms:

Examples

isArray([1,2,3])
// returns true

Call Signatures

Return Type: boolean
Parameters:
  - value (array, required): value to test if array

isObject

Returns true if a value is an object.

Synonyms:

Examples

isObject({"a": 1})
// returns true

Call Signatures

Return Type: boolean
Parameters:
  - value (object, required): value to test if object

ToDBL

Converts a number to a double.

Synonyms: ToDouble

Examples

ToDBL(2.3)
// returns 2.30000000000000000

Call Signatures

Return Type: double
Parameters:
  - number (double, required): number to convert

ToI64

Converts a number to an I64.

Synonyms:

Examples

ToI64(2.3)
// returns 2

Call Signatures

Return Type: integer
Parameters:
  - number (double, required): number to convert

ToU64

Converts a number to U64.

Synonyms:

Examples

ToU64(2.3)
// returns 2

Call Signatures

Return Type: integer
Parameters:
  - number (double, required): number to convert

ToI32

Converts a number to an I32.

Synonyms: ToInt

Examples

ToI32(2.3)
// returns 2

Call Signatures

Return Type: integer
Parameters:
  - number (double, required): number to convert

ToU32

Converts a number to a U32.

Synonyms: ToUInt

Examples

ToU32(2.3)
// returns 2

Call Signatures

Return Type: integer
Parameters:
  - number (double, required): number to convert

ToI16

Converts a number to an I16.

Synonyms:

Examples

ToI16(2.3)
// returns 2

Call Signatures

Return Type: integer
Parameters:
  - number (double, required): number to convert

ToU16

Converts a number to U16.

Synonyms:

Examples

ToU16(2.3)
// returns 2

Call Signatures

Return Type: integer
Parameters:
  - number (double, required): number to convert

ToI8

Converts a number to an I8.

Synonyms:

Examples

ToI8(2.3)
// returns 2

Call Signatures

Return Type: integer
Parameters:
  - number (double, required): number to convert

ToU8

Converts a number to a U8.

Synonyms:

Examples

ToU8("2.3")
// returns 2

Call Signatures

Return Type: integer
Parameters:
  - number (double, required): number to convert

ThermocoupleVoltageToCelcius

Converts a thermocouple voltage to degrees Celcius.

Synonyms: TCVoltageToCelcius

Examples

ThermocoupleVoltageToCelcius(2.3, "B")
// returns 42.5683

Call Signatures

Return Type: double
Parameters:
  - number (double, required): number to convert
  - type (string, required): thermocouple type, one of: B, E, J, K, N, R, S, T

CelciusToKelvin

Converts degrees Celcius to degrees Kelvin.

Synonyms:

Examples

CelciusToKelvin(10)
// returns 283.15

Call Signatures

Return Type: double
Parameters:
  - number (integer, required): number to convert

KelvinToCelcius

Converts degrees Kelvin to degrees Celcius.

Synonyms:

Examples

KelvinToCelcius(10)
// returns -263.15

Call Signatures

Return Type: string
Parameters:
  - number (integer, required): number to convert

KelvinToFarenheit

Converts degrees Kelvin to degrees Farenheit.

Synonyms:

Examples

KelvinToFarenheit(10)
// returns -441.67

Call Signatures

Return Type: string
Parameters:
  - number (integer, required): number to convert

CelciusToFarenheit

Converts degrees Celcius to degrees Farenheit.

Synonyms:

Examples

CelciusToFarenheit(-40)
// returns -40

Call Signatures

Return Type: double
Parameters:
  - number (double, required): number to convert

FarenheitToCelcius

Converts degrees Farenheit to degrees Celcius.

Synonyms:

Examples

FarenheitToCelcius(-40)
// returns -40

Call Signatures

Return Type: double
Parameters:
  - number (double, required): number to convert

FarenheitToKelvin

Converts degrees Farenheit to degrees Kelvin.

Synonyms:

Examples

FarenheitToKelvin(-40)
// returns 233.15

Call Signatures

Return Type: double
Parameters:
  - number (double, required): number to convert

U64UpperBytesAsU32

Returns the upper bytes of a U64 as a U32.

Synonyms:

Examples

U64UpperBytesAsU32(10000000000)
// returns 2

Call Signatures

Return Type: integer
Parameters:
  - number (integer, required): number to extract from

U64LowerBytesAsU32

Returns the lower bytes of a U64 as a U32.

Synonyms:

Examples

U64LowerBytesAsU32(10000000000)
// returns 1410065408

Call Signatures

Return Type: integer
Parameters:
  - number (integer, required): number to extract from

I64UpperBytesAsU32

Returns the upper bytes of a I64 as a U32.

Synonyms:

Examples

I64UpperBytesAsU32(10000000000)
// returns 4294967293

Call Signatures

Return Type: integer
Parameters:
  - number (integer, required): number to extract from

I64LowerBytesAsU32

Returns the lower bytes of a I64 as a U32.

Synonyms:

Examples

I64LowerBytesAsU32(10000000000)
// returns 2884901888

Call Signatures

Return Type: integer
Parameters:
  - number (integer, required): number to extract from

U32UpperBytesAsU16

Returns the upper bytes of a U32 as a U16.

Synonyms:

Examples

U32UpperBytesAsU16(100000)
// returns 1

Call Signatures

Return Type: integer
Parameters:
  - number (integer, required): number to extract from

U32LowerBytesAsU16

Returns the lower bytes of a U32 as a U16.

Synonyms:

Examples

U32LowerBytesAsU16(100000)
// returns 34464

Call Signatures

Return Type: integer
Parameters:
  - number (integer, required): number to extract from

I32UpperBytesAsU16

Returns the upper bytes of a I32 as a U16.

Synonyms:

Examples

I32UpperBytesAsU16(-100000)
// returns 65534

Call Signatures

Return Type: integer
Parameters:
  - number (integer, required): number to extract from

I32LowerBytesAsU16

Returns the lower bytes of a I32 as a U16.

Synonyms:

Examples

I32LowerBytesAsU16(-100000)
// returns 31072

Call Signatures

Return Type: integer
Parameters:
  - number (integer, required): number to extract from

U16UpperBytesAsU8

Returns the upper bytes of a U16 as a U8.

Synonyms: U16UpperByteAsU8

Examples

U16UpperBytesAsU8(300)
// returns 1

Call Signatures

Return Type: integer
Parameters:
  - number (integer, required): number to extract from

U16LowerBytesAsU8

Returns the lower bytes of a U16 as a U8.

Synonyms: U16LowerByteAsU8

Examples

U16LowerBytesAsU8(300)
// returns 44

Call Signatures

Return Type: integer
Parameters:
  - number (integer, required): number to extract from

I16UpperBytesAsU8

Returns the upper bytes of a I16 as a U8.

Synonyms: I16UpperByteAsU8

Examples

I16UpperBytesAsU8(-300)
// returns 254

Call Signatures

Return Type: integer
Parameters:
  - number (integer, required): number to extract from

I16LowerBytesAsU8

Returns the lower bytes of a I16 as a U8.

Synonyms: I16LowerByteAsU8

Examples

I16LowerBytesAsU8(-300)
// returns 212

Call Signatures

Return Type: integer
Parameters:
  - number (integer, required): number to extract from

CharToByte

Returns the value of the byte corresponding to the character (specified by index) in the supplied string

CharToByte(“AB”, 1)

  • returns 66 (since B has underlying byte value 66).

Synonyms: CharToU8

Examples

CharToByte("AB", 0)
// returns 65

Call Signatures

Return Type: integer
Parameters:
  - string (string, required): a string
  - index (integer, required): index of character to convert

BytesToString

Converts a byte array to a string.

Synonyms:

Examples

BytesToString([65,66])
// returns AB

Call Signatures

Return Type: string
Parameters:
  - bytes (array, required): byte array

HexEncodeString

Hex encodes a string.

Synonyms:

Examples

HexEncodeString("AZ")
// returns 415A

Call Signatures

Return Type: string
Parameters:
  - string (string, required): string to hex encode

HexEncodedCharToByte

Returns the decimal value of a byte defined by a hex encoded character.

Synonyms: HexEncodedCharToU8

Examples

HexEncodedCharToByte("41")
// returns 65

Call Signatures

Return Type: integer
Parameters:
  - charHexEncoding (string, required): a hex encoded character represented as a string (ex. 41 means B)

GetByteAtPosition

Gets the byte at a specified position in an integer

Note: as an example, think of the value 5 represented as a 16-bit integare as the two bytes 00000000 00000101.

Synonyms:

Examples

GetByteAtPosition(5, 0)
// returns 5

Call Signatures

Return Type: integer
Parameters:
  - integer (string, required): an integer
  - byteIndex (integer, required): index of byte to extract

StringToBytewiseXORHexString

Converts a strint to a bytewise XOR hex string.

Synonyms:

Examples

StringToBytewiseXORHexString("CSTLT,+0996.83,+0001.94,-0057.47,+093.300,+000.112,+028.0")
// returns 5B

Call Signatures

Return Type: string
Parameters:
  - string (string, required): string to convert

Math and Physics Constants

Pi

Returns the value of pi.

Synonyms:

Examples

Pi()
// returns 3.14159265358979311

Call Signatures

Return Type: double
Parameters:
  

e

Returns the value of e.

Synonyms:

Examples

e()
// returns 2.71828182845904509

Call Signatures

Return Type: double
Parameters:
  

SpeedOfLight

Returns the value of the speed of light in meters per second.

Synonyms:

Examples

SpeedOfLight()
// returns 299792458

Call Signatures

Return Type: integer
Parameters:
  

GravitationalConstant

Returns the value of the gravitational constant.

Synonyms: G

Examples

GravitationalConstant()
// returns 6.6742E-11

Call Signatures

Return Type: double
Parameters:
  

AvogadrosNumber

Returns Avogadros Number.

Synonyms: Avogadro

Examples

AvogadrosNumber()
// returns 6.0221415E+23

Call Signatures

Return Type: double
Parameters:
  

p

Returns Planck’s constant.

Synonyms: Planck

Examples

p()
// returns 6.6260693E-34

Call Signatures

Return Type: double
Parameters:
  

ElectronCharge

Returns the charge of an electron.

Synonyms:

Examples

ElectronCharge()
// returns 1.60217653E-19

Call Signatures

Return Type: double
Parameters:
  

Rydberg

Returns Rydberg’s constant.

Synonyms:

Examples

Rydberg()
// returns 10973731.56853

Call Signatures

Return Type: double
Parameters:
  

MolarGasConstant

Returns the Molar Gas constant.

Synonyms:

Examples

MolarGasConstant()
// returns 8.314472

Call Signatures

Return Type: double
Parameters:
  

On this Page