• Get involved.
    We want your input!
    Apply for Membership and join the conversations about everything related to broadcasting.

    After we receive your registration, a moderator will review it. After your registration is approved, you will be permitted to post.
    If you use a disposable or false email address, your registration will be rejected.

    After your membership is approved, please take a minute to tell us a little bit about yourself.
    https://www.radiodiscussions.com/forums/introduce-yourself.1088/

    Thanks in advance and have fun!
    RadioDiscussions Administrators

ARC-16 / AM-19 antenna monitoring-final resolution

Thanks to all for the suggestionsThe resolution was to re-write the script using a variable for phase and ratio.It has been running flawlessly for a week now.for those interested:======================================Const WIZ_ARC = "KHMO-AM"Const WIZ_PHASE = 15Const WIZ_RATIO = 16Dim WIZ_CONNDim T 'Connect to the ARC; if it can not connect, abort the scriptIf Not IsConnected(WIZ_ARC) Then If Connect(WIZ_ARC) <> "Connected" Then Message "Unable to connect to " & WIZ_ARC & ". Aborting script." EndScript End If WIZ_CONN = TrueEnd If Call TakeReading(13, True, 3, 2400, "Tower 4")Call TakeReading(13, False, 3, 2400, "Tower 1")Call TakeReading(14, True, 3, 2400, "Tower 2")Call TakeReading(14, False, 3, 2400, "Tower 3")Call TakeReading(15, True, 3, 2400, "Tower 5")Call TakeReading(15, False, 3, 2400, "Tower 6") Sub TakeReading(WIZ_CHAN, WIZ_RAISE, WIZ_DUR, WIZ_WAIT, WIZ_LABEL) Message "Tower readings: " = "WIZ_LABEL" IssueCommand WIZ_ARC, WIZ_CHAN, WIZ_RAISE, WIZ_DUR Wait 800 Dim VAR_PHASE Dim VAR_RATIO VAR_PHASE = NewValue(WIZ_ARC, WIZ_PHASE) VAR_RATIO = NewValue(WIZ_ARC, WIZ_RATIO) Message WIZ_LABEL & " Phase " & VAR_PHASE & " " & _ WIZ_LABEL & " Ratio " & VAR_RATIO If Time() >= Sunrise("KHMO") and Time() < Sunset("KHMO") Then T = "Day"Else T = "Night"End If If T = "Day" Then If WIZ_LABEL = "Tower 4" Then If VAR_RATIO < 0.950 or VAR_RATIO > 1.050 Then Raise WIZ_ARC, 16 End If ElseIf WIZ_LABEL ="Tower 1" Then If VAR_PHASE < 97 or VAR_PHASE > 103 Then Raise WIZ_ARC, 16 ElseIf VAR_RATIO < 0.851 or VAR_RATIO > 0.929 Then Raise WIZ_ARC, 16 End If ElseIf WIZ_LABEL = "Tower 6" Then If VAR_PHASE < 174 or VAR_PHASE > 180 Then Raise WIZ_ARC, 16 ElseIf VAR_RATIO < 1.045 or VAR_RATIO > 1.155 Then Raise WIZ_ARC, 16 End If End If ElseIf T <> "Day" Then If WIZ_LABEL = "Tower 4" Then If VAR_RATIO < 0.475 or VAR_RATIO > 0.525 Then Raise WIZ_ARC, 16 End If ElseIf WIZ_LABEL = "Tower 1" Then If VAR_PHASE < 159 Or VAR_PHASE > 165 Then Raise WIZ_ARC, 16 ElseIf VAR_RATIO < 0.447 or VAR_RATIO > 0.494 Then Raise WIZ_ARC, 16 End If ElseIf WIZ_LABEL = "Tower 2" Then If VAR_PHASE < 161 Or VAR_PHASE > 167 Then Raise WIZ_ARC, 16 ElseIf VAR_RATIO < 0.442 or VAR_RATIO > 0.488 Then Raise WIZ_ARC, 16 End If ElseIf WIZ_LABEL = "Tower 3" Then If VAR_PHASE < 0 Or VAR_PHASE > 5 Then Raise WIZ_ARC, 16 ElseIf VAR_RATIO < 0.489 or VAR_RATIO > 0.541 Then Raise WIZ_ARC, 16 End If ElseIf WIZ_LABEL = "Tower 5" Then If VAR_PHASE < 155 Or VAR_PHASE > 161 Then Raise WIZ_ARC, 16 ElseIf VAR_RATIO < 0.464 or VAR_RATIO > 0.516 Then Raise WIZ_ARC, 16 End If ElseIf WIZ_LABEL = "Tower 6" Then If VAR_PHASE < 156 Or VAR_PHASE > 162 Then Raise WIZ_ARC, 16 ElseIf VAR_RATIO < 0.475 or VAR_RATIO > 0.525 Then Raise WIZ_ARC, 16 End If End If End If 'Wait until the command has finished Wait ((WIZ_DUR * 1000) - WIZ_WAIT) +3000 End Sub
 
Word outta NAB says a new version will be sent out in a few days (weeks?)(months?); doing away with Visual Basic and allowing re-use of scripts written in the original ARC-16 dialect. Good thing; the "new" units at the station I work with are very close to being returned.
 
so did weit was a 'freebie' because we bought AP-2 within a couple weeks of the roll-out of AP-3I'm staying with AP-2 till I'm sure all is running correctly
 
Status
This thread has been closed due to inactivity. You can create a new thread to discuss this topic.


Back
Top Bottom