Intermec IV7 Basic Reader Interface Programmer's Reference Manual (BRI version - Page 97

Understanding [READ FIELD] and [WRITE FIELD] Parameters, [READ FIELD] Examples

Page 97 highlights

Chapter 4 - BRI Commands Understanding [READ FIELD] and [WRITE FIELD] Parameters Error checking occurs when a command is executed. If the syntax of the parameter is invalid, an error is reported. If the error occurs during the execution of a command, the appropriate response is returned from the BRI. When reading or writing data from or to a tag, the entire address space of the tag is available. For example, suppose a [READ FIELD] parameter was specified as INT(126,4) and the maximum tag memory address was 127. When the BRI executes this command, it returns RDERR because this [READ FIELD] parameter is asking to read four memory locations starting at address 126 (trying to read locations 126, 127, 128, and 129). This would try to read data two tag memory locations past the end of tag memory. [READ FIELD] Examples To read a STRING value 15 characters long at address 30: READ STRING(30,15) To read a HEX value eight characters long at address 100: READ HEX(100,8) To read a four-byte INT value on the tag at address 18: READ INT(18,4) To read a STRING value of five characters, a HEX value of seven characters, an INT value four-bytes long, and an INT value located at addresses 20, 25, 32, and 36 respectively: READ STRING(20,5),HEX(25,7),INT(32,4),INT(36,1) [WRITE FIELD] Examples Use this command to write a STRING value that is eleven characters long to address 18 with the data HELLO WORLD: WRITE STRING(18,11)="HELLO WORLD" Use this command to write a four-byte INT value to address 23 with data 1,234,567: WRITE INT(23,4)=1234567 Use this command to write three one-byte INT values and two 2-byte INT values to addresses 20, 30, 40, 50, and 52 with data the A, 10, 20, 600 and 2000 hexadecimal, respectively: WRITE NT(20,1)='A',INT(30)=10,INT(40,1)=20,INT(50,2)=600, INT(52,2)=H2000 Basic Reader Interface Programmer Reference Manual 85

  • 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
85
Understanding [READ FIELD] and [WRITE FIELD] Parameters
Error checking occurs when a command is executed. If the syntax of the parameter is
invalid, an error is reported. If the error occurs during the execution of a command,
the appropriate response is returned from the BRI.
When reading or writing data from or to a tag, the entire address space of the tag is
available.
For example, suppose a [READ FIELD] parameter was specified as
INT(126,4)
and the maximum tag memory address was 127. When the BRI executes this
command, it returns RDERR because this [READ FIELD] parameter is asking to
read four memory locations starting at address 126 (trying to read locations 126,
127, 128, and 129). This would try to read data two tag memory locations past the
end of tag memory.
[READ FIELD] Examples
To read a STRING value 15 characters long at address 30:
READ STRING(30,15)
To read a HEX value eight characters long at address 100:
READ HEX(100,8)
To read a four-byte INT value on the tag at address 18:
READ INT(18,4)
To read a STRING value of five characters, a HEX value of seven characters, an INT
value four-bytes long, and an INT value located at addresses 20, 25, 32, and 36
respectively:
READ STRING(20,5),HEX(25,7),INT(32,4),INT(36,1)
[WRITE FIELD] Examples
Use this command to write a STRING value that is eleven characters long to address
18 with the data
HELLO WORLD
:
WRITE STRING(18,11)=”HELLO WORLD”
Use this command to write a four-byte INT value to address 23 with data
1,234,567
:
WRITE INT(23,4)=1234567
Use this command to write three one-byte INT values and two 2-byte INT values to
addresses 20, 30, 40, 50, and 52 with data the
A
,
10
,
20
,
600
and
2000
hexadecimal,
respectively:
WRITE NT(20,1)=’A’,INT(30)=10,INT(40,1)=20,INT(50,2)=600,
INT(52,2)=H2000