Intermec IP2L Basic Reader Interface Programmer's Reference Manual (BRI versio - Page 125

Creating and Using BRI Macros

Page 125 highlights

Chapter 4 - BRI Commands Response: Command: Response: Command: Response: HABCDEF1111111111 HABCDEF2222222222 HABCDEF3333333333 HABCDEF4444444444 OK> READ STR(18,5) This command reads a string from the tag and finds three tags in the field. "HELLO" "CLOSE" "FIELD" OK> READ "PRICE ", INT(28,2), "QUANTITY ", INT(30,2) This READ command reads two numeric fields from a tag and finds three tags in the field. This command also shows how to make the response more readable using [LITERAL] parameters PRICE and QUANTITY. One tag also returns a read error for the second field. PRICE 89 QUANTITY 100 PRICE 139 QUANTITY 12 PRICE 39 QUANTITY RDERR OK> Creating and Using BRI Macros Macros provide a shorthand method for defining and sending complex BRI commands without sending all of the command line parameters each time the command is used. Macros let you create shorter, more convenient commands. You can send two types of macros: • A command macro contains a BRI command or sequence of BRI commands to be executed. • A parameter macro contains a list of parameters to be used when executing a BRI command. Your macro can contain any BRI commands, command line parameters, and reserved keywords. Macros are stored in the non-volatile memory of the reader. The following sections explain how to create, invoke, list, view, and delete macros. If you prefer looking at command descriptions: • see "SET" on page 62. The SET command lets you create, list, and delete macros. • see "PRINT" on page 52. The PRINT command lets you view the contents of a macro. Basic Reader Interface Programmer Reference Manual 113

  • 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
113
Response:
HABCDEF1111111111<CRLF>
HABCDEF2222222222<CRLF>
HABCDEF3333333333<CRLF>
HABCDEF4444444444<CRLF>
OK><CRLF>
Command:
READ STR(18,5)<CRLF>
This command reads a string from the tag and finds three tags in the field.
Response:
“HELLO”<CRLF>
“CLOSE”<CRLF>
“FIELD”<CRLF>
OK><CRLF>
Command:
READ “PRICE ”, INT(28,2), “QUANTITY ”, INT(30,2)<CRLF>
This READ command reads two numeric fields from a tag and finds three tags in
the field. This command also shows how to make the response more readable using
[LITERAL] parameters PRICE and QUANTITY. One tag also returns a read error for
the second field.
Response:
PRICE 89 QUANTITY 100<CRLF>
PRICE 139 QUANTITY 12<CRLF>
PRICE 39 QUANTITY RDERR<CRLF>
OK><CRLF>
Creating and Using BRI Macros
Macros provide a shorthand method for defining and sending complex BRI
commands without sending all of the command line parameters each time the
command is used. Macros let you create shorter, more convenient commands.
You can send two types of macros:
A command macro contains a BRI command or sequence of BRI commands to
be executed.
A parameter macro contains a list of parameters to be used when executing a BRI
command.
Your macro can contain any BRI commands, command line parameters, and
reserved keywords.
Macros are stored in the non-volatile memory of the reader.
The following sections explain how to create, invoke, list, view, and delete macros. If
you prefer looking at command descriptions:
see
“SET” on page 62
. The SET command lets you create, list, and delete
macros.
see
“PRINT” on page 52
. The PRINT command lets you view the contents of a
macro.