The text of a manual · part 8 of 18
Starnode PC Data Collection Network Operator's Manual, pages 71 to 80
Pages 71 to 80 of 172
The original document is the PDF (2.1 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
Filed in the catalog under the Computer Identics 320, Computer Identics 325, Computer Identics 326, RVSI CiMatrix 7500, RVSI CiMatrix 7555A, Sick 7555A, RVSI CiMatrix 7600, RVSI CiMatrix 7655, and 11 more models
Page 71
6 Starnode DOS Device Driver
CHAPTER 6
This chapter describes the Starnode Device Driver and its functions and provides detailed information on the installation and use of the driver is presented.
Overview SICK Auto Ident, Inc. Starnode DOS Device Driver is a complete software package designed to allow the user full control of the Starnode PC Data Collection Network while operating in a DOS environment.
To successfully boot and run the Starnode DOS Device Driver, you will require the following minimum configuration: •
PC compatible computer with ISA slot
•
Display and display adapter
•
1.44M floppy disk drive and a hard disk
•
MS-DOS version 3.0 or higher
•
EDIT.COM (supplied with DOS), or another ASCII text-editing program.
Rev B, February 2002
Starnode PC Data Collection Network Operator’s Manual
6-1
6 Starnode DOS Device Driver
The Starnode DOS Device Driver is installed on any PC compatible computer that utilizes DOS Version 3.0 or higher. With the device driver installed, Read/Write operations and DOS input/output function calls (IOCTL) may be used to send and receive messages to specific Starnode devices on the Starnode Network. This allows database software like Lotus 1-2-3 to be used to read data directly from the Starnode interface board.
Page 72
Chapter
6
Starnode DOS Device Driver
Driver Installation Floppy drive A: will be the source drive and the hard disk drive C: will be the target drive. Install the Starnode DOS Device Driver as follows: 1.
Place the Starnode DOS Device Driver floppy disk into drive A.
2.
Copy DOS Driver into the target drive's root directory using the command. COPY A:\DOSDRV\PRIMARY\STARNDRV.SYS C:
3.
Edit the file C:\Config.sys in the root directory to contain the line. DEVICE=STARNDRV.SYS.
Note: Refer to “Modifying CONFIG.SYS File” on page 6-2 for information on modifying CONFIG.SYS. 4.
Reboot your PC. When the system boots, the following message should be displayed: Starnode Device Driver installed...
5.
Read through this chapter, which provides the instructions necessary to run the Starnode Dos Device Driver
6.
If you plan on performing Read/Write operations to the STARNBRD device, instead of making input/output control calls, modify your AUTOEXEC.BAT file as described in “Using STARN Program” on page 6-5.
7.
The installation is now complete.
Modifying CONFIG.SYS File When your PC begins loading the DOS operating system, it searches for a special file called CONFIG.SYS. This file is used to create a non-standard system configuration. In order to use the Starnode DOS Device Driver on your PC system, you must modify the CONFIG.SYS file. Using EDLIN/EDIT (supplied with DOS) or another ASCII text editor, add the following line to the CONFIG.SYS file: DEVICE=STARNDRV.SYS PPPP ER EW EF "NNNNNNNN"
6-2
Starnode PC Data Collection Network Operator’s Manual Rev B, February 2002
Page 73
Modifying CONFIG.SYS File where: DEVICE=STARNDRV.SYS Loads the Starnode DOS Device Driver with the default values: I/O port address End-of-Read End-of-Write End-of-File Alternate Device Name
0300(Hex) to be indicated by 1A(Hex) (<CTRL>Z - DOS End -of-File Marker) to be indicated by 04(hex) (EOT) to be indicated by a 1A(Hex) (<CTRL>Z) None
All parameters after STARNDRV.SYS are optional, however, if a parameter value is specified, all preceding parameters must also be specified as shown in Table 6–1. TABLE 6–1. STARNDRV.SYS Parameters
Description
Value
I/O Port Address.
4 Hex characters.
ER
End-of-Read Char.
2 Hex characters.
EW
End-of-Write Char.
2 Hex characters.
EF
End-of-File Char.
2 Hex characters.
NNNNNNNN
Alternate Device Name
8 characters in quotes
Note: All of the above parameters must be exactly the length specified. You may elect to supply no parameters, only the first parameter, only the first two parameters, etc. All remaining fields after the last one filled will use the default values listed above. The Alternate Device Name, if present, must be exactly eight characters long. If you wish to use a name shorter than eight characters, fill in the remaining places with space characters. The CONFIG.ADD file contains the instruction line DEVICE=STARNDRV.SYS You may add this line directly to your CONFIG.SYS file in order to load the Starnode DOS Device Driver with the defaults listed above, or you may modify
Rev B, February 2002
Starnode PC Data Collection Network Operator’s Manual
6-3
6 Starnode DOS Device Driver
Parameter PPPP
Page 74
Chapter
6
Starnode DOS Device Driver the file to include parameters, which you specify. Several examples of modified load instructions are presented below.
Example 1 DEVICE=STARNDRV.SYS 03A0 0D 3B 03 "STARNEW " This instruction loads the device driver with I/O Port Address 03A0H, End-ofRead indicated by a 0DH (carriage return), End-of-Write indicated by 3BH (;), End-of-File indicated by 03H (ETX character), and the Alternate Device Name set to STARNEW. Note: STARNBRD is always a valid device name to use when referring to the Starnode board, however using an Alternate Device Name (STARNEW in this case) allows you to customize the device name to match existing software packages or programs. It is important also to note that a space has been included following the STARNEW name, thus making it exactly 8 characters long.
Example 2 DEVICE=STARNDRV.SYS 03A0 0D 3B 03 This instruction loads the device driver with port address 03A0H, with End-ofRead indicated by a ODH (carriage return), End-of-Write indicated by 3BH (;), and End-of-File indicated by a 03H (ETX character). There is no Alternate Device Name.
Example 3 DEVICE=STARNDRV.SYS 03A0 0D 3B This instruction loads the device driver with port address 03A0H, with End-ofRead indicated by a 0DH (carriage return), and End-of-Write indicated by a 3BH (;). Default parameters set End-of-File to be indicated by 1AH (<CTRL>Z - DOS End-of-File) with no Alternate Device Name.
Example 4 DEVICE=STARNDRV.SYS 03A0 0D This instruction loads the device driver with port address 03A0H and End-ofRead indicated by a 0DH (carriage return). Default parameters will set End-of-
6-4
Starnode PC Data Collection Network Operator’s Manual Rev B, February 2002
Page 75
Using STARN Program
Write to be indicated by a 04H (EOT), End-of-File to be indicated by a 1AH (<CTRL>Z DOS End-of-File), with no Alternate Device Name.
Example 5 DEVICE=STARNDRV.SYS 03A0 This instruction loads the device driver with port address 03A0H. Default parameters will set End-of-Read to be indicated by a 0DH (carriage return), Endof-Write to be indicated by a 04H (EOT), End-of-File to be indicated by a 1AH (<CTRL>Z DOS End-of-File), and no Alternate Device Name.
Using STARN Program This section describes the application of the STARN program to control the Starnode board. Provided on your Starnode Development Disk is the Starnode Board Control Program (STARN). If you are not using input/output control (IOCTL) calls to control the Starnode board, you will need a way to initialize the board, download programs, broadcast messages, etc. The STARN program supports all of these Starnode board capabilities. STARN is to be run from your AUTOEXEC.BAT file or the DOS command line. The program takes all of its information from the command line, executes one operation, and then returns to DOS.
AUTOEXEC.BAT is a special file that DOS searches for every time you boot your PC system. After DOS has completed all the configuration tasks specified in the CONFIG.SYS file, it will execute the commands listed in the batch file AUTOEXEC.BAT. Before beginning to Read or Write messages over the Starnode network the typical user will need to: 1.
Initialize the Starnode board.
2.
Synchronize the PC date and time with that on the Starnode Board.
3.
Download any user programs that will be used.
4.
Perform other startup tasks; such as broadcast a greeting message to all Starnode devices.
Rev B, February 2002
Starnode PC Data Collection Network Operator’s Manual
6-5
6 Starnode DOS Device Driver
Modifying AUTOEXEC.BAT File
Page 76
Chapter
6
Starnode DOS Device Driver
Using EDIT (supplied with DOS) or another ASCII text-editor, add all necessary STARN command lines to the end of your AUTOEXEC.BAT file. The following sample command lines use STARN to accomplish the typical tasks a user would need completed prior to performing Read/Write operations. Initialize the Starnode board using I/O Port Address 300 (hex) STARN init 300 Synchronize Starnode board real-time clock with DOS date & time STARN time Download wip.lan to Starnode board for all Starnode devices type 1. STARN downt 1 wip.lan Download quality.lan to Starnode board for all Starnode devices type 3. STARN downt 3 quality.lan Download inv.lan directly to term. # 100 STARN downl 100 inv.lan Broadcast message to all Starnode devices announcing network is up. STARN brdc 48 "\005\022Starnode Network Active"
STARN Routine This section provides a listing of all the routines STARN uses to control the Starnode interface board. The routine's name and parameters are listed in bold type. The parameters are listed within parenthesis. Note: When including parameters in your command lines, do not use parentheses as delimiters, but instead use single spaces between parameters.
STARN delay (delay value) This routine establishes the time that the PC should wait after each communication with the Starnode board. This allows that higher values may be used on PC’s, which have faster clock speeds in the ISA bus than the industry standard of 8Mhz.
STARN init (port address (hex)) This routine initializes the Starnode board. The default I/O port address (0300) hex will be used if no parameter is supplied. When the routine is called, all
6-6
Starnode PC Data Collection Network Operator’s Manual Rev B, February 2002
Page 77
Using STARN Program download and error tables on the Starnode board are cleared, but the received message queue is not affected.
STARN iop (port address (hex)) Use this routine in order change the I/O port address without re-initializing the Starnode board. If no port address is provided, a default address of 300 (hex) will be used. This routine is useful if you are operating with more than one Starnode board in a single PC, each with a different I/O port address.
STARN time This routine retrieves the current date and time from DOS, and instructs the Starnode board to synchronize its real-time clock with the values from DOS.
STARN tblc This routine clears all user program download tables from the Starnode board.
STARN downt (term type) (file name) This routine downloads a user program to the Starnode board for all Starnode devices with the specified type. All parameters are required. The file name may include a drive letter and directory path. Do not enclose the file name in quotes. Once the routine has returned to DOS, the Starnode board will automatically download the program to any Starnode device on the network that has a matching type.
This routine downloads a user program to a single terminal ID. This action bypasses the Starnode board's download table, and sends the program directly to the Starnode device. All parameters are required. The file name parameter may include a drive letter and directory path. Do not enclose the file name in quotes. When this routine has completed, the Starnode board is unaware that the specified Starnode device has had a program downloaded to it.
STARN errcl This routine clears the error log on the Starnode board.
STARN errgt This routine retrieves the error log from the Starnode board and displays it on the PC screen. Knowledge of the Starnode network protocol and operating characteristics is required to correctly interpret this table. You should consult
Rev B, February 2002
Starnode PC Data Collection Network Operator’s Manual
6-7
6 Starnode DOS Device Driver
STARN down1 (term id) (file name)
Page 78
Chapter
6
Starnode DOS Device Driver with the SICK Auto Ident, Inc. application support group if you need additional information.
STARN stat (term id) This routine retrieves the status of the specified Starnode device from the Starnode board's status table, and displays the value on the PC screen in hex. The terminal ID parameter is required.
STARN send (term id) (command) ("message") This routine sends a message to the specified Starnode device on the Starnode Network. The command value tells the Starnode device what to do with the message (display it, hold it for the program running in the Starnode device, etc.). Consult the Starnode device manual for a list of valid command values. All parameters are required.
STARN attn This routine sends an attention signal over the Starnode Network, causing all Starnode devices to suspend operations (such as laser gun scanning) until the next message is sent over the network. This routine is useful when broadcasting important messages that you do not want Starnode devices to ignore. A broadcast message, sent without a prior attn signal, may be ignored if the Starnode devices are busy.
STARN brdc (command) ("message") This routine broadcasts a message to all Starnode devices on the network. The command value tells the Starnode device what to do with the message (display it, hold it for the program running in the Starnode device, etc.). Consult the Starnode device manual for a list of valid command values. All parameters are required.
STARN brdt (term type) (command) ("message") This routine broadcasts a message to all Starnode devices on the network having the specified terminal type. The command value tells the Starnode device what to do with the message (display it, hold it for the program running in the Starnode device, etc.). Consult the Starnode device manual for a list of valid command values. All parameters are required.
6-8
Starnode PC Data Collection Network Operator’s Manual Rev B, February 2002
Page 79
Using STARN Program
STARN recv This routine retrieves one message from the Starnode board (if any are waiting) and prints it on the screen. The ID number and type of the Starnode device, which sent the message, will also be displayed.
STARN stop This routine stops all Starnode network activity. When this routine has completed, the Starnode board stops polling the network and all time transmissions on the network are stopped, and all network polling is halted. Bar code terminals may be programmed to detect network stoppage, and operate independently while the network is not available.
STARN pinit (port address (hex)) This routine initializes the Starnode board in a manner similar to STARN init except the STARN pinit does not erase program error tables. This routine may be used if you do not desire to re-download a user program to the Starnode board after initializing the Starnode network.
STARN ver This routine returns two bytes of information. The low order byte contains the Starnode board firmware version in hex format, while the high order byte contains a number representing the size of the download table as shown in Table 6–2. TABLE 6–2. Download Table Size
256K bytes download table size
2
512K bytes download table size
3
1M bytes download table size
4
2M bytes download table size
6
STARN reset This routine completely resets the Starnode board setup parameters to the factory defaults settings, and runs full hardware diagnostics. Diagnostics may require up to 2 minutes to complete. Access to the Starnode board is not possible during this interval.
Rev B, February 2002
Starnode PC Data Collection Network Operator’s Manual
6-9
Starnode DOS Device Driver
1
Page 80
Chapter
6
Starnode DOS Device Driver
STARN setmem (input size) (priority size) (download size) Additional buffer space may be made available to buffer either or both of received messages and priority messages, by reducing the number of download pages. Use STARN getmem to retrieve the current configuration. Run STARN setmem specifying a larger input size and a correspondingly smaller download pages size. Allow up to 2 minutes for the Starnode Controller to complete reconfiguration before attempting to use the board. Once the controller has been re configured it will retain this configuration.
STARN getmem This routine returns the status of prior STARN SETMEM attempts and the number of message buffers or priority buffers. This routine also retrieves and displays the current memory configuration on the Starnode controller. Example results may be as shown below: •
(63) 512-byte buffer(s) used for receive messages
•
(1) 512 byte buffers used for priority messages
•
(0) 16K buffer(s) of the download area are used for receive messages specifying: –
512 byes are reserved for priority messages (messages beginning with an escape character)
–
32K bytes are used to store received messages
–
All of the download area is used for storing download programs
Using Read/Write Interface This section details how to perform Reads and Writes directly from the DOS prompt line. The Starnode DOS Device Driver can be used in two ways:
6-10
1.
Using Reads and Writes directly from the DOS prompt to the file called STARNBRD.
2.
Using DOS input/output control function calls.
Starnode PC Data Collection Network Operator’s Manual Rev B, February 2002