beautypg.com

Ample – ETS-Lindgren 2090 Controller User Manual

Page 79

background image

Model 2090 Multi-Device Controller

StartTime = Timer ' Read current timer count
While (Timer < StartTime + 3) ' Delay at least 3 sec for polarization
DoEvents ' Let Windows do other things
Wend

'
' Set up spectrum analyzer for max hold for horizontal scan here...
'
' Scan tower up with tower polarized horizontally
'
ibwrt Tower%, "UP" ' Send tower to top
Do ' Update display while waiting
ibwrt Tower%, "CP?" ' Query tower current position
ibrd Tower%, Read$ ' Read response
TowerEdit.Text = Val(Read$) ' Display number in edit box
'
' Update analyzer display here...
'
StartTime = Timer ' Read current timer count
While (Timer < StartTime + 0.1) ' Delay 0.1 second
DoEvents ' Let Windows do other things
Wend
ibwrt Tower%, "*OPC?" ' Is the tower done moving?
ibrd Tower%, Read$ ' Read response
TowerDone = Val(Read$) ' =1 if done, 0 if moving
Loop While Not TowerDone ' Until tower stops

ibwrt Tower%, "CP?" ' Query tower current position
ibrd Tower%, Read$ ' Read response
TowerEdit.Text = Val(Read$) ' Display number in edit box

'
' Move tower to vertical polarization upper limit before attempting
' to change polarization. (There is a one cm tolerance for polariz-
' ation violation, so we must be sure we're within that value or
' we'll cause an error when we try to polarize)
'

Do
ibwrt Tower%, "SK " + Str$(UpperVertLim) ' Move twr to upr vert lim

Do ' Update display while waiting
ibwrt Tower%, "CP?" ' Query tower current position
ibrd Tower%, Read$ ' Read response
TowerEdit.Text = Val(Read$) ' Display number in edit box
StartTime = Timer ' Read current timer count
While (Timer < StartTime + 0.1) ' Delay 0.1 second
DoEvents ' Let Windows do other things
Wend
ibwrt Tower%, "*OPC?" ' Is the tower done moving?
ibrd Tower%, Read$ ' Read response
TowerDone = Val(Read$) ' =1 if done, 0 if moving
Loop While Not TowerDone ' Until tower stops

ibwrt Tower%, "CP?" ' Query tower current position
ibrd Tower%, Read$ ' Read response
LastPosition = Val(Read$) ' Save this value
TowerEdit.Text = LastPosition ' Display number in edit box
Loop While (LastPosition > UpperVertLim + 1) ' Undershot target, retry

'
' Change polarization to vertical
'

©ETS-Lindgren, April 2006

79

Revision G– P#399199