Dhd pfl

I want my DHD PFL button to activate when I click with my mouse on the PFL button in player 1 (but also player 2, 3 and Cartwall).

The logic value of the PFL button of Player 1 is 758.

I created this script and put it in the Background Scripts of mAirList.

procedure OnPlayerPFLOn(PlaylistIndex: integer; PlayerIndex: integer; PFLCount: integer);
begin
  if (PlayerIndex = 1-1) then
     DHDRemote(0).SetLogic(758, true);
end;

procedure OnPlayerPFLOff(PlaylistIndex: integer; PlayerIndex: integer; PFLCount: integer);
begin
  if (PlayerIndex = 1-1) then
     DHDRemote(0).SetLogic(758, false);
end;

When I now mouseclick on the PFL button of player 1 the PFL button on my DHD gets activated, but the PFL gets activated an unlimited number of times, I think mAirList will crash in the end because the program is unresponsive at that time.

What am I doing wrong?

PFL logic are read-only in DHD. In order to toggle PFL for the channel, you must use the SETPFL message, i.e the SetPFL method:

DHDRemote(0).SetPFL(1, true);

where 1 is the fader number.

For the RM4200D and 52, you can also use channel numbers by adding $1000 to the fader number. For the RM3200D, only fader numbers will work.

But actually the remote control should do that automatically for you if you put the correct fader or channel numbers into the configuration.

Thanks Torben, I do not exactly understand what you mean with “PFL logic are read-only in DHD”?

But I have setup my DHD differently, the PFL buttons, in my situation, are not setup as PFL in the DHD configuration. I don’t know exactly why I choose a different approach when I did setup the console but I had some problems with the PFL function. My PFL buttons are setup as a fader function and everything works as it should except for clicking the PFL button in the players of mAirList. But maybe, because of the way I have set it up, this is not possible.

DHDRemote(0).SetPFL(1, true);
Doesn’t work in my case.

Maybe there is another solution?

I’m afraid I cannot answer that question then, because my knowledge about the RM3200D is too limited.

No problem, hope someone else knows a solution. Otherwise I need to redo my config and try to get it to work the correct way.

I reconfigured my DHD for the PFL part, and now everything works with this script:

My players are on fader 3, 4 and 5. My cartwall is on fader 6. The default PFL device is on the cartwall fader, fader 6

//PFL button on DHD turns the PFL in mAirList on or off
procedure OnDHDCommand(Remote: IDHDRemote; ID: cardinal; Len: integer; Data0, Data1, Data2, Data3, Data4, Data5, Data6, Data7: byte);
begin
  if (ID = $516) AND (Data1 = 3) AND (Data2 = 1) then begin
    ExecuteCommand('PLAYER 1-1 PFL ON');
  end;
  if (ID = $516) AND (Data1 = 3) AND (Data2 = 0) then begin
    ExecuteCommand('PLAYER 1-1 PFL OFF');
  end;
  if (ID = $516) AND (Data1 = 4) AND (Data2 = 1) then begin
    ExecuteCommand('PLAYER 1-2 PFL ON');
  end;
  if (ID = $516) AND (Data1 = 4) AND (Data2 = 0) then begin
    ExecuteCommand('PLAYER 1-2 PFL OFF');
  end;
  if (ID = $516) AND (Data1 = 5) AND (Data2 = 1) then begin
    ExecuteCommand('PLAYER 1-3 PFL ON');
  end;
  if (ID = $516) AND (Data1 = 5) AND (Data2 = 0) then begin
    ExecuteCommand('PLAYER 1-3 PFL OFF');
  end;
  if (ID = $516) AND (Data1 = 6) AND (Data2 = 1) then begin
    ExecuteCommand('CARTWALL MODE PFL');
  end;
  if (ID = $516) AND (Data1 = 6) AND (Data2 = 0) then begin
        ExecuteCommand('CARTWALL MODE ON AIR');
  end;
end;

//Turns the DHD PFL Player button off when PFL is turned off with the mouse in mAirList
procedure OnPlayerPFLOff(PlaylistIndex: integer; PlayerIndex: integer; PFLCount: integer);
 begin
   if (PlaylistIndex = 0) and (PlayerIndex = 0) then
        DHDRemote(0).SetPFL(3, false, false);
 
   if (PlaylistIndex = 0) and (PlayerIndex = 1) then
        DHDRemote(0).SetPFL(4, false, false);

   if (PlaylistIndex = 0) and (PlayerIndex = 2) then
        DHDRemote(0).SetPFL(5, false, false);
 end;

//Turns the DHD PFL button automatically on at play in the mixeditor
procedure OnExtPFLOn(Item: IPlaylistItem; ExtPFLCount: integer);
begin
  if ExtPFLCount = 1 then 
    DHDRemote(0).SetPFL(6, true, false);
end;

//Turns the DHD PFL button automatically off at pause or closing of the mixeditor
procedure OnExtPFLOff(Item: IPlaylistItem; ExtPFLCount: integer);
begin
  if ExtPFLCount = 0 then 
    DHDRemote(0).SetPFL(6, false, false);
end;

//Turns the DHD Cartwall PFL button off when PFL is turned off with the mouse in mAirList 
procedure OnCartwallOnAirModeChange(OldMode, NewMode: TCartwallOnAirMode);
begin
  if NewMode = oamOnAir then
    DHDRemote(0).SetPFL(6, false, false);
end;

Hopefully usefull for more people.

1 Like