Help with writing script

Hello,

I am trying to change the script within the (click) mute button on the alarm banner,

I have created a module that resides in AREA_A and I'm trying to write to the module every time the mute button is pressed, thus logging the event.

I need help with exactly what to write, I currently have the following in the script but it is not working,

Private Sub SilenceHorn_Click()

WriteValue strSILENCEHORNVal, "AREA_A/" & strWSName & "ALM_BELT/SILENCEHORN.F_CV",1

The input parameter I'm trying to write to is AREA_A/ALM_BELT/SILENCEHORN

Thanks for any help

  • try this
    Private Sub SilenceHorn_Click()

    frsWriteValue "1", "DVSYS.ALM_BELT/SILENCEHORN.F_CV"
  • In reply to TreyB:

    This didn't work either, I also tried "DVSYS.AREA_A/ALM_BELT/SILENCEHORN>F_CV" and that didn't work
  • In reply to Lee W.:

    does the script execute correctly? Where is the problem? I'm assuming the script executes without fail and yet you don't see the parameter change value?
  • Is your syntax correct?  I’m reading “….SILENCEHORN>F_CV” and I think it should be “….SILENCEHORN.F_CV”.  That “>” seems out of place.
     
  • The out of the box alarm banner on my system has the script below to silence the horn and I have added the logic in red to write a "1" to a SILENCEHORN parameter in a module named ALM_BELT. As long as this ALM_BELT module is downloaded, setup data has been downloaded on all the nodes and the parameter SILENCEHORN has the "Control" security key assigned, this should work.

    Private Sub bmpAckHorn_Click()
      On Error GoTo ErrorHandler
      frsCommonTasks "HornSilence"
      frsWriteValue "1", "DVSYS.ALM_BELT/SILENCEHORN.F_CV"
      Exit Sub
    ErrorHandler:
      frsHandleError
    End Sub

    If this doesn't work and you get an error, check that the area is assigned to that node and the user has the proper parameter security locks for the SILENCEHORN parameter (may have to logoff and back in if security was changed and downloaded).

  • In reply to Steve Elves:

    Yes that was a typo, the script does not have errors but the parameter does not change, it may be something else I'm not doing.
  • In reply to Matt Stoner:

    Thanks Matt, this works perfectly.