SPSD HELP

1. Introduction
2. Serial Communication Setup
3. Dial Up Procedures
4. Data Display
5. Customising the Alarm Display
6. Saving Data to File
7. Automatic Data Logging

1. INTRODUCTION

The SPS - TALK program is designed to allow a computer to communicate with the SPSD series solar power controllers.
This version requires an IBM compatible computer running Win 95, 98 or NT and a mouse. For communication over the telephone network a modem may also be required.

1.1  Program Functions
The program allows the user to communicate with a SPSD controller locally or at a remote location via a modem and some communication link.
The program is controlled by using the buttons on the coolbar at the top of the window. These buttons are arranged in five groups.
1.1a  Basic Functions
The three buttons on the left hand side are Exit, Language select and Help.
1.1b  Data Display Selection
The next four buttons allow the user to select which data from the SPSD is displayed on the screen.
When each window is opened, the appropriate data is retrieved from the SPSD controller. If you want to read the data from the SPSD again, click inside the data window. From the left, these buttons are:
Present State  -  shows the battery voltage, charge and load currents and amp hours and other information about the state which the controller is in now. To cause the data from the SPSD to be transferred again, click anywhere inside the present state window.
History -  displays the performance data logged each day by the SPSD. This is shown in graphical form.
Settings - displays and allows modification of the controllers settings.
Alarms - displays the state of the SPSD alarms.
1.2  Communications
The button with the modem image is used to set up the serial port for both direct and modem connection.
The button with the telephone on it is used to dial up a remote location via the switched telephone network. When a call is in progress, the button changes color.
1.3  Data Logging
The button with the clock face on it is for setting the automatic polling of an SPSD site and for saving the data retrieved.
The button with the disk on it is for use in saving the data reading to a file.
1.4  Site Selection
The SITE number selector choses which site number is addressed in the situation where many SPSD units are connected on a common bus. The controller whose site number setting matches the one on the screen will respond to the program's commands.
1.5  Status Bar
The bar at the bottom of the main program window is a status bar which shows information about the current state of the program. The panel at the left has a short description of the function of the control under the mouse arrow. The next panel has the date and time. The next two show the current serial port and baud rate. The panel on the right shows messages about the serial communication process. 

2. SERIAL COMMUNICATION SETUP  
 
To get a serial communication link to work, many parameters must be set up correctly. The SPSD controllers communicate at a fixed line speed with no hardware flow control. They do not include commands to handle modem setup. Hence, it is up to the computer end of the link to set up the communications.

2.1  Direct Communication
When the computer and the SPSD controller are close enough to allow communication without a modem, then the SPSD can be attached directly to a serial port on the computer.
To communicate in this way, the serial port communication speed (baud rate) must be set to be the same as that on the SPSD. The data format is 8 bits, No parity and 1 stop bit. This is set automatically by the program. The SPSD does not use hardware flow control and so does not provide a drive for the RTS, CTS, DSR and DTR lines of a standard RS232 port. If the port will not operate without these lines being active, then tie CTS to RTS and DTR to DSR at the computer end to force them into an active state.
The port being used and the communication speed can be set up in the menu available under the modem button.
The site number must also be set to match the site number set on the SPSD controller.
Select the fastest baud rate which will work. The slower baud rates will work better over longer distances.

2.2  Communication via a Modem
For longer distances, a modem is required to change the data into a form which is suitable for long distance transmission and to handle the connection. One modem is required at the computer end and one at the SPSD end.

2.2a  The SPSD End
The modem connected to the SPSD must be configured to communicate to the SPSD at the same baud rate as that set on the SPSD. This is normally done by sending the modem an AT command selecting a fixed line speed the same as the SPSD. Autobaud rate schemes may work. Turn off any error correction and compression features. Set the modem to autoanswer and switch into data mode when it detects carrier. Once the setup is correct, send a command to store the setup in the modem's memory.
Some modems do not have complete documentation on how to do this setup. The following information may help.
Almost all modems used now are 'Hayes compatabile', which means that they recognise a standard set of commands preceded by the letters AT.
To make the modem autoanswer, set register s0 to 2 or more. This can be done by sending the command string ATS0=2 to the modem from a terminal program on a computer.
To fix the connection speed to the SPSD at 2400 baud set s37=6. (send ATS37=6)
For 1200 set s37=5, and for 300 set s37=1.
To do the rest of the setup, send the string AT&D0&K0&M0&Q0&W0. This will turn off flow control, set asynchronous mode and the save the configuration data in the modems memory.

2.2b  The Computer End
In 32 bit versions of windows, modem control is best done using the TAPI services that are a part of windows. The user does not have to know anything about setting up the modem. In the modem setup window, the user can select TAPI mode by checking the box next to the TAPI label. If there is no TAPI device shown in the selected device window, then use the TAPI select button to open the ‘Device Selection’ box. (The name of the modem device may be in English) It is not necessary to select the modem port in TAPI mode.
On 16 bit versions without TAPI services, modems can be configured by sending the modem a setup string of AT commands. To not use TAPI, uncheck the TAPI box. When the TAPI box is unchecked, the modem setup string will be sent to the port number selected in the Modem Port box. The status panel will show a message if the setup is OK or not. The setup string sent to the computer end modem can be edited in the box at the bottom of the window. The modem commands available can be found in the manual for the modem. The string &K0&Q0&D0 works well on most modems. If the modem setup fails, it can be tried again by checking and then unchecking the TAPI mode check box.
The communication speed (baud rate) selected by the computer must match the speed set on the modem unless it has an autobaud rate facility enabled. Turn off any error correction and data compression features. 

3. DIAL UP PROCEDURES

To dial a remote site via a modem using TAPI, follow these steps.
a. Ensure that the TAPI mode box is checked in the modem setup window.
b. Press the dial button to open the dial up window.
c. Select the phone number to dial from the phone number list or enter a number in the phone number box.
d. Press the dial up button to start the call.
e. When the call has been connected, the status display will show 'connected' and the dial button will change color.
f. Now press cancel to close the dial window and use the rest of the program as for a direct connection.
g. To finish the call, open the dial window and press the 'Hang Up' button. There is a short delay while the modem disconnects. When the call is disconnected, the message TAPI closed is displayed and the dial button returns to its normal color.
Up to 16 phone numbers can be stored in the phone list. Each phone number has space on the left for a name.
For a non TAPI call, uncheck the TAPI box and proceed as above.

4. DATA DISPLAY

There are four data display windows that can be opened to view data from the SPS controller.

4.1  Current State
This window shows the state of the controller at the present time. It displays 6 pieces of data. These are: battery voltage, charge current, load current, maximum and minimum battery voltage for this day, charge and load amp hours for this days and the regulator switch state.
When the current state button is pressed, the computer sends a command to the SPSD controller to request that it send the current state data back to the computer. It puts up a red 'wait' message after it sends the request. If the data arrives correctly, the computer beeps, removes the wait notice and then displays the current state data.
To read the data again, click the mouse anywhere in the current state window.

4.2  History Data
This window shows the past performance of the controller for the last 32 days. The information displayed is charge and discharge amp hours and the maximum and minimum battery voltage. The information is shown in graphical form. By pressing the button at the top of the window, the user can change from the amp hour display to the voltage display.
The history data is sent in 8 segments and this can be seen on the progress bar on the wait message.
Day 1 is yesterday, and day 32 is 32 days ago. To read again, click inside the window.

4.3  Settings
This window displays the values of the control settings and also the calibration settings. It also allows the user to adjust these settings. Use the buttons at the top of the page to change between the control settings and the calibration settings. To read again, click on the part of the window with the setting names.

4.3a  Changing a setting
First click on the setting number to be changed. This will highlight the number.
Then click again to remove the highlight. Edit the number to the desired value. Then press return. This will cause the send arrow (top right corner) to change to green. The data is now ready to send. Click the green send arrow to send the new setting to the controller. The arrow goes red during send. After the send, the settings will be read back to the computer to check that the change has occured sucessfully.

4.4  Alarms
This window displays the state of the controller internal and external alarms. To read alarm state again, click the lower part of the window.
The alarm display consists of 13 buttons which display a graphic indicating which alarm it is and a colored indicator below this to indicate if the alarm is active or not. If the alarm is not active, the indicator is GREEN. When it becomes active, the indicators turns RED and then flashes (and beeps). The operator can stop the flashing (and beeping) by left clicking the button above the indicator. (Left clicking again will restart the flashing)

5. CUSTOMISING THE ALARM DISPLAY
The operation of the alarm display can be changed by the user. This is done by right clicking on the alarm button which is to be changed. This brings up a window with two choices. The top choice will disable that alarm. This makes it inactive and it shows as GREY. Clicking the top choice again will reactivate the alarm. Clicking the bottom choice will open the image assignment window.

The Assignment Window
In this window, a new image can be assigned to the alarm button. Click on the desired alarm image and it will become the new image for that button.
The user can also enable or disable the alarm sound and select how often the program will try to read the alarm data from the controller. If 5 min is selected, then the program will update the alarms every five minutes. If 'None' is selected, then the program will not automatically update the alarm information. If the program must dial the selected site each time it is to update the alarms then check the ‘dial up’ check box. The program will then dial the number selected in the dial button window, download the alarm data from site number currently selected and then hang up. Automatic alarm update can be used at the same time as periodic data logging is enabled. 

6. SAVING DATA TO FILE
The user can save a copy of the data to a file. Check the box of each data type that is to be saved. (If that data has not been read yet, then the check box is disabled) Then enter a filename (and path) in the space at the bottom of the window and press the save button. The saved information has the date and time at the start of each record. When the program saves, it adds the new data onto the end of the file if it exists already. The information in the file can be viewed by using the read button or a text editor such as word pad.

6.1 Printing Data
Press the print button to send the data to the default Windows printer.   

7. AUTOMATIC DATA LOGGING
The user can get the program to automatically read data from the controller and save it into a file. Check the box to enable the automatic data logging. Use the up/down arrows to select the time between reads and enter a file name for the data to be saved in. The number to the right of the filename is the number of hours remaining before the next read. Only the current state data is saved.
If the site must be dialed up via a modem, then check the dial up box. The telephone number to dial and the site number of the controller at the distant end must also be entered. Only one site can be set to automatically logging.
The main program file for this program is called spstalkc.exe.
The program retains its settings by using the Windows registry.
Helpengc.rtf, Helpfrnc.rtf and Helpchin .rtf are the various language help files. These help files can be viewed and printed with a normal text editor.