IO Commander
Controlling your Model Railroad from a PC.
Rev. February 1998
Automation - Version 1.3 - November 1997 Edition
This software makes it possible to automate many, (if not all) operations
on a model rail road.
User guide software install
1. Download Software
2. unzip local.zip
3. configure switching software (ref. Switching )
3. configure timing in ioauto.ioc
4. start programs : local.bat
Running io2.bas
You will have to press (ESC) two times to get into main menu
commands in menu are (all are one Capital letters followed by [return])
C - Cancel - Exit
S - Change speed ratio (1 - aprox 10x, 2 - aprox 5x)
H - Change hours
M - Change minutes
T - Send message to IOEXEC
P - Program - Run commands from IOAUTO.IOC once
A - Auto - Run Program many times
T
examples :
SWITCH 1 0
BLOCK POKE 001 255
Descriptions:
SWITCH
BLOCK POKE
P
IOAUTO.IOC commands will start - usually waiting for clock
A
Run Program IOAUTO.IOC repeatable until you press (esc)
A message will be written on the screen - confirming (esc)
But program will finish current run, and then terminate
Example Configuration 1 - random running in circle :
This example is usefull for testing
You need one track circle connected to one block controller
WARNING : Hardware building instructions are not available yet
Schedule
01 minutes past hour : train will start running forward
10 minutes past hour : train will stop
15 minutes past hour : train will start running backward
30 minutes past hour : train will stop
35 minutes past hour : train will start running forward
50 minutes past hour : train will stop
IOAUTO.IOC
(This file is supplied in the zip file)
"REM TEST IOAUTO START V20"
"WAIT UNTIL MINUTE 01"
"BLOCK POKE 255 000"
"WAIT UNTIL MINUTE 10"
"BLOCK POKE 255 255"
"WAIT UNTIL MINUTE 15"
"BLOCK POKE 255 064"
"WAIT UNTIL MINUTE 30"
"BLOCK POKE 255 255"
"WAIT UNTIL MINUTE 35"
"BLOCK POKE 255 000"
"WAIT UNTIL MINUTE 50"
"BLOCK POKE 255 255"
"REM TEST IOAUTO END"
Example Configuration 2 - Pendeling Train :
This example is usefull for simple pendel train automation
You need two stations and one main line connected to three block
controllers
BLOCK 001 - STATION 1
BLOCK 002 - STATION 2
BLOCK 003 - MAIN LINE
Schedule
00 minutes past hour : train will run from station 1 to 2
30 minutes past hour : train will return from station 2 to 1
IOAUTO.IOC
"WAIT UNTIL MINUTE 00"
"BLOCK POKE 003 000"
"BLOCK POKE 002 255"
"BLOCK POKE 001 000"
"WAIT UNTIL MINUTE 30"
"BLOCK POKE 001 255"
"BLOCK POKE 003 064"
"BLOCK POKE 002 064"
Automation - Version 1.3 - January 1998 Edition
This is a improved version of the November 1997 Edition
However you should probably look at the November 1997 examples. The main diffence
between versions is block numbering (Nov 1997 adresses block 1,2,4,8,16,32,64 and 128
(in adition block 255 is all blocks ) -
Jan 1998 adresses block 1,2,3,4,5,6,7,8. You have to change block numbers in the
examples above if you want to try them with the new drivers)
Limitations
You have to load a dummy version ioexecud.com before ioexec.com
Supports control for 8 blocks in current configurations - this is easy to increase
Supports detect of max 8 blocks. This limit will be increased to at least 40
Generates block occupied and not occupied for every change (18.2 times pr. second).
Next release will have a counter to make shure that not occupied is not sent until
a configurable detects confirms status
Supports at least 99 turnouts
User guide software install
1. Download Software
2. unzip local.zip
3. configure switching software (ref. Switching )
4. configure adresses for block controller
3. configure timing in ioauto.ioc
4. configure autostartup in ioauto.cfg
5. start programs : autoexec.bat
configuring io5.bas
io5.bas starts by reading ioauto.cfg. ioauto.cfg consists of one
line in double brackets. Text must be one of :
"MENU"
"PROGRAM"
"AUTO"
"PROGRAM EXIT"
"AUTO EXIT"
MENU will start io5.bas in main menu.
PROGRAM and AUTO will do the same as the menu programs inio5.bas
EXIT will terminate io5 when program is finished
Running io5.bas
You will get into main menu
commands in menu are (all are one Capital)
C - Cancel - Exit
S - Change speed ratio (1 - aprox 10x, 2 - aprox 5x)
H - Change hours
M - Change minutes
T - Send message to IOEXEC
P - Program - Run commands from IOAUTO.IOC once
A - Auto - Run Program many times
new commands in January 1998
B - Read output buffer from ioexec (you will get status of block detect)
T
examples :
SWITCH 1 0
BLOCK POKE 001 255
Descriptions:
SWITCH
BLOCK POKE
P
IOAUTO.IOC commands will start - usually waiting for clock
A
Run Program IOAUTO.IOC repeatable until you press (esc)
A message will be written on the screen - confirming (esc)
But program will finish current run, and then terminate
Example Configuration 1 - random running in circle :
This example is usefull for testing
You need one track circle connected to one block controller
Schedule
01 minutes past hour : train will start running forward
10 minutes past hour : train will stop
15 minutes past hour : train will start running backward
30 minutes past hour : train will stop
35 minutes past hour : train will start running forward
50 minutes past hour : train will stop
IOAUTO.IOC
"REM TEST IOAUTO START V20"
"WAIT UNTIL MINUTE 01"
"BLOCK POKE 001 000"
"WAIT UNTIL MINUTE 10"
"BLOCK POKE 001 255"
"WAIT UNTIL MINUTE 15"
"BLOCK POKE 001 064"
"WAIT UNTIL MINUTE 30"
"BLOCK POKE 001 255"
"WAIT UNTIL MINUTE 35"
"BLOCK POKE 001 000"
"WAIT UNTIL MINUTE 50"
"BLOCK POKE 001 255"
"REM TEST IOAUTO END"
Example Configuration 2 - Pendeling Train :
This example is usefull for simple pendel train automation
You need two stations and one main line connected to three block
controllers
BLOCK 001 - STATION 1
BLOCK 002 - STATION 2
BLOCK 003 - MAIN LINE
Schedule EXAMPLE a
00 minutes past hour : train will run from station 1 to 2
30 minutes past hour : train will run from station 2 to 1
IOAUTO.IOC
"WAIT UNTIL MINUTE 00"
"BLOCK POKE 003 000"
"BLOCK POKE 002 255"
"BLOCK POKE 001 000"
"WAIT UNTIL MINUTE 30"
"BLOCK POKE 001 255"
"BLOCK POKE 003 064"
"BLOCK POKE 002 064"
Schedule EXAMPLE b
00 minutes past hour : train will run from station 1 to 2
train will halt at station 2 for approx. two minutes (Fast clock time)
and then return to 1
IOAUTO.IOC
"WAIT UNTIL MINUTE 00"
"BLOCK POKE 003 000"
"BLOCK POKE 002 255"
"BLOCK POKE 001 000"
"WAIT DETECT 002 000 001"
"WAIT SEC 59"
"WAIT SEC 59"
"BLOCK POKE 001 255"
"BLOCK POKE 003 064"
"BLOCK POKE 002 064"
Example Configuration 3 - My testsetup :
This example shows a more complex schedule
Schedule:
10 minutes past hour : train will run from lower station - track 4
Train will stop for 59 seconds after entering block 6
25 minutes past hour : train will leave hidden yard
45 minutes past hour : train will leave lower station - track 5 and stop at block 6
50 minutes past hour : train will move from block 6 into track 4
IOAUTO.IOC
"REM TEST IOAUTO START V51"
"BLOCK POKE 004 255"
"WAIT UNTIL MINUTE 02"
"SWITCH 2 0"
"BLOCK POKE 004 255"
"WAIT UNTIL MINUTE 07"
"SWITCH 4 0"
"BLOCK POKE 004 255"
"BLOCK POKE 001 074"
"BLOCK POKE 005 008"
"BLOCK POKE 006 010"
"BLOCK POKE 007 012"
"BLOCK POKE 003 255"
"WAIT UNTIL MINUTE 10"
"BLOCK POKE 004 076"
"WAIT SEC 10"
"BLOCK POKE 001 072"
"WAIT SEC 10"
"BLOCK POKE 001 070"
"WAIT UNTIL MINUTE 12"
"SWITCH 2 1"
"WAIT SEC 30"
"SWITCH 4 1"
"BLOCK POKE 002 255"
"BLOCK POKE 001 020"
"BLOCK POKE 004 255"
"WAIT DETECT 006 000 001"
"WAIT SEC 30"
"BLOCK POKE 006 255"
"WAIT SEC 59"
"BLOCK POKE 006 012"
"WAIT UNTIL MINUTE 25"
"BLOCK POKE 007 016"
"BLOCK POKE 008 016"
"BLOCK POKE 003 012"
"WAIT UNTIL MINUTE 40"
"SWITCH 2 0"
"WAIT UNTIL MINUTE 45"
"BLOCK POKE 005 255"
"BLOCK POKE 001 085"
"BLOCK POKE 002 085"
"WAIT UNTIL MINUTE 46"
"BLOCK POKE 005 255"
"WAIT UNTIL MINUTE 50"
"SWITCH 4 0"
"BLOCK POKE 001 012"
"BLOCK POKE 004 255"
"BLOCK POKE 002 255"
"BLOCK POKE 005 085"
"REM TEST IOAUTO 151 END"
Hardware setup for this example
This last example is included in the zip file.
It should run by typing autoexec.bat
However you might need to change the reference to qbasic
Example setup requires that you are using a type 3 switch driver that
are connected at PP2 (normally Parallell port 1) and that you have a
i/o card with a 8255 PIO chip at in/out adress 100H. Connect block
controller data to Port A (100H), Block controller Adress (card select)
to Port B (101H), and Block Detect to Port C (102H). If you have connected
them to different adresses - you will have to change the init.ioc file.
(I hope to document this file soon - if you get into trouble - then send me a mail, and I will
try to help you.
Automation - Version 1.4 - February 1998 Edition
This release contains a number of improvements :
(ref. January edition for more info)
1. Fixed memory allocation - you no longer need to load IOEXECUD
2. Implemented stored scripts (called Time table (TT))
3. Added a DOS (batch) interface: IO.EXE
User guide software install
1. Download Software
2. unzip local.zip
3. configure switching software (ref. Switching )
4. configure adresses for block controller
3. configure timing in ioauto.ioc
4. configure autostartup in ioauto.cfg
5. start programs : autoexec.bat
In adition this version makes it posible to store scripts (time tables) in the TSR:
New commands for stored scripts
Two new commands has been implemeted to handle this. TT (time table are used to define
a line in a script. TT are followed by a three digit timetable number and then the
actual command. The other new command is MODE. This is used to set run mode for
each script. MODE are followed by a three digit timetable number and then a three
table mode number. Valid mode numbers are 000 - clear script, 001 - Program mode,
003 - Run script once, 004 - Repeat script.
Storing Scripts
IOEXEC receives MODE and TT commands in the normal input buffer. This makes it
possible to send commands from script using IOTERM97 with the TSR command. However
it is important to remember that IOTERM97 only reads the five first parameters. This
makes it imposible to use this interface for the more complex commands. (This limitation
will probably be removed in a future version.
Example of command that works from IOTERM97:
TSR MODE 001 000
io5.bas can also be used by selecting (T)sr from the main menu. Examples:
MODE 001 000
TT 001 BLOCK POKE 001 070
TT 001 SWITCH 1 1
TT 001 WAIT SEC 01
TT 001 WAIT MIN 01
TT WAIT UNTIL MINUTE 15
TT WAIT DETECT 006 000 001
A new program IO.EXE has been included in the latest download. This program reads
the command line parameters and sends them to IOEXEC input buffer. This is the
prefered interface to program scripts into the server. Example (ioauto.bat)
IO MODE 001 000
IO MODE 001 001
IO TT 001 BLOCK POKE 001 070
IO TT 001 BLOCK POKE 004 070
IO TT 001 BLOCK POKE 005 014
IO TT 001 BLOCK POKE 006 014
IO TT 001 BLOCK POKE 003 012
IO TT 001 BLOCK POKE 007 018
IO TT 001 BLOCK POKE 008 018
IO TT 001 WAIT SEC 50
IO TT 001 WAIT SEC 50
IO TT 001 WAIT SEC 50
IO TT 001 WAIT SEC 50
IO TT 001 WAIT SEC 50
IO TT 001 WAIT SEC 50
IO TT 001 WAIT SEC 50
IO TT 001 WAIT SEC 50
IO TT 001 BLOCK POKE 001 016
IO TT 001 BLOCK POKE 004 255
IO MODE 001 003
This example script uses the same layout as example no 3 from January 1998
It runs a train from track 4 of lower station that will later return to this
track. Explanation of commands :
IO MODE 001 000
-Clear script
IO MODE 001 001
-Set script in programming mode
IO TT 001 BLOCK POKE 001 070
-Set block 001 slowly in reverse
IO TT 001 BLOCK POKE 004 070
-Set block 004 slowly in reverse
IO TT 001 BLOCK POKE 005 014
-Set block 005 slowly in forward
IO TT 001 BLOCK POKE 006 014
-Set block 006 slowly in forward
IO TT 001 BLOCK POKE 003 012
-Set block 003 slowly in forward
IO TT 001 BLOCK POKE 007 018
-Set block 007 slowly in forward
IO TT 001 BLOCK POKE 008 018
-Set block 008 slowly in forward
IO TT 001 WAIT SEC 50
-wait for 50 fast clock seconds multiple times until train has left block 1
IO TT 001 WAIT SEC 50
IO TT 001 WAIT SEC 50
IO TT 001 WAIT SEC 50
IO TT 001 WAIT SEC 50
IO TT 001 WAIT SEC 50
IO TT 001 WAIT SEC 50
IO TT 001 WAIT SEC 50
IO TT 001 BLOCK POKE 001 016
-Set block 008 slowly in forward
IO TT 001 BLOCK POKE 004 255
-Set block 004 in stop mode
IO MODE 001 003
-Run script once
MODE 001 003 command can be repeated after train has returned to lower station.
It is also possible to enhance the script with SWITCH, WAIT UNTIL MINUTE, and
WAIT MIN commands. However SET TIME commands are currently not supported.
Debugging stored scripts
I hope to add a debug/step MODE and probably a browse mode later. With current
state of software, I usually develops and tests the scripts as ioauto.ini scripts
using IO5.BAS, and when they are working I will change the format to a BAT file
with IO prefix. It is also possible to add WRITE commands to the scripts.
This is usefull using the Buffer command in IO5.bas to see how it is running.
I prefer to write commans like :
IO TT 001 PRINT REM 001 BEFORE WAIT UNTIL MINUTE 15
IO TT 001 WAIT UNTIL MINUTE 15
IO TT 001 PRINT REM 001 STARTING TRAIN
this will output :
REM 001 BEFORE WAIT UNTIL MINUTE 15
REM 001 STARTING TRAIN
Limitations / bugs in current version
ONLY supports script 001 - Config changes must be done - will be documented later
SET TIME not implemented in IOEXEC.COM
WAIT UNTIL STATUS not tested - but will probably work
New (and old) parameters in INIT.IOC not documented
NO input control
Unknown limit of script length
Not possible to change MODE 004 to MODE 003
Descriptions:
SWITCH
BLOCK POKE
This page hosted by
get your own Free Home Page