Topcon Communication Library

I wrote this library in 1994 on the hp48sx as a group of programs contained in a directory and converted them to a Library in 1996 when I got a GX Apart from a few minor changes I have hardly altered any of the code since. The code is entirely in user code and I have no plans to change to Sys RPL as I believe "If it aint broke it don't need fixun". I make no claim to have used good programming practice in fact when I looked at the programs tonight I cringed a little. I use a 48GX and cant guarantee that it will work on a 48sx. Does any one still use the SX?

I have used this library to communicate with the following TOPCON instruments, G303, GTS3B, GTS3C, GTS4, GTS6 with out problems. I use HMS and metric units so cannot say if the program will work with feet or grads, mills etc

Installation 
Download the library to your 48G
Place the library on the Stack 
Hit enter 0 STO
Purge the original library variable and turn the 48 off and then back on.
Go to the library menu, select TOP2 and hit Setup

The INSTPAR variable
Running the setup program will create a list variable in the HOME directory containing a list of pointers to the various interface programs. I apologize for this roundabout way of doing things but it allows me to quickly switch to Sokkia gear by running a similar setup program in the Sokkia library, which overwrites INSTPAR with a set of pointers for the SET3. As all my programs use the INSTPAR variable to take a measurement they are independent of what type of instrument is in use. To use the library this way you need a small piece of code such as  \<<  INSTPAR 1 GET EVAL  \>> This would take an all data observation using the first pointer in INSTPAR. Alternatively if you only use Topcon gear you can use the Library commands directly. These are outlined below.

Topco.48g
Purpose			Take an all data observation with the Topcon
Arguments		A point no
Results			{ 1   PointNo   SlopeDist  VerticalAngle  HorzAngle  }
INSTPAR location	1
Notes	I have used one flag here. If flag 26 is clear a coarse distance measurement is taken, if set a fine distance is taken.
             
Topameas.48g
Purpose			Take an angles only observation with the Topcon
Arguments		A point no
Results			{ 1   PointNo   0  VerticalAngle  HorzAngle  }
INSTPAR location	2

Tophset.48g
Purpose			Sets the H circle on the Topcon
Arguments		A bearing to set in HMS
Results			None
INSTPAR location	3

Topcoset.48g
Purpose			Sets the internal station coords on the Topcon
Arguments		Level 2	A station list in the form  { No  Easting  Northing  Elevation }
			Level 1	The Number 1
Results			None
INSTPAR location	4
Notes		As my Topcon only allows upload of the instrument coordinates if you supply a number other than 1 nothing will happen. Number 2 is intended for upload of Back sight details and number 3 for Setting out point details. Again not on my instrument but was possible on the Sokkia I used to use.

Known Bugs
When using the GTS3 for angles only, the total station often errors out, however the 48 still receives the correct data so I haven't bothered to fix this as I rarely observe angles only and don't have access to this instrument anymore. I suspect it is a problem with the delay before sending the ACK.

Cable
I had my local Topcon dealer make me up an adapter cable to suit the standard 48 to IBM cable. The first attempt using the standard IBM pin numbers didn't work but worked after we swapped the RX and TX wires over. The final wiring on the Topcon plug was 
Topcon Pin		IBM Pin		Colour
1			2		Red
3			3		Yellow
4			5		White
Your colours may be different.

Disclaimer 

I have written and used these programs extensively over a period of years, despite regular use and checking it is possible that undetected errors remain, I can therefore take no responsibility for the use of these programs or any subsequent claims arising from their use. The software is provided "as-is" without warranty of any kind. Should the software prove to be defective you assume the full cost of any repairs or corrections necessary.

Contact Details

I have mined the various HP 48 sites for many useful programs over the last year since I got net access. This is my first attempt at posting something in return. You are free to use it as you wish for non-commercial purposes and to distribute it as you wish. If you do distribute them please attach these instructions and include the above disclaimer. Should you wish to use them commercially please contact me and I will tell you which type of Beer I prefer. I would also be glad to receive any comments, bug reports etc. and programs for working other surveying equipment. I am currently working on a Garmin GPS library.

My email is mikemori@rivernet.com.au.

Regards

Mike Morris   Sydney Australia May 1999


