grandMA3 User Manual Publication

GetDMXValue(integer[, integer, boolean])

grandMA3 User Manual » Plugins » Lua Functions - Object-Free API » GetDMXValue(integer[, integer, boolean])
Version 2.0

Description

The GetDMXValue Lua function returns a number indicating the DMX value of a specified DMX address.

Arguments

  • Integer:
    The integer is the DMX address.
  • Integer (optional):
    The integer is the universe number.
  • Boolean (optional):
    The boolean indicates if the returned value is in percent or DMX value.
    • True:
      The returned value is in percent. The range is 0 to 100.
    • False:
      The returned value is in DMX value. The range is 0 to 255.

Return

  • Integer:
    The returned integer value corresponds with the value of the selected DMX address.

Example

This example prints the value for DMX address 1 in Universe 4:

Lua
return function()
-- This prints the value of DMX address 1 in universe 4 in a range of 0 to 255
local address = 1 -- The DMX address
local universe = 4 -- The DMX universe
local percent = false -- Readout in percent or DMX value
local value = GetDMXValue(address, universe, percent)
Printf("DMX address %i.%03d is %03d", universe, address, value)
end