• 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

writing scripts for ARC-16 /AM-19 w AutoPilot 2

anyone here done it ?

I've written one to monitor operation and (hopefully) set a status if it gets out of whack (will know Monday, I wasn't brave enough to fire that part up with a weekend upon us) on the 6-tower I'm maintaining, but would like to see how others scripted it..........I based mine on one that Burk support wrote for me(now much modified)

please respond via e-mail with subject line "AM-19 script" or similar to

[email protected] so as not to plug up this board

Thanks

G
 
Too bad you're not running the DOS version (or maybe not...LOL) because I could have given you my mode for a 4 tower that was written in the late 80's by a genius (not me) and it still runs flawlessly to this day. However we have ripped thru some 5 computers since then....
James at tech support is real good but sometimes he takes a bit to get back to you. He always handles my stupid questions as if it were the most profound thing of the day.
G
 
> please respond via e-mail with subject line "AM-19 script"
> or similar to

But then none of us see the answers...the point of a message board is to share knowledge.

I have a script that switches between towers. Doesn't work 100% of the time, but it runs every 15 mins. ARC-16 has limit monitoring for transmitter stuff and I just log the rest since I'm pretty much watching my babies 24/7.

If Burk would release the protocol, I could make a bad ass script in my native language to open the com port directly. Same response from Burk that I got from Harris when I asked for the sunwatch protocol: drop dead, kid.

Const WIZ_ARC = "WHYL Transmitter"
Dim WIZ_CONN
Dim MsgLog

'Connect to the ARC; if it can not connect, abort the script
If 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 = True
End If

TakeLog WIZ_ARC

IssueCommand WIZ_ARC, 6, True, 20
Wait 9000
Dim T
T = NewValue(WIZ_ARC,6)
MsgLog = "Tower 1: " & T & "% /// "
Wait 12000

IssueCommand WIZ_ARC, 7, True, 20
Wait 10000
Dim TT
TT = NewValue(WIZ_ARC,7)
MsgLog = MsgLog & "Tower 2: " & TT & "% /// "
Wait 12000


IssueCommand WIZ_ARC, 8, True, 20
Wait 10000
MsgLog = MsgLog & "Phase Angle: " & NewValue(WIZ_ARC, 8) & " Deg /// "

Dim PhRatio
PhRatio = TT / T
Message MsgLog & "Tower Ratio: " & PhRatio

If WIZ_CONN = True Then Disconnect WIZ_ARC<P ID="signature">______________
</P>
 
> > please respond via e-mail with subject line "AM-19 script"
>
> > or similar to
>
> But then none of us see the answers...the point of a message
> board is to share knowledge.
>

OK, here's what I've written; the current problem is that it issues a Raise on Channel 16 (which in turn is wired to the 'status' input on 16) at EVERY tower 'comparison'

I think (watching the 'Event List' as it runs) that the sample grabbed is not 'settled' enough

any suggestions appreciated:

Const WIZ_ARC = "KHMO-AM"
Const WIZ_PHASE = 15
Const WIZ_RATIO = 16
Dim WIZ_CONN
Dim T

Call TakeReading(13, True, 3, 0, "Tower 4")
Call TakeReading(13, False, 3, 0, "Tower 1")
Call TakeReading(14, True, 3, 0, "Tower 2")
Call TakeReading(14, False, 3, 0, "Tower 3")
Call TakeReading(15, True, 3, 0, "Tower 5")
Call TakeReading(15, False, 3, 0, "Tower 6")

'Connect to the ARC; if it can not connect, abort the script
If 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 = True
End If

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 WIZ_WAIT
Message WIZ_LABEL & " Phase " & NewValue(WIZ_ARC, WIZ_PHASE) & _
WIZ_LABEL & " Ratio " & NewValue(WIZ_ARC, WIZ_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 NewValue(WIZ_ARC, WIZ_RATIO) < 0.950 or NewValue(WIZ_ARC, WIZ_RATIO) > 1.050 Then
Raise WIZ_ARC, 16
End If
ElseIf WIZ_LABEL ="Tower 1" Then
If NewValue(WIZ_ARC, WIZ_PHASE) < 97 or NewValue(WIZ_ARC, WIZ_PHASE) > 103 Then
Raise WIZ_ARC, 16
ElseIf NewValue(WIZ_ARC, WIZ_RATIO) < 0.851 or NewValue(WIZ_ARC, WIZ_RATIO) > 0.929 Then
Raise WIZ_ARC, 16
End If
ElseIf WIZ_LABEL = "Tower 6" Then
If NewValue(WIZ_ARC, WIZ_PHASE) < 174 or NewValue(WIZ_ARC, WIZ_PHASE) > 180 Then
Raise WIZ_ARC, 16
ElseIf NewValue(WIZ_ARC, WIZ_RATIO) < 1.045 or NewValue(WIZ_ARC, WIZ_RATIO) > 1.155 Then
Raise WIZ_ARC, 16
End If
End If

ElseIf T <> "Day" Then
If WIZ_LABEL = "Tower 4" Then
If NewValue(WIZ_ARC, WIZ_RATIO) < 0.475 or NewValue(WIZ_ARC, WIZ_RATIO) > 0.525 Then
Raise WIZ_ARC, 16
End If

ElseIf WIZ_LABEL = "Tower 1" Then
If NewValue(WIZ_ARC, WIZ_PHASE) < 159 Or NewValue(WIZ_ARC, WIZ_PHASE) > 165 Then
Raise WIZ_ARC, 16
ElseIf NewValue(WIZ_ARC, WIZ_RATIO) < 0.447 or NewValue(WIZ_ARC, WIZ_RATIO) > 0.494 Then
Raise WIZ_ARC, 16
End If

ElseIf WIZ_LABEL = "Tower 2" Then
If NewValue(WIZ_ARC, WIZ_PHASE) < 161 Or NewValue(WIZ_ARC, WIZ_PHASE) > 167 Then
Raise WIZ_ARC, 16
ElseIf NewValue(WIZ_ARC, WIZ_RATIO) < 0.442 or NewValue(WIZ_ARC, WIZ_RATIO) > 0.488 Then
Raise WIZ_ARC, 16
End If

ElseIf WIZ_LABEL = "Tower 3" Then
If NewValue(WIZ_ARC, WIZ_PHASE) < 0 Or NewValue(WIZ_ARC, WIZ_PHASE) > 5 Then
Raise WIZ_ARC, 16
ElseIf NewValue(WIZ_ARC, WIZ_RATIO) < 0.489 or NewValue(WIZ_ARC, WIZ_RATIO) > 0.541 Then
Raise WIZ_ARC, 16
End If

ElseIf WIZ_LABEL = "Tower 5" Then
If NewValue(WIZ_ARC, WIZ_PHASE) < 155 Or NewValue(WIZ_ARC, WIZ_PHASE) > 161 Then
Raise WIZ_ARC, 16
ElseIf NewValue(WIZ_ARC, WIZ_RATIO) < 0.494 or NewValue(WIZ_ARC, WIZ_RATIO) > 0.546 Then
Raise WIZ_ARC, 16
End If

ElseIf WIZ_LABEL = "Tower 6" Then
If NewValue(WIZ_ARC, WIZ_PHASE) < 156 Or NewValue(WIZ_ARC, WIZ_PHASE) > 162 Then
Raise WIZ_ARC, 16
ElseIf NewValue(WIZ_ARC, WIZ_RATIO) < 0.518 or NewValue(WIZ_ARC, WIZ_RATIO) > 0.572 Then
Raise WIZ_ARC, 16
End If

End If

End If

'Wait until the command has finished
Wait ((WIZ_DUR * 3000) - WIZ_WAIT) +3000


End Sub
 
> I have a script that switches between towers. Doesn't work
> 100% of the time, but it runs every 15 mins. ARC-16 has
> limit monitoring for transmitter stuff and I just log the
> rest since I'm pretty much watching my babies 24/7.

What version of AutoPilot are you running? The recent versions let you configure it to log anything you want it to.
 
> What version of AutoPilot are you running? The recent
> versions let you configure it to log anything you want it
> to.

2 something...installed it new last fall.<P ID="signature">______________
</P>
 
> > What version of AutoPilot are you running? The recent
> > versions let you configure it to log anything you want it
> > to.
>
> 2 something...installed it new last fall.
>

2 has been replaced by 3

but we bought 2 because management didn't want to wait.........
 
> 2 has been replaced by 3

Unless it's a compliance issue, I seriously doubt they'd want to upgrade.

Besides, tight budgets inspire creativity. The stuff I come up with is kinda neat.<P ID="signature">______________
</P>
 
> Besides, tight budgets inspire creativity. The stuff I come
> up with is kinda neat.

[Church Lady]

Well, isn't that special?

[/Church Lady]

:)
 
here is one for a 2 tower array.

'Phase and Ratio

'PHASE

'checks for "nite pattern" and take readings if so
'script runs hourly and only functions in nite pattern otherwise loops

If Status ("wxyz", 7) = True Then
'select tower 2
Lower "wxyz", 13, 3
Wait 1000
'p2 = phase tower 2
P2 = NewValue("wxyz", 9)
'check phase tower2 against license
If P2 > 180 or P2 < 175 Then
'print log message with value
Message "***wxyz PHASE IS BEYOND LIMITS***"
Message "TOWER 2 PHASE = " & (P2)
' could have a "raise alarm channel here"
'in AP3 you can paste phase into virtual channel and use limit monitors(i think)
Else
Message "wxyz Phase within limits :)"
End If

'RATIO

'selext tower 1 three times and take an average
Raise "wxyz" ,13, 6
Wait 2000
T1A = NewValue("wxyz", 10)
T1B = NewValue("wxyz", 10)
T1C = NewValue("wxyz", 10)


'select tower 2 three times and take an average
Lower "wxyz" ,13, 6
Wait 2000
T2A = NewValue("wxyz", 10)
T2B = NewValue("wxyz", 10)
T2C = NewValue("wxyz", 10)
't1 and t2 = the averages (you may need to put a delay between readings)
T1 = (T1A + T1B + T1C)/3
T2 = (T2A + T2B + T2C)/3
Dim Ratio
'calculate ratio and compare to license
Ratio = T2/T1
'ratio is the variable here
If Ratio > .9xx or Ratio < .7xx Then
'prints log message in log with value
Message "***wxyz RATIO IS BEYOND LIMITS***"
' could have a "raise alarm channel here"
'in AP3 you can paste ratio into virtual channel and use limit monitors(i think)
Message Ratio
Else
Message "wxyz Ratio within limits :)"
End If

Else
End If
Endscript

'repeat for each tower
<P ID="edit"><FONT class="small">Edited by HD_Ready on 04/17/06 02:50 AM.</FONT></P>
 
Status
This thread has been closed due to inactivity. You can create a new thread to discuss this topic.


Back
Top Bottom