forked from PKAstro/Gemini-2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathScript_terrestrial_mode.html
137 lines (112 loc) · 4.24 KB
/
Script_terrestrial_mode.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head profile="http://www.w3.org/2005/10/profile">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" href="ajxmenu.css" type="text/css">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta content="en-us" http-equiv="Content-Language" />
<title>A sample script to start put mount into terrestrial mode</title>
<link href="gemini-2.css" rel="stylesheet" title = "light" type="text/css">
<link href="gemini-2-dark.css" rel="stylesheet" title = "dark" type="text/css">
<script src="style_switcher.js"></script>
<link href="theme-selector.css" rel="stylesheet" type="text/css">
<script src="w3data.js"></script></head>
<body onload="set_style_from_cookie()">
<div w3-include-html="header.html" ></div>
<div class="AJXMenueDFaTFD" w3-include-html="navigation.html"></div><script>w3IncludeHTML();</script>
<table align="center" style="max-width: 900px; min-width: 200px;">
<tr>
<td class="h3">A sample script to start put mount into terrestrial mode</td>
</tr>
</table>
<table align="center" style="max-width: 900px; min-width: 200px;">
<tr>
<td class="style6">
This script is based on Microsofts Visual basic, but you do not have to
have Microsoft Visual basic to run or compile it, as Microsoft will
directly execute it from the desktop. You will have to have the
ASCOM Gemini.net driver pre-setup to the connect serial port or Ethernet
port. It does not have to be running. <br />
<br />
Just use Notepad to write
the script and save it as a .vbs file. It uses one of the Gemini-2
serial commands (in this case 135) that are listed
<a href="web/L5V2_1serial.html" target="_self">
here</a>. Note that the Web interface on your Gemini-2 has a page that
shows all the serial commands.<br />
<br />
Now if the ASCOM Gemini.net driver is already running when you double
click on the script, it should put the mount into terrestrial mode and disconnect
the driver from the mount.
But it will leave the Gemini.net Driver running.<br />
<br />
Now if the driver is not running, then the script will open it, connect to the mount,
put the mount into terrestrial mode, disconnect from the mount, and then close the driver.<br />
<br />
Basically, you need to shut down all running applications that connect
to the ASCOM Gemini.net driver before running this script, for it to
work correctly.<br />
<br />
</td>
</tr>
</table>
<table align="center" style="max-width: 900px; min-width: 200px;">
<tr>
<td class="style6">
This script should work on both the Gemini 1 and Gemini 2. It
however is only been tested on the Gemini-2.<br />
<br />
------- script below this line -------
<br />
<span class="style3"> <br />
dim scope<br />
Set Scope=CreateObject("ASCOM.GeminiTelescope.Telescope")<br />
scope.connected = False
<br />
wscript.Sleep 2000
<br />
scope.connected = True
scope.CommandBlind">135:", False
<br />
wscript.Sleep 2000<br />
scope.connected = False<br />
wscript.quit
<br />
<br />
<br />
</td>
</tr>
<tr>
<td class="style6">
------- script above this line -------
<br />
Please note: if you copy and paste this script, HTML characters will be
embeded into the code.<br />
You will have to remove them. They are <br /><br />
<br />
</td>
</tr>
</table>
<table align="center" style="max-width: 900px; min-width: 200px;">
<tr>
<td class="style6">
</td>
</tr>
</table>
<table align="center" style="max-width: 900px; min-width: 200px;">
<tr>
<td class="style6">
Here is a link to
<a href="javascript:localURL('downloads/VBscripts/terrestrial.zip')" target="_blank">download a zipped version</a>.
of Terrestrial.vbs</td>
</tr>
</table>
<table align="center" style="max-width: 900px; min-width: 200px;">
<tr>
<td class="style7">
<a href="scripting_examples.html" target="_self">Return to Scripting Commands</a></td>
</tr>
</table>
<link rel="stylesheet" href="ajxmenu_bottom.css" type="text/css">
<div w3-include-html="footer.html" ></div>
</body>