Reading RDM with e:script

RDM (Remote Device Management) is a remote management protocol on top of DMX and allows bidirectional communication with fixtures. You can read system values and status, and depending on the type of fixture you can set DMX addresses and other parameters. The Programmer of the Lighting Application Suite has a complete implementation of ANSI E1.20, Remote Device Management on board. With the coming LAS 6.1 you can read RDM values in fixtures and use them as Autotext (similar to time, astronomical times, system parameters) in the Action Pad.

You can also use the RDM API in the Programmer in e:script, which allows very flexible and custom-specific functions. Here is an example script how the RDM API can be used to check fixture temperatures.

// --------------------------------
// checkTemperature script comment
// --------------------------------

int sensorId = 7; // id of temperature sensor
int temperatureMax = 80000; 
              // commonly given in m°C so 80000 is 80°C
string deviceId;
int li = CreateRdmDeviceList();
int deviceCount = GetRdmDeviceCount(li);

// iterate all rdm devices
int i;
for (i = 0; i < deviceCount; i++)
{
     deviceId = GetRdmDeviceId(li, i);
     printf("deviceId = %s\n", deviceId);
     checkTemperature(deviceId);
}
DestroyRdmDeviceList(li);

// checks if temperature value from sensor 
// is within allowed range
function checkTemperature(string deviceId)
{
     int t = GetRdmSensorValue(deviceId, sensorId);
     printf(" %s %d\n", deviceId, t);
     if (t > temperatureMax)
     {
          // do something if temperature too high
          alert("Warning: temperature of device %s is > %d!\n", 
                                   deviceId, temperatureMax);
     }
}

Leave a Reply

Your email address will not be published. Required fields are marked *