Intermec IF2 Basic Reader Interface Programmer's Reference Manual (BRI version - Page 115

Understanding the [LITERAL] Parameter, Reading and Writing STRING Fields - price

Page 115 highlights

Chapter 4 - BRI Commands 17 Switch to the next antenna. 18 Read no tags. 19 Read no tags. The total number of ID tries = 3 * (2 * 2) = 12. You can see that INITTRIES worked to multiply the total number of cycles the reader ran. This is the case no matter how you set IDTRIES and ANTTRIES. Note: You cannot set INITTRIES, IDTRIES, or ANTTRIES to zero. Understanding the [LITERAL] Parameter Command: Response: [LITERAL] parameters can improve the readability of the data returned from a BRI command. A [LITERAL] parameter is a quoted text string that can be placed anywhere on a BRI command line. There is no limit to the number of [LITERAL] parameters that you can specify. The maximum length of a [LITERAL] parameter is 255 characters. This example demonstrates various uses of [LITERAL] parameters: READ "PRICE $" ,INT(18,2,) "QUANTITY" ,INT(20,2), "SIZE", STRING(22,8) PRICE $25 QUANTITY 10 SIZE "LARGE" OK> Reading and Writing STRING Fields When writing a string field to a tag, the length field specifies the total length of the string data. When data is returned from STRING fields, the data returned contains information only up to the length specified in the command. The following five examples show the details associated with reading and writing STRING fields. Consider the first example: Suppose you want to define STRING data on a tag starting at location 18 for a length of 20 bytes. With a field of this length, the string can store 20 characters. This WRITE command would write the entire field: WRITE STR(18,20)="abcdefhgijklmnopqrst" The string is 20 characters long. This would fill the entire defined field in the tag. Consider the second example: If the data in a STR(address,length) data type is specified as follows, the characters abcde are written to locations 18 through 22. The characters fg are not written: WRITE STR(18,5)="abcdefg" Basic Reader Interface Programmer Reference Manual 103

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146

Chapter 4 — BRI Commands
Basic Reader Interface Programmer Reference Manual
103
17
Switch to the next antenna.
18
Read no tags.
19
Read no tags.
The total number of ID tries = 3 * (2 * 2) = 12.
You can see that INITTRIES worked to multiply the total number of cycles the
reader ran. This is the case no matter how you set IDTRIES and ANTTRIES.
Understanding the [LITERAL] Parameter
[LITERAL] parameters can improve the readability of the data returned from a BRI
command. A [LITERAL] parameter is a quoted text string that can be placed
anywhere on a BRI command line. There is no limit to the number of [LITERAL]
parameters that you can specify. The maximum length of a [LITERAL] parameter is
255 characters.
This example demonstrates various uses of [LITERAL] parameters:
Command:
READ “PRICE $” ,INT(18,2,) “QUANTITY” ,INT(20,2), “SIZE”,
STRING(22,8)<CRLF>
Response:
PRICE $25 QUANTITY 10 SIZE “LARGE”<CRLF>
OK><CRLF>
Reading and Writing STRING Fields
When writing a string field to a tag, the length field specifies the total length of the
string data. When data is returned from STRING fields, the data returned contains
information only up to the length specified in the command.
The following five examples show the details associated with reading and writing
STRING fields.
Consider the first example:
Suppose you want to define STRING data on a tag starting at location 18 for a
length of 20 bytes. With a field of this length, the string can store 20 characters. This
WRITE command would write the entire field:
WRITE STR(18,20)=”abcdefhgijklmnopqrst”<CRLF>
The string is 20 characters long. This would fill the entire defined field in the tag.
Consider the second example:
If the data in a STR(address,length) data type is specified as follows, the characters
abcde
are written to locations 18 through 22. The characters
fg
are not written:
WRITE STR(18,5)=”abcdefg”<CRLF>
Note:
You cannot set INITTRIES, IDTRIES, or ANTTRIES to zero.