The text of a manual · part 15 of 18
Starnode PC Data Collection Network Operator's Manual, pages 141 to 150
Pages 141 to 150 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 141
STBLN Next Line of Download Table
C Language SYNTAX STBLN(length, &string[?]) Example FILE *pclfile; short i, rec_count, block_count; char buf[128]; pclfile = fopen(PPICK.LAN, 'rb'); rec_count = (short) fgetc(pclfile); rec_count = rec_count | ((short) fgetc(pclfile) < 8); if (!STBLB(25, rec_count)) printf(“Problem with Starnode board. \n”); else for (i=0; i <rec_count; i++) { block_count = (short) fgetc(pclfile); fread(buf, block_count, 1, pclfile); if (!STBLN(block_count, buf)) { printf(“Problem with Starnode board. \n”); break; } } fclose(pclfile);
Rev B, February 2002
Starnode PC Data Collection Network Operator’s Manual
8 Using Interface Routines
Introduction
8-35
Page 142
Chapter
8
Using Interface Routines
Visual Basic SYNTAX STATUS% = STBLN(RECORD_LEN%, INBUF$) Example Dim STATUS% Dim RESULTS% Dim RECORD_COUNT% Dim TYPE_NUM% Dim INBUF$ Dim I% Dim BYTE1 As Byte Dim BYTE2 As Byte TYPE_NUM% = 1 Open "gen_civ.lan" For Binary As #98 Get #98, , BYTE1 Get #98, , BYTE2 RECORD_COUNT% = BYTE1 + (BYTE2 * 256) STATUS% = STBLB(TYPE_NUM%, RECORD_COUNT%) If (STATUS% <> 1) Then _ Print "ERROR: non-1 return from stblb: "; STATUS%: GoTo STBLB1 For I% = 1 To RECORD_COUNT% Get #98, , BYTE1 INBUF$ = String(BYTE1, " ") Get #98, , INBUF$ STATUS% = STBLN(BYTE1, INBUF$) If (STATUS% <> 1) Then _ Print "ERROR: non-1 return from stbln: "; STATUS%: GoTo STBLB1 Next I% Close #98 STBLB1: RESULTS% = STATUS%
8-36
Starnode PC Data Collection Network Operator’s Manual Rev B, February 2002
Page 143
STIME Send DOS Time to Starnode board Upon completion, the function will have a value of 1 (TRUE) if it completed successfully, or 0 (FALSE) if there was a problem in communicating with the Starnode board.
C Language SYNTAX TIME(); Example if (!STIME()) printf(“Problem with Starnode board. \n”);
Visual Basic SYNTAX STATUS% = STIME() Example Dim STATUS% STATUS% = STIME ()'send DOS time to board If (STATUS% = False) Then MsgBox ("Problem with Starnode board.") End If
Rev B, February 2002
Starnode PC Data Collection Network Operator’s Manual
8-37
8 Using Interface Routines
Introduction
Page 144
Chapter
8
Using Interface Routines
SVER Get Starnode ROM version and Download Table size The value returned by this function is a 16-bit integer. The high order bits (8-15) contain the information regarding the size of the download table, while the low order bits (0-7) contain the Starnode PC Interface board ROM version number.
C Language SYNTAX SVER (&romver); Example if (!SVER(&romver)) printf("Problem with Starnode board. \n”); else printf ("Download table size and version are : %4X", romver);
Visual Basic SYNTAX STATUS% = SVER (ROMVER%) Example Dim STATUS% Dim ROMVER% STATUS% = SVER (ROMVER%) ' get the version of ROM If (STATUS% = False) Then MsgBox ("Problem with Starnode board.") Else MsgBox ("Download table and size are: " + Format (ROMVER%)) End If
8-38
Starnode PC Data Collection Network Operator’s Manual Rev B, February 2002
Page 145
9 Controlling System’s Data Collection
9 Controlling System’s Data Collection Terminals
CHAPTER 9
Messages may be sent from the host to Starnode devices, which control certain terminal functions. Each message starts with a command byte that tells the Starnode device what to do with the message. The remainder of the message may contain screen control characters.
Terminal Control Commands The commands must be sent preceding every message and allow you to control the Starnode devices or request certain types of information. The command values below are passed to the SSEND, SBRDC, or SBRDT routines in the command parameter, not as part of the message. The single exception to this rule is the Program Message where the command value is the first character of the message.
Rev B, February 2002
Starnode PC Data Collection Network Operator’s Manual
9-1
Page 146
Chapter
9
Controlling System’s Data Collection Terminals
A description of each command is show in Table 9–1. The commands are listed alphabetically, by function. TABLE 9–1. Terminal Control Commands
Message Type
Decimal
Hex
ASCII
System Message
48
30
0
Prompt Message
49
31
1
Disable Time and Date
50
32
2
Enable Time and Date
51
33
3
Send Diagnostic Message
52
34
4
Send Status Information
53
35
5
User Program Load
57
39
9
User Program Boot
58
3A
:
Reset
59
3B
;
Clear Diagnostic Count
60
3C
<
Turn Relay On
61
3D
=
Turn Relay Off Program Message
62
3E
>
65 (or greater)
41 (or greater)
A
Sending System Message The command 48 (hexadecimal 30) allows you to display a system message on a data collection terminal's screen. When the system message is sent, any data currently appearing on the data collection terminals' displays will blank out. The system message will then display for a specified period of time. After the specified time period has expired, the original screen will be displayed. Command Parameter Value: 48 Decimal (30 hex) Message Format: <TIME><DATA> where: TIME - Is a single byte (the first byte of the message), its ASCII character value represents the amount of time you want the message to remain on the display. Allowed values are 0 to 127 seconds (NUL to DEL). However, if a value greater than 63 seconds (?) is set, the message string will be continually recycled. The recycle period is determined by the value of
9-2
Starnode PC Data Collection Network Operator’s Manual Rev B, February 2002
Page 147
Terminal Control Commands duration. For example, if you set a duration of 100 seconds, the message will recycle every 36 seconds (100 - 64 = 36).
DATA - Is a string of up to 125 ASCII characters representing the message you want displayed. The screen control characters discussed in the next section may be incorporated into the data string.
Sending Prompt Message The command 49 (hexadecimal 31) allows you to display a prompt message on the bar code data collection terminal's screen. When this command is used, the prompt message will be written to the terminal's display starting at the current cursor position. The message will remain on the display until another message must be shown. Prompt messages are used in a non-programmed, real-time prompt response protocol. Command Parameter Value - 49 (31 hex) Message Format - <DATA> where: DATA - Is a string of up to 126 ASCII characters that are to be written to the terminal's display. This string may contain screen control commands.
Disabling Time & Date Display The time and date are displayed in the lower right-hand corner of the data collection terminal's display, if there is enough room. This is described in detail in the operator's manual provided with your data collection terminal. You can disable the time and date display by using the 50 (hexadecimal 32) command. Even if the display is being already being controlled locally by a resident user program, the 50 command will override any previously set screen attributes. Command Parameter Value - 50 (32 hex) Message Format - None
Rev B, February 2002
Starnode PC Data Collection Network Operator’s Manual
9-3
Controlling System’s Data Collection
9
Note: Use of recycled messages will disable the data collection terminal from further use until a reset is performed. Refer to “Resetting Starnode Device” on page 9-7 for more information.
Page 148
Chapter
9
Controlling System’s Data Collection Terminals
Enabling Time & Date Display The time and date are displayed in the lower right-hand corner of the data collection terminal's display. This is described in detail in the operator's manual provided with your data collection terminal. You can enable the time and date display by using the 51 (hexadecimal 33) command. Even if the display is being already being controlled locally by a resident user program, the 51 command will override any previously set screen attributes. Command Parameter Value - 51 (33 hex) Message Format - None
Requesting Diagnostic String Upon the receipt of a 52 (34 hexadecimal) command, the Starnode device will send the following string back to the PC: SSXXX #NNNNN where: SSXXX - Is the model number of the Starnode device. NNNNN - Is a number of Diagnostic String messages sent. This will be a value between 00000 and 65535. This string can be used for diagnostic purposes. The message count is incriminated each time this message is requested. The count will be reset to zero when the Starnode device receives a Clear Diagnostics Count (Command 60) or when the Starnode device is reset. This can be performed from the Starnode PC using the 59 (3B hexadecimal) command. Refer to the operator's manual accompanying the unit or “Resetting Starnode Device” on page 9-7 for more information. Command Parameter Value - 52 (34 hex) Message Format - None
Requesting Status String When a 53 (35 hexadecimal) is received by the Starnode device, the Starnode device will respond by sending a string representing its current operating parameter setup. This string is different for each Starnode device. Refer to the Starnode device manual for information on the status string. The following is a typical format:
9-4
Starnode PC Data Collection Network Operator’s Manual Rev B, February 2002
Page 149
Terminal Control Commands
MMM VV S TTT CCC LLLLL FF GG HHH III JJJ KKK B where:
VV - Is the version number of the operating system program residing in the unit. It will be important to know this information when making a service call. S - Represents the status of the Starnode board's receive buffers. A returned value of 0 indicates that the unit's receive buffers are empty, while a value of 1 indicates that the unit's receive buffers are full. TTT - Represents the unit's assigned terminal type. The terminal type will be a value between 000 and 127. Programs cannot be downloaded to a Starnode device assigned a value of 000. The terminal type value is assigned locally at the unit and can be temporarily changed within a user program. CCC - Indicates if the clock display is enabled and, if so, at what level the display is enabled. The value returned is a bit-wise value, which may consist of the following component values: 001 - Clock display enabled at the operating system level. 016 - Clock display enabled at user program level. 064 - Clock display temporarily disabled. 128 - Unit is operating under user program control. LLLLL - Indicates which types of bar codes are auto distinguished by the unit. The barcode scheme can be set either locally at the operating system level or temporarily overridden by a user program. FF - Represents the number of characters that will be decoded in fixed length barcodes. Valid lengths are 0 to 50 characters. GG - Specifies the minimum number of characters that a label must contain in order to be decoded. Valid minimum lengths are 00 to 50 characters. HHH - Specifies if any check digits enabled. This value will be 000 if the option is disabled.
Rev B, February 2002
Starnode PC Data Collection Network Operator’s Manual
9-5
Controlling System’s Data Collection
9
MMM - Is the three-digit Starnode device model.
Page 150
Chapter
9
Controlling System’s Data Collection Terminals
III - Indicates which UPC/EAN Title and Issue Extensions the unit decodes. This value will be 000 if the option is disabled. JJJ - Indicates whether or not the Code 93 and/or Code 3-of-9 append functions will be decoded. This value will be 000, if the option is disabled. KKK - Indicates the MSI check digit-decoding scheme. This value will be 000 if the option is disabled. B - Represents the pitch and volume settings of the unit's beeper tone. Command Parameter Value - 53 (35 hex) Message Format - None
Loading User Program Message Format - None To load a user program through the application program, use the 57 (hexadecimal 39) command. This command will allow the loading of a compiled user program. Note: This command already appears as the first character on each download line of a user program's .LAN file. Command Parameter Value - 57 (39 hex) Message Format - From .LAN File
Booting User Program If you want to reboot a user program that has already been downloaded to the Starnode device, use the 58 (hexadecimal 3A) command. If no user program has been downloaded to this terminal and this command is sent, an error will occur and the display will return to the power-up screen. If a user program does reside at the Starnode device, program execution will be interrupted and the program restarted from the beginning. Command Value - 58 (3A hex) Message Format - None
9-6
Starnode PC Data Collection Network Operator’s Manual Rev B, February 2002