============================================================================== Virtual Serial Port Redirection & Server Software used to fix Remote Shutter Control Issue.
Recently I decided to work on some issues I had with the control of my shutters. One of the problems I have is while the domes shutters are motorized and capable of remote control, the computer that controls them is located in the house (the warm room), so the local observatory PC cant directly control the shutters. The shutters are controlled by software on the PC inside the house. I know that may sound odd but this setup was necessary because the Boltwood cloud and rain sensor is mounted on the house and the sensor is connected to the PC inside, so it made since at the time to have the shutter control system reside there also.
If I am physically inside the observatory and want to open or close the shutters, I have to log into the remote PC (using either Microsofts Remote Desktop or VNC) and then execute the shutter control program, or press and hold the manual toggle switches. Using the manual switches requires the automatic closure system first be disabled. That means the shutters won't auto-close if it the weather turns sour. This could lead to the equipment inside the observatory being damaged.
Another issue is during the winter months the observatory is mostly operated under computer control (it is to cold to be at the eyepiece). Sometimes scripts are executed from the observatory PC, they are used to control the scope, cameras and dome for unattended operations. When the session is finished and the script completes, it would be nice to have the shutters close.. automatically. I have setup a program that executes on the remote PC to schedule closure of the shutters. The program requires that a time be entered for the shutters to close. The means that I must try and calculate when the script controlling the scope will complete. As you can may have guessed that doesn't always work out. Miscalculations have caused problems, since there is no way to sync the script running on the observatory PC with the program running on the remote PC.
Recently I miscalculated and the shutters closed in the middle of my imaging session. Needless to say I was not a happy camper. After this last incident I started considering building another transmitter that would reside in the observatory. It would talk to the receiver that is mounted in the dome that controls the shutter motors. That is how the shutter control system works. The problem with that is I would need another serial port on the observatory PC, which I currently dont have. Also my USB ports are all in use, so another USB to serial converter is not an option. So I had to figure out another way.
The hurdle was getting the observatory PC to communicate with the wireless shutter control device attached to the com port of the house PC, without user intervention. The solution to the problem was installing the Fabula Tech software Network Serial Port Kit". The software is a serial port server that also has the ability to create virtual com ports and redirect their data. This allows the observatory PC to talk to and control, the serial device attached to the remote PC.
The software does this by assigning a user defined TCP/IP port number to the serial port of the remote PC. The remote PC is the serial port server. It will now listen for a connection on the TCP/IP port number the user defined. On the observatory PC a virtual com port was created. The observatory PC is the client. The virtual com port will redirect its data to the IP address and TCP/IP port number of the server computer the user specifies. The TCP/IP port numbers of the client and server must be a match.
The shutter control software which resides on the remote PC (house) is setup to use Com3. The normal procedure would be to execute the shutter control software on the remote PC. It would send a signal over the wireless link to the receiver in the dome, and the shutters would respond. After the installation of the serial port server software, the physical Com port #3 on the remote PC (IP address 192.168.1.12) was defined so it had a TCP/IP port number of 5423. The serial port server was then started.
On the observatory PC the serial port client software was installed, a copy of the Wireless Shutter control software was also installed. But Com3 was being used for dome rotation control, this meant the shutter control software on the observatory PC would have to be changed. Com6 was selected for use. Since there is no physical Com6 on the observatory PC the serial port client software was setup to create a virtual serial port.
During the configuration process the port was setup to redirect all the data it receives from the shutter control program on the observatory PC to TCP/IP address 192.168.1.12, port number 5423. This is the address of Com3 on the remote PC. The client will convert the serial data to TCP/IP packets and send it over the Ethernet connection that links the 2 PCs together. The server software will receive those TCP/IP packets, convert them back to serial data and deliver them to the Com3 serial port.
The shutter control software on the observatory PC has no idea it is not talking to the Com6 port on the local PC, it will just hum along exchanging data. The Client and Server can also be configured to communicate across the Internet so you can access a serial device in a truly remote location. In addition it can be configured to allow multiple connections to the device at the same time, reject all connections, or accept only the first connection it sees. (If you use the software to communicate with a serial device across the Internet give careful thought to your system security configuration.)
Because of the Network Serial Port Kit" I now have incorporated the shutter control commands into automated scripts on the observatory PC to open or close the shutters whenever needed. Three new programs where created to perform these functions. When called from the observatory PC the shutters can be placed in 1 of 3 states: " Fully Open", "Top Open Only" or "Closed". In addition, a new version of the original Shutter Control Software was also created. It was needed since the com port # was hard coded into the software. The virtual com port created on both the observatory and weather station differs in the com number from the physical com port.
Go to the JATObservatory Home page
- Please report broken links firstname.lastname@example.org
JAT Observatory 2006 All Rights Reserved