ScripPro User Manual
Introduction
ScripPro is used to run scripts by reading in and executing the appropriate program script files "name.pro
" and optionally writing out journal files "name.jou
" log files "name.log
"
to document the communication that transpired for archiving and later
viewing. ScripPro was developed to allow the running of multiple simple
"PROCOMM-like" scripts.
ScripPro performs these functions and also allows keyboard input to
be sent out the port, while capturing the information for display
and/or saving to files. ScripPro runs in protected mode using two
components, the DPMI server "DPMI16BI.OVL
" and the run-time manager "RTM.EXE
". ScripPro also has eight ".dll
’s"
which are used for dynamic (run time) storage of the decoded script
files being executed. ScripPro is a text mode DOS program which runs in
50 line mode (25 line mode for monochrome) and will split the screen
into 2 windows for each port opened. One window (Command:
) displays the information output from the program and another window (Response:
) displays the information input to the program.
Command line operation
Startup defaults
- Single com port operation
- COM1 9600 Baud, 8 Data bits, No parity, 1 Stop bit
- No journal file generated
- No log file generated
- No non-printable characters displayed or logged
- Horizontal display (
Command:
window is aboveResponse:
window) - Program script file…"
A.PRO
" - VGA equivalent installed (for 50 line mode)
Startup options
c:\>ScripPro name /1 /a1 /ae /iblah
name
specifies the name of the script file to run don’t specify an extension,.pro
will be appended./1 /2 /3 /4 /6
&/8
specifies the number of channels to use…/a /b /c /d /e /f /g
&/h
specifies the channel’s parameters…/a
specifies the first channel and/b /c /d /e /f /g
&/h
specifies the subsequent channels. The first entry becomes the port designated PortA at the top of the screen. The second entry becomes the next etc./i
specifies a comment which will be passed to the end of the header line of the log file (this can be up to 20 characters)
c:\>ScripPro name /j /l /m /n /v
name
specifies the name of the script file to run don’t specify an extension,.pro
will be appended./j
specifies there will be a file generated which will list the script as it was decoded for execution the form "name.jou
" ( the journal file)/l
specifies there will be a file generated which will take the form "name.log
" ( the log file)/m
specifies a monochrome monotor is used (program will only run in 25 line mode)/n
specifies all nonprintable characters will be displayed on the screen and in the log file/v
(vertical) specifies theCommand:
andResponse:
windows will be displayed side by side
c:\>ScripPro /a1
- The
/a
indicates the first port displayed from the top. - The number
1
indicates the physical Com Port to use COM1. - Specifying the port this way forces the IRQ and base address to the defaults…
- COM1 is on IRQ4 at Port address 3F8 Hex.
- COM2 is on IRQ3 at Port address 2F8 Hex.
- COM3 is on IRQ5 at Port address 3E8 Hex.
- COM4 is on IRQ2 at Port address 2E8 Hex.
- COM5 is on IRQ5 at Port address 3E8 Hex.
- COM6 is on IRQ7 at Port address 2E8 Hex.
- COM7 is on IRQ7 at Port address 380 Hex.
- COM8 is on IRQ2 at Port address 390 Hex.
c:\>ScripPro /ae
e
is shorthand for 9600 E71 port parameters
c:\>ScripPro /an
n
is shorthand for 9600 N81 port parameters
c:\>ScripPro /a2e71300059600
- This is used when you need to set the port to something other than the defaults.
- Note: These parameters are position sensitive.
a
indicates the port (Port A) to modify2
means com port 2 and the following parameters (non-standard)e
means even parity, usen
for no parity7
is the number of data bits, use8
for eight data bits1
is the number of stop bits, use2
for two stop bits300
is hex for the base address of the com port05
is the IRQ which is assigned to the port (two digits)9600
is the baud rate to be used on the port (this is the only parameter which can consist of a variable number of characters - three, four, five or six). Valid baud rates are:110
150
300
600
1200
2400
4800
9600
11520
12800
14400
19200
23040
28800
38400
57600
115200
Script file operation
Description
If no script file of "name.pro
" is found then it will look for "nameA.pro
" or "A.pro
"
if that is not found then ScripPro will start in terminal mode. The
parameters will be the default port values. ScripPro allows all the
command line parameters to be specified in the program script file on
the "setup" line. Parameters not used here are the comment field and,
of course, the name of the script file. Values for all ports do not
need to be supplied. Only values for the ports you want to change from
the default. Command line parameters may also be placed in the script
file.
Syntax
On a script command line the first word on the line must be the command for that line i.e. a line starting with a semicolon is not decoded as a command and the line is effectively commented out. The format of a sample script file follows…
Sample code
setup /1 /a1 /an /h
header "Log file of Serial #"
message ""
message "This is a log file"
message ""
message "Reset board before"
; waitfor "LaDeDa>"
transmit "sd^m"
waitfor "LaDeDa>"
transmit "whatever^m"
TimeStamp
waitfor "LaDeDa>"
DateStamp
transmit "whomever^m"
; waitfor "LaDeDa>"
message "This is end of test"
Note: The semicolons indicate that the line has been commented out.
Command summary
setup
- All valid command line parameters may be placed here except, for obvious reasons, the
/i
for comments passed in and the script file name. header
- The
information entered in between the quotes will appear on the first line
of the log file followed by the comment passed in from the command line
with
/i
if present. message
- The information entered in between the quotes will appear in the log file at the appropriate line were the message appears if no characters in the quote string then a new line line will be sent to the log file.
prompt
- The information entered in between the quotes will be displayed on the bottom line of the display and will appear in the log file at the appropriate line were the message appears.
timestamp
- The current time will appear in the log file.
datestamp
- The current date and time will appear in the log file.
holdoff
- (i.e.
holdoff 0.1375
) The information entered is the number of seconds that the string processing will effectively be suspended between commands. The commandstransmit
for normal communication andquery
for commands such asrepetitive question?^m
which is used repeatedly for status reporting. The defaultholdoff
time is zero (holdoff
is not executed at all). transmit
- (i.e.
transmit "stuff^m"
) The information entered in between the quotes will be sent out the port to the device and any control characters that are included ie "^m
" caret m will be interpreted as a <carriage return> ascii 13 (m is the 13th letter of the alphabet) a "^g
" caret g will be interpreted as a <bell> ascii 7 (g is the 7th letter of the alphabet) and so forth. transmithex
- (i.e.
transmithex "A00F2DFCCB00CC00"
) The binary codes which are represented by the hex data entered in between the quotes will be sent out the port to the device. pause
- (i.e.
pause 0.0825
) The information entered is the number of seconds that the script processing will effectively be suspended (27.5 mS + multiples of 55 mS) +/- 27.5 mS. query
- (i.e.
query "repetitive question?^m"
) This command should only be specified once in the script file, at the point where you want status polling to start. The information entered in between the quotes will be sent out the port to the device repeatedly spaced, in time, by the value specified in theholdoff
command. Any control characters that are included will also be sent. ForQuoteText "^m"
caret m will be interpreted as a <carriage return> ascii 13 (m is the 13th letter of the alphabet) a "^g
" caret g will be interpreted as a <bell> ascii 7 (g is the 7th letter of the alphabet) and so forth. waitfor
- (i.e.
waitfor "xxx,yy,zz"
) The information entered in between the quotes will be compared to the string responses from the device at the com port input. If the string is not found the script processing will effectively be halted (it will not continue). waitforhex
- (i.e.
waitforhex "A00F2DFCCB00CC00"
) The binary codes which are represented by the hex data entered in between the quotes will be compared to the responses from the device at the com port input. If the code sequence is not found the script processing will effectively be halted (it will not continue). waitfor485
- (i.e.
waitfor485 "xxx,yy,zz"
) The information entered in between the quotes will be compared to the string responses from the device at the com port input. If the string is found then the string ";FF" will searched for the same way. If either string is not found the script processing will effectively be halted (it will not continue). waitforcr
- (i.e.
waitforcr "xxx,yy,zz"
) The information entered in between the quotes will be compared to the string responses from the device at the com port input. If the string is found then a carriage return will be searched for the same way. If either is not found the script processing will effectively be halted (it will not continue). waitforlf
- (i.e.
waitforlf "xxx,yy,zz"
) The information entered in between the quotes will be compared to the string responses from the device at the com port input. If the string is found then a line feed will be searched for the same way. If either is not found the script processing will effectively be halted (it will not continue). waitforchars
- (i.e.
waitforchars 27
) The information entered is the number of characters to wait for at the com port input. If the number of characters is not found the script processing will effectively be halted (it will not continue). newbaudrate
- (i.e.
newbaudrate 115200
) This command will close the serial port and reopen it at the baud rate specified it will also clear the input buffer. repeat
- This command marks the beginning of a loop which will be repeated until the
until
command is satisfied. until
- This command marks the end of a loop in this release the loop is infinite unless it is stopped externally.