## DM84 General Commands

 actpre Active preset number baud Serial port baud rate default Set a memory preset to factory defaults defpre Location of the memory preset recalled on powerup desc Device description string exit Exit from Macro id Device id string macro Macro command macroti Macro title mode Master/Slave mode predesc Preset description premsk Default preset mask prerormac Preset "Run on Recall" Macro rank Rank of device in group of connected devices recall Recall a memory preset ropmac "Run on Powerup" macro run Run a macro serial Device serial number string sleep Suspend macro execution store Store settings to a memory preset location version Device firmware version

Termination: all commands are terminated with an ASCII carriage return character (hex code 0x0D), represented by <CR> in the examples below. All responses are terminated with an ASCII carriage return, line feed pair (hex codes 0x0D, 0x0A), represented by <CRLF> in the examples below. An ellipsis (...) represents members of an array that have been omitted from an example for the sake of brevity.

Verbose response: commands prefixed with an exclamation point (bang) character result in a "verbose" response containing the name of the property or action being addressed, along with the current values of the property in question. Property values are always returned in the "assignment" form, for example outmt(2)=1. This supports certain 3rd party control programming styles where the response to all responses needs to be self-describing and/or contain current property values.

Examples:

 REQUEST RESPONSE COMMAND !store(3) OK store(3) COMMAND !run={1,3,5} OK run={1,3,5} QUERY !ingn(3)? OK ingn(3)=0 QUERY !outmt(*)? OK outmt(*)={0,1,1,0} UPDATE !ingn(3)=0 OK ingn(3)=0 UPDATE !outmt(*)={0,1,1,0} OK outmt(*)={0,1,1,0}

### actpre (active preset)

This command may be used as a query to determine which memory preset is active (that is to say, which preset was last recalled from memory). The data is an integer type in the range 1 to 24. The active preset value may not be assigned directly, use the recall command instead.

Example:

 REQUEST RESPONSE QUERY actpre? OK 12

### baud (baud rate)

This command may be used as a query to determine the baud rate setting for the serial port. It may also be used as an update to set the baud rate. The data is an integer type. The following values are allowed:

• 9600
• 19200
• 38400
• 57600
• 115200

Examples:

 REQUEST RESPONSE QUERY baud? OK 57600 UPDATE baud=57600 OK

### default (default settings)

This command may be used to restore a memory preset to the factory defaults. The preset location to be modified is specified by using the address syntax. Addresses must be in the range 1 to 24. No data is transferred.

Example:

 REQUEST RESPONSE COMMAND default(3) OK

### defpre (default preset)

This command may be used as a query to determine the memory preset location used as the powerup default. It may also be used as an update to set the default preset. The data is an integer type in the range 0 to 24, where 0 has the special meaning "On powerup, the preset that was active when the unit was last powered down will be recalled".  This provides a "memory" capability useful for some applications, and is called the Last Preset  option.

Examples:

 REQUEST RESPONSE QUERY defpre? OK 11 UPDATE defpre=2 OK

### desc (description)

This command may be used as a query to read the user defined device description. It may also be used as an update to set the description. The data is a string type, with a limit of 32 characters.

Note: String arguments in commands need to be passed in quoted form, contained in a pair of double-quote (") characters. A problem arises when using the desc command to read or write a string that already contains double-quote characters, for example: The "Hula" Room. The solution is to escape the double quotes within The "Hula" Room so that it can be passed as a string argument for the desc command. This is done by preceding the double-quote characters with a backslash character like this:  The \"Hula\" Room. Now it can be passed as a string argument to the  desc command: desc="The \"Hula\" Room". Since the backslash serves as the escape character in quoted-string arguments, it too must be escaped if it is part of the string, so "foo\bar" would become "foo\\bar"

Examples:

 REQUEST RESPONSE QUERY desc? OK "Aloha Room East" UPDATE desc="Courtroom #12" OK

### exit (exit a macro)

This command may be used to exit a macro, usually from within a conditional (if-then-else) statement within the macro.

Example:

 REQUEST RESPONSE COMMAND exit OK

### id (device id)

This command may be used as a query to read the device id string. This is the "name" of the device used by the Lecnet2 protocol and is always "DM84". The data is a string type.

Example:

 REQUEST RESPONSE QUERY id? OK "DM84"

### macro (macro command)

This command may be used as a query to read one command from a macro, or as an update to set a command. The command is specified by using the 2 dimensional address syntax. Addresses for the first dimension specify the macro and must be in the range 1 to 128. Addresses for the second dimension specify the index of the command within the macro and must be in the range 1 to 64. The data type is string, with a limit of 110 characters.

Note: String arguments in commands need to be passed in quoted form, contained in a pair of double-quote (") characters. A problem arises when using the macro command to read or write a Lecnet2 command that already contains double-quote characters, for example the command desc="whatever", which contains the quoted string argument  "whatever". The solution is to escape the double quotes within desc="whatever" so that it can itself be passed as a string argument for the macro command. This is done by preceding the double-quote characters with a backslash character like this: desc=\"whatever\". Now it can be passed as a string argument to the macro command: macro(1,1)="desc=\"whatever\"". Since the backslash serves as the escape character in quoted-string arguments, it too must be escaped if it is part of the string, so  "foo\bar" would become "foo\\bar".

Examples:

 REQUEST RESPONSE QUERY macro(1,3)? OK "ingn(3)=55" QUERY macro(1,3)? OK "desc=\"embedded string\"" UPDATE macro(12,50)="xpmt(2,10)=1" OK UPDATE macro(12,50)="desc=\"embedded string\"" OK

### macroti (macro title)

This command may be used as a query to read the title of a macro, or as an update to set the title. The macro is specified by using the address syntax. Addresses must be in the range 1 to 128. The data type is string, with a limit of 30 characters.

Note: String arguments in commands need to be passed in quoted form, contained in a pair of double-quote (") characters. A problem arises when using the macroti command to read or write a string that already contains double-quote characters, for example: The "Hula" Room. The solution is to escape the double quotes within The "Hula" Room so that it can be passed as a string argument for the macroti command. This is done by preceding the double-quote characters with a backslash character like this:  The \"Hula\" Room. Now it can be passed as a string argument to the  macroti command: macroti(1,1)="The \"Hula\" Room". Since the backslash serves as the escape character in quoted-string arguments, it too must be escaped if it is part of the string, so  "foo\bar" would become "foo\\bar" .

Examples:

 REQUEST RESPONSE QUERY macroti(1)? OK "Sidebar nbr 2" UPDATE macroti(12)="Setup #3 West" OK

### mode (Master/Slave mode)

This command may be used as a query to determine if the DM84 is operating as a Master or as a Slave. It may also be used as an update to set the mode. Updates do not take effect until power is cycled on the device. The data type is integer, either "1" meaning Master mode, or "0" meaning Slave mode.

Examples:

 REQUEST RESPONSE QUERY mode? OK 0 UPDATE mode=0 OK

### predesc (preset description)

This command may be used as a query to read the user defined preset description for the active preset. It may also be used as an update to set the description. The data is a string type, with a limit of 60 characters.

Note: String arguments in commands need to be passed in quoted form, contained in a pair of double-quote (") characters. A problem arises when using the desc command to read or write a string that already contains double-quote characters, for example: The "Basic" setup. The solution is to escape the double quotes within The "Basic" setup so that it can be passed as a string argument for the desc command. This is done by preceding the double-quote characters with a backslash character like this: The \"Basic\" setup. Now it can be passed as a string argument to the desc command: desc="The \"Basic\" setup". Since the backslash serves as the escape character in quoted-string arguments, it too must be escaped if it is part of the string, so  "foo\bar" would become "foo\\bar".

Important: changes to this setting do not become permanent until the preset is stored to nonvolatile memory!

Examples:

 REQUEST RESPONSE QUERY predesc? OK "Wedding #1, no hallway speakers" UPDATE predesc="Weekly Rotary Club breakfast meeting." OK

### premsk (default preset mask)

This command may be used as a query to determine the default preset mask in effect for the active preset. It may also be used as an update to set the default mask. The preset mask is a number which determines whether or not certain mute and rear panel gain settings are preserved or overwritten when a preset recall occurs. The default mask is in effect unless overridden by the recall command. The data is an integer type formed by adding together one or more of the following values:

• 1  to preserve input channel rear panel gain settings
• 2  to preserve input channel mute settings
• 4  to preserve output channel rear panel gain settings
• 8  to preserve output channel mute settings
• 16 to preserve the state of programmable inputs
• 32 to preserve programmable input function definitions

For instance, to preserve input and output mutes on preset recalls, but not the rear panel gains, the mask value would be calculated as 2 + 8 = 10. A value of 0 means that the preset recall is "hard", with all mutes and rear panel gains overwritten by the values contained in the newly active preset.

Important: changes to this setting do not become permanent until the preset is stored to nonvolatile memory!

Examples:

 REQUEST RESPONSE QUERY premsk? OK 2 UPDATE premsk=5 OK

### prerormac (preset "run on recall" macro)

This command may be used as a query to determine the "run on recall" macro for the active preset . It may also be used as an update to set the macro. The data is an integer type in the range 0 to 128, where "0" has the special meaning "none". Note: this command available with DM84 firmware version 1.2.0 or higher only.

Important: changes to this setting do not become permanent until the preset is stored to nonvolatile memory!

Examples:

 REQUEST RESPONSE QUERY prerormac? OK 0 UPDATE prerormac=5 OK

### rank (rank in Lecnet2 chain)

This command may be used as a query to determine the rank of the unit within a chain in interconnected Lecnet2 devices. For instance, in a group of 3 devices, the "top" or "master" unit will be considered to have rank "1 of 3", while the last unit in the chain will have rank "3 of 3". The data type is array of integer, of size two. The first value indicates the position of the unit, the second indicates the number of devices in the chain.

Example:

 REQUEST RESPONSE QUERY rank? OK {1,2}

### recall (recall preset)

This command may be used to recall a memory preset, making it the active preset. The preset location to be recalled is specified by using the address syntax. Addresses must be in the range 1 to 24. If used as a simple command, no data is transferred, and the preset recall is controlled by the default preset mask. If used as an update, the data type is an integer whose value serves as the preset mask for the recall operation, overriding the default preset mask. See premsk.

Example:

 REQUEST RESPONSE COMMAND recall(3) OK UPDATE recall(4)=1 OK

### ropmac ("run on powerup" macro)

This command may be used as a query to determine the "run on powerup" macro for the DM84. It may also be used as an update to set the macro. The data is an integer type in the range 0 to 128, where "0" has the special meaning "none". Note: this command available with DM84 firmware version 1.2.0 or higher only.

Examples:

 REQUEST RESPONSE QUERY ropmac? OK 0 UPDATE ropmac=5 OK

### run (run a macro)

This command may be used to run a macro (an internally stored group of DM84 commands). A single macro may be run by using the command form. In this case the macro is specified by using the address syntax. Addresses must be in the range 1 to 128. More than one macro may be run with a single command by using the update form. In this case the data type is array of integer, with a variable length in the range 1 - 16. The values contained in the array specify which macros to run.

Example:

 REQUEST RESPONSE COMMAND run(3) OK UPDATE run={1,3,5} OK

### serial (serial number)

This command may be used as a query to read the device serial number. The data is a string type.

Example:

 REQUEST RESPONSE QUERY serial? OK "1234"

### sleep (suspend macro execution)

This command may be used as an update to suspend the execution of commands withing a macro for a fixed period of time specified in milliseconds. The data is an integer type in the range 0 to 30000.   This allows the the timing of a series of actions performed by a macro to be controlled.  option.

Examples:

 REQUEST RESPONSE UPDATE sleep=2000 OK

### store (store settings to preset)

This command may be used to store current settings to a memory preset. The preset location to be updated is specified by using the address syntax. Addresses must be in the range 1 to 24. No data is transferred.

Example:

 REQUEST RESPONSE COMMAND store(3) OK

### version (firmware version)

This command may be used as a query to read the device firmware version number. The data is a string type.

Example:

 REQUEST RESPONSE QUERY version? OK "1.0.1"