Previous Topic

Next Topic

Book Contents

Book Index

SLCom Overview: The demo project

We have included a demo project with the SLCom control. The best way to get started with the control is to explore the demo project.

The demo project is distributed with the SLCom control. It consists of a sample VB6 application using the control, plus a matching SPLat program.

The SPLat program is written for an MMi99 (or the older MMi88) (which has convenient front panel push button inputs). You can easily modify it to suit most standard SPLat boards by changing the EQUates and wiring a couple of external push button switches into your board.

The SPLat application is a nonsense program, designed to illustrate a few typical aspects of SPLatLink usage. It does the following:

  1. Rotates a single ON output around outputs 0-7, giving a moving spot effect. The speed of rotation depends on a memory variable (location 6), and can vary from 10mS to 2550mS per step. The output pattern is stored in Data Memory 0 to allow SPLatLink access with an MMi88 (SPLatLink in the MMi88 does not support the OutValue property).
  2. Responds to inputs iCountUP and iCountDN (two push buttons) by counting up or down a floating point counter located at 20-23.

Please study the program and experiment with it until you understand it. Make sure you don't permanently alter it!

The VB6 application implements a setup and control interface for the SPLat program. It has the following features:

  1. Connect and disconnect buttons.
  2. Display of the 8 rotating outputs. This has a choice of access method: Directly from the OutValue property for MMi99 or by storing an output image in Data Memory (RAM) if used with an MMi88.
  3. The ability to modify the rotation speed (step interval) and commit it to permanent memory with a PermStore operation.
  4. Display of the floating point counter, and a count reset button.
  5. Display of analog input C (AnInC). The MMi99 has an analog input, the MMi88 does not.
  6. A status display showing the connect state.

Because VB6 doesn't handle the movement of project files between folders, it is best to rebuild the project. Simply start a new exe project, remove the default form1 created by VB6 and then add the demo project's form1.frm. You may also have to re-insert the SLCom.ocx control. If VB6 somehow fails to load the control, you will find a picturebox control named SLCom1. Delete it, then add SLCom.ocx to the toolbar (right-click the toolbar and select Components..., from there find SLCom.ocx and check it). Then add an instance of SLCom to Form1.

There are a number of subtleties and refinements in the program. Have fun exploring them! There are also many features that could be added.

Here are a few things for you to explore:

Previous Topic

Next Topic