IO Commander

Controlling your Model Railroad from a PC.


Rev. February 1999


New version 1.6 Windows interface driver IOWDDE.EXE

This new DDE driver makes it possible to run standalone or client/server using COM1. The command to start iodde is: IOWDDE16 IOWDDE.INI A sample IOWDDE.INI file is supplied.

IOWDDE16.EXE - Configuration

REM INITIALIZATION FILE FOR IODDE
REM REMOVE REM FROM NEXT LINE WITH INT, IF ONE COMPUTER OR COM1 IF CLIENT/SERVER 
REM DRIVER INT
REM DRIVER COM1
REM IODDE DEBUG 010
REM IODDE DEBUG 100
SHELL D:\io16\win\IOWT07 D:\IO16\WIN\IOTHR001.INI
SHELL D:\io16\win\IOWT07 D:\IO16\WIN\IOTHR002.INI
SHELL D:\io16\win\IOWT07 D:\IO16\WIN\IOTHR003.INI
LINKTOPIC 001 iowt07|iothr001
LINKTOPIC 002 iowt07|iothr002
LINKTOPIC 003 iowt07|iothr003 

This sample file is configured for starting three IOWT07.EXE files with corresponding ini files. Before using you have to decide if you are running standalone by removing REM from line 2, or client/server by removing REM from line 3

SHELL command are used to start programs. In this sample file three instances of IOWT07 is started and you are able to add the required number of lines

LINKTOPIC are used to give DDE LINKTOPIC name references to throtles. Add the necessary number of lines. Max is currently 10

Sample throtle Configuration for THROTLE 001 usind IOWDDE

rem test of throtle config
CONFIG THROTLE 000 001 001
CONFIG THROTLE 000 005 003
CONFIG DDE NAME 001
CONFIG DDE NAME 001 are used to set DDE linktopic to same name as in IOWDDE.INI file
Ref draft of Throttle User Guide for version 1.5 for more information

More information on Windows Interface from June 1997

Windows interfaces for IOEXEC can be done either with a client / Server interface or by installing a Interupt Driver that can be accessed by Windows on the same machine. Both of them requires a working setup of IOEXEC.COM. After getting ioexec.com up and running you have to install the interupt driver or network listener depending on your selected configuration.

Windows Interupt driver

Download Driver and testprogram
VBRUN30 (from Microsoft) is required.
VBASM.DLL should be copied to c:\windows

Windows interrupt driver is required to run a windows interface on top of ioexec.com on the same computer. You should have a DOS setup configured before testing this. Interruptdriver is installed on INT5 (Normally configured for printer 2, but seldom used)

 
;----------------------------------------------------------------
; Installation Guide :
;---------------------
; install IOEXEC by typing IOEXEC from DOS command prompt
; configure and start IOEXEC
;       (minimum for testing is:)
;               a:\ioterm97
;               CONFIG 18 2
;               EXIT
; install IOINT5 by typing IOINT5
; if required, start windows
;----------------------------------------------------------------
; Programming Guide :
;--------------------
;       IOINT5 has been developed to make it possible to access
;       IOEXEC using a interupt driven interface.  This is necessary
;       to integrate with windows programs.  IOINT5 can be accessed 
;       using INT5.  Parameters are sent in registers.
;
; sending commands to IOEXEC using ioint driver
;----------------------------------------------
; the correct sequence of commands is :
; logon
; send_char_to_buffer for 1,2,3... character until command is sent
; send_buffer_to_IOEXEC
; logoff
; 
; Reading commands from IOEXEC using ioint driver
;----------------------------------------------
; the correct sequence of commands is :
; logon
; read_IOEXEC_output_buffer
; get_char_from_output_buffer for 1 .. 50 character
; logoff
;
;
; function call parameters;
;--------------------------
; logon
;               always logon as first command
;       input parameters :
;               AH = 206
;       output parameters :
;               DX - logon handle
;               DH - logon id
;               DL - random number
;               BL - Return code
;               
; logoff
;               always logoff as last command
;       input parameters
;               AH = 202
;               DX - logon handle (use value returned from logon call)
;       output parameters
;               BL - return code
; Send_char_to_buffer
;               used to send one charachter of input command to buffer
;       input parameters
;               AH - character no ( 1..50 )
;               DX - logon handle (use value returned from logon call)
;       output parameters
;               BL - return code
; send_buffer_to_IOEXEC
;       input parameters
;               AH = 200
;               DX - logon handle (use value returned from logon call)
;       output parameters
;               BL - return code        
; read_IOEXEC_output_buffer
;       input parameters
;               AH = 107
;               DX - logon handle (use value returned from logon call)
;       output parameters
;               BL - return code (0: none commands in output buffer)
;                                (1: one command in output buffer)
; get_char_from_output_buffer
;       input parameters
;               AH = 108
;               CL - character no ( 1..50 )
;               DX - logon handle (use value returned from logon call)
;       output parameters
;               AL - ASCII value of char
;               BL - return code 
;               
;---------------------------------------------------------------
; Listing of Error codes returned in BL register
;------------------------------------------------
; 00 OK
; 01 one command in output buffer
; 10 none empty user slots
; 11 wrong id
; 12 wrong code
;----------------------------------------------------------------

Windows interrupt driver Test program

I have built a simple testprogram in Visual Basic to test the interrupt driver :





After you have loaded and configured ioexec.com and ioint5.com
you are ready to starte windows and iointt5.exe
iointt5.exe consists of two bottons and four fields:
one WRITE button and one WRITE field
one READ button and one READ field
two status fields - they will normally have value 0
Start by typing :
WRITE TEST
into the field to the right of the WRITE button
press the WRITE button
You have now sent the command WRITE TEST to IOEXEC.COM
IOEXEC.COM will respond by writing TEST to output buffer
press the READ button, to get the message TEST
if you got the message, you can start switching by typing
SWITCH 1 1 etc. and pressing the WRITE button


June 1998: Updated Driver and testprogram
io.bas (vb driver rutines) - are available - sample program uses:
Static Sub IOSSS (IOINTNO, IOMSG$, IOSTATUS)
Static Sub IOSSR (IOINTNO, IOMSG$, IOSTATUS)
IOSSS - IO Single Shot Send
IOSSR - IO Single Shot Receive

This is the simplest interface for a VB program to integrate with IO Commander. You just have to include io.bas in the project and call IOSSS when you want to send a message to IOEXEC. IOINTNO is interrupt number, you should use a Integer of 5. IOMSG$ is the message string, and IOSTATUS is error message no - usually 0.


Client / Server

This version requires a client/server setup to get windows support. Therefore you will need two Personal Computers with a serial cable connected to port 1 on both computers. Server runs IOEXEC.COM and IOSVR.EXE. Client run a Windows program. Currently available windows programs :
IOWIN101.EXE - Sample program for controlling turnout (switch) 1-9
VBRUN30 (from Microsoft) is required.


User guide Startup Server

1. Download Software
2. unzip server.zip
3. configure switching software (ref. Switching
4. start server : server.bat

User guide IOWIN101.EXE

1. Copy IOWIN101.EXE from SERVER.ZIP into Client machine
2. start program from Windows
3. use button (Open) to open serial port
4. use radio Group "Fast Switch" to switch turnout 1 - 5"
5. use switch 6 - 9 must switched by changing command field and using the (write) button to send
6. Use (close) and (exit) when finished



This page hosted by get your own Free Home Page
1