Home NetLinx Studio

DVX Relay control

colin@ITS[email protected] Junior MemberPosts: 8
I'm super confused.... I swear this was working last week and now it's failing.

Basically I'm using the relays to trigger an amp on and off... when the relay is closed the amp turns off...

So, as an example, I have this:
DEFINE_FUNCTION fnWatchBluRay()
{
  SEND_STRING dv402BluRaySerial, "'PON',$0D"
  SWITCH(nZoneSelect)
  {
    //lounge
    CASE 2:
    {
      PULSE[dv402TV,POWER_ON]
      SEND_LEVEL    dv402SwitcherOut2,1,30 //volume to 30
      SEND_COMMAND     dv402Switcher, "'CI4O2'"  //input 4 to output 2
      SEND_COMMAND     dv402Switcher, "'CI4O1'"  //mirrored to conf
      nLoungePowerOn     = 1
      OFF[dvDVXRelay,1]
    }
    //deck
    CASE 3:
    {
      
      SEND_LEVEL    dv402SwitcherOut3,1,30 //volume to 30
      SEND_COMMAND     dv402Switcher, "'CI4O3'"  //input 4 to output 3
      nDeckPowerOn     = 1
      OFF[dvDVXRelay,2]
    }
  }
}

and then the off function-
DEFINE_FUNCTION fnPowerDnLounge()
{
  
  IF (nDeckPowerOn = 1)
  {
    SEND_COMMAND  dvTP_iPad,"'PAGE-Main-Deck'"
    nZoneSelect = 3
  }
  ELSE
  {
    SEND_COMMAND  dvTP_iPad,"'PAGE-Logo'"
    nZoneSelect = 2
  }
  SEND_COMMAND     dv402Switcher, "'CI0O2'"
  nLoungePowerOn = 0
  ON[dvDVXRelay,1]
}

If I telnet into the master I can run ON[dvDVXRelay,1] and OFF[dvDVXRelay,1] and that works fine and peachy... until my functions run- then I can't turn the relays on or off via telnet (and they don't toggle via my functions)... even more baffling to me is in the notifications window when I call the fnPowerDnLounge... i get this-

Line 7 (11:30:22):: Feedback:On [5001:21:2] - Channel 1
Line 8 (11:30:22):: Output Channel:On - From [5001:21:2] - Channel 1

...even though the relay doesn't change. Other functions (video switching) still work....

Any advice would be greatly appreciated... I'm completely baffled!

Comments

  • MLaletasMLaletas Junior Member Posts: 226
    Show your definition of dvDVXRelay, also the feedback you gave shows as system 2, is your DVX assigned to 2?
  • colin@ITS[email protected] Junior Member Posts: 8
    Yeah, its setup as system two...

    The define device is:
    DEFINE_DEVICE
    
    
    dvDVXRelay    = 5001:21:2
    
  • Danny CampbellDanny Campbell Senior Member Posts: 311
    In your first function you turn off relay 2 when watching bluray on the deck but turn off relay 1 for the lounge . But in the deck off function you turn on relay 1. So I don't see the amp being turned on for the deck.

    Danny
  • colin@ITS[email protected] Junior Member Posts: 8
    Danny- I have relay 1 setup for the lounge amp and relay 2 setup for the deck amp. I have a similar function for the deck- fnPowerDownDeck that does something similar but does ON[dvDVXRelay,2 ]...
  • colin@ITS[email protected] Junior Member Posts: 8
    huh, well I did a factory reset and now its working again... same code.
Sign In or Register to comment.