64
C-Macro Builder TM Technical Description, User’s Guide english

C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

  • Upload
    others

  • View
    12

  • Download
    0

Embed Size (px)

Citation preview

Page 1: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM Technical Description, User’s Guide

english

Page 2: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

Page 3: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation
Page 4: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

www.balluff.com

3

1 GENERAL INFORMATION 5

Typographical Conventions 5 1.1 Symbols 6 1.2 Abbreviations 6 1.3

2 OVERVIEW 7

The C-Macro Builder GUI 7 2.1 Saving the Macro 9 2.2

3 MACRO COMMANDS 10

Macro Configuration Commands 10 3.1

4 SINGLE-TAG COMMANDS 18

Single-Tag Search 18 4.1 Single-Tag Read ID 19 4.2 Single-Tag Read Data 19 4.3 Single-Tag Start Continuous Read Data 20 4.4 Single-Tag Stop Continuous Read Data 21 4.5 Single-Tag Write Data 22 4.6 Single-Tag Fill Data 23 4.7 Single-Tag Write Timestamp 25 4.8 Single-Tag Increment / Decrement Data 26 4.9

Single-Tag Write AFI 27 4.10 Single-Tag Lock AFI 28 4.11 Single-Tag Lock Memory Blocks 28 4.12 Single-Tag EAS Operation 29 4.13

5 MULTI-TAG COMMANDS 31

Multi-Tag Inventory 31 5.1 Multi-Tag Search 32 5.2 Multi-Tag Read Data 33 5.3 Multi-Tag Write Data 35 5.4 Multi-Tag Fill Data 36 5.5 Multi-Tag Write AFI 38 5.6 Multi-Tag Lock AFI 39 5.7 Multi-Tag EAS Operation 41 5.8

6 SET / CLEAR OUTPUT COMMANDS 43

Set Outputs 43 6.1 Clear Outputs 44 6.2

Page 5: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

4

7 MACRO SPECIFIC COMMANDS 46

Labels 46 7.1 Branch 47 7.2 Conditional Branch 49 7.3 Transmit Last Response 54 7.4 Transmit Custom String 55 7.5 Execute Macro 56 7.6 Wait 58 7.7 Note 58 7.8 Wait 59 7.9

End 59 7.10

APPENDIX 61

ASCII Table 61

Page 6: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

www.balluff.com

5

1 General Information

Balluff GmbH reserves the right to make modifications and improvements to its products and/or documentation without prior notification. Balluff GmbH shall not be liable for technical or editorial errors or omissions contained herein, nor for incidental or consequential damages resulting from the use of this material. The text and graphic content of this publication may be used, printed and distributed only when all of the following conditions are met: – Permission is first obtained from Balluff GmbH. – The content is used for non-commercial purposes only. – The content is not modified. The following are trademarks and/or registered trademarks of Balluff GmbH: Subnet16™, RFID AT WORK™, C-Macro™, C-Macro Builder™, CBx™ and Balluff Dashboard™. Third party product names mentioned herein are used for identification purposes only and may be trademarks and/or registered trademarks of their respective companies: Philips, Rockwell Automation (ControlLogix, RSLogix), Texas Instru-ments, Infineon, Modbus® TCP/IP, Modicon, Belden, Microsoft and the Open DeviceNet Vendor Association (ODVA).

Typographical 1.1

Conventions

Enumerations Syntax

The following conventions are used in this manual:

Enumerations are shown as a list with an en-dash.

– Entry 1.

– Entry 2.

Numbers:

– Decimal numbers are shown without additional indicators (e.g. 123).

– Hexadecimal numbers are shown with the additional indicator 0x (e.g. 0x7B).

Parameters: Parameters or Commands are shown in italics (e.g. CRC_16).

Page 7: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

6

1 General Information

Symbols 1.2

Note Visit www.balluff.com for more information on available software and accessories.

Abbreviations 1.3 AFI Application Family Identifier BIS Balluff Identification System EAS Electronic Article Surveillance GUI Graphical User Interface LSB Least Significant Byte MSB Most Significant Byte PC Personal Computer RFID Radio Frequency Identification Tag Data carrier ID Identifier

Page 8: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

www.balluff.com

7

2 Overview The C-Macro Builder is a software tool that allows the quick creation and

compilation of Macros, or simple programs of instructions, that can be loaded into the Balluff BIS M-6xx and BIS U-6xx Series of RFID controllers.

When executed, these macros can direct an RFID Controller to perform sequences of various operations, such as writing and reading data to and from an RFID tag, comparing the results of read data, filling or clearing a tag, transmitting custom string information based on the results of logical comparisons of the data, or setting / clearing outputs, as well as some other capabilities.

The C-Macro Builder tool allows a user to create these macros with an intuitive drag-and-drop interface that displays the macro as human readable instructions, in a simple macro programming language.

Once the macro is completely created, the C-Macro Builder tool can save a compiled version of the macro, a string of byte values that the BIS M RFID Controllers can parse and execute, to a file on the user’s PC. This compiled macro can then be loaded into a BIS M-6xx or BIS U-6xx Series RFID Controller by other programs such as the Balluff Dashboard Configuration Tool.

Each BIS M-6xx and BIS U-6xx Series RFID Controller has space for eight macros of up to 255 bytes each, which are numbered 1 through 8. Since macros also have the ability to execute other macros, they may be chained together to create even larger programs.

The C-Macro 2.1 Builder GUI

The C-Macro Builder GUI is a window that is divided into two main sections, the Command List and the Macro Workspace.

Page 9: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

8

2 Overview The C-Macro Builder GUI

The left portion of the window is the Command List Area, a list of available commands for use in building a macro. These commands will be addressed individually later.

The right portion of the window is the Macro Workspace Area, the area where the macro is built.

To build a macro, items from the Command List Area are dragged one at a time (via the mouse), and dropped into the appropriate spot in the Macro Workspace Area.

Once a command is dropped into the workspace, a popup dialog box will appear, allowing the user to enter specific options of that command. For example, if a user drops a Tag Read Data command into the workspace, the following dialog box will appear:

The user then enters the appropriate values into the fields of the dialog box – in

this case, the Start address, the Read Length, and the Timeout values of the Tag Read Data command. Once the appropriate values have been entered, the user clicks Apply and the command is inserted into the macro. If the user clicks Cancel the command is not inserted.

Once the command has been inserted, the parameters may be edited by double clicking on the item. Some items have no editable parameters, so there is no asso-ciated popup dialog window.

A command may also be repositioned within the macro by dragging it with the mouse. Commands may be deleted by first selecting the command with the mouse and pressing the delete key,

When the program is eventually executed by the RFID Controller, macro execution begins at the top, and executes each command in sequence, sending the command’s response back to the host. There are various branching commands that will be discussed later that can redirect the execution to other parts of the macro.

While the macro is being built, the total length of the macro’s compiled string is displayed in a title bar above the workspace area. This status information allows the user to see how much physical space remains for this particular macro, up to a maximum of 255 bytes.

Page 10: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

www.balluff.com

9

2 Overview

Saving the 2.2Macro

The C-Macro Builder compiles the macro into its string of byte values, as the macro is created. This string of bytes can be seen at the bottom of the workspace area, in a small grey section of the window. This display area can be enabled or disabled from the Display Options menu. It is largely for diagnostics or for advanced users, and most users will not care about the actual byte strings that are created.

To save the source file of the macro (the file that C-Macro Builder uses to create the compiled macro) the user clicks on Save Macro As in the File menu. This will prompt the user to save two files, first the Macro Source File with the file extension .MSF and then the compiled macro with the file extension *.MACRO.

Loading the macro into a BIS M-6xx or BIS U-6xx RFID Controller is accomplished by using another program. The C-Macro Builder tool itself only builds the macro. Refer to the documentation of other programs, such as the Balluff Dashboard Configuration Tool, which can load the compiled macros into the BIS M-6xx and BIS U-6xx Series RFID Controllers.

Page 11: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

10

3 Macro Commands For this document, commands will be grouped into 5 types of commands:

Macro Configuration Commands Commands used to configure the behavior of the macro, handling and customizing of responses. Tag Read, Write, Lock and EAS Commands (Single Tag) Commands used to read/write data from/to a tag, lock portions of the tag, or perform EAS operations upon the tag, when only one tag is expected in the field. Multi-Tag Commands Commands used in situations where more than one tag is expected in the field during the timeout period. Set / Clear Output Commands Commands used to SET or CLEAR outputs of an RFID Controller (or Hub) Macro Specific Commands Commands that are used to do a variety of special functions related to the execution of the macro, such as performing conditional checks on results, transferring control of macro execution to other parts of the macro (or even other macros), labeling execution points of the macro, transmitting custom messages, inserting delays, inserting descriptive comments, or ending macro execution.

Macro 3.1

Configuration Commands

The following commands are used to configure the behavior of the macro: − Macro Response Options

− Macro Response Options (Legacy)

− Error Behavior Options

− Custom Header / Terminator

Macro Response Options

This command allows the macro to configure the response options of the macro, and determine what response types are enabled, disabled, or customized.

There are five types of response types from a BIS M-6xx or BIS U-6xx RFID Controller:

Response Type Description of Response

Command Successful Response (ACK)

A response which echoes the command code to indicate the command was successful

Tag Data Response A response which includes data Error Response A response that includes an error code Multi-Tag NTAG response A response that is sent after the end of a multi-tag

command that includes only the number of tags on which the operation was performed.

Custom String Response A response that sends a custom-defined string

Page 12: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

www.balluff.com

11

3 Macro Commands Macro Response Options

By default, when a macro begins, all five types of responses generated by the RFID Controller during the execution of the macro are sent back to the host. This command allows the macro to change the handling of each type of response.

When the item is inserted into a macro, the following dialog box appears:

Each of the five response types has three options available:

Option Description

Enabled This type of response is enabled and will be sent to the host Disabled This type of response is disabled (“silenced”) and will not be sent

to the host Custom This type of response will use Custom Header/Terminator bytes

defined by the Custom Header/Terminator macro command

Example 1:

In the following example, this command is used to hide Tag Not Found errors, and instead, flashes Hub Output A if the tag is not found. If the Tag ID is successfully read, then it is sent to the host with the Transmit Last Response command.

Page 13: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

12

3 Macro Commands Macro Response Options

Example 2:

In the following example, this command is used in conjunction with the Custom Header/Terminator command to change the header and terminator characters of a Read Tag ID response

The Macro loops indefinitely, and if a Tag ID is successfully read, then it is sent to the host with the custom header “<” and the custom terminator “>” – no other responses will be sent to the host (i.e. Tag Not Found Errors)

Note The Macro Response Options command can be used to change these settings “on the fly”, to different settings, anywhere in the macro.

Note Only RFID controllers with serial interfaces (RS232, USB etc.) that use the ABx protocol can have responses set to Custom with this command. The header and terminators of CBx responses cannot be customized or changed.

Page 14: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

www.balluff.com

13

3 Macro Commands Macro Response Options (Legacy)

Options Values

Legacy Response Mode Enable All Macro Responses Disable Macro Responses (Except Errors Disable All Macro Responses (Silent Mode)

This is a legacy command that allows the macro to change modes, and either silence all 5 types of responses, or re-allow them. The new version of this command allows greater control over these responses, but this command is left for legacy macros.

By default, when a macro begins, all responses generated by the RFID Controller during the execution of the macro, either successful responses, or error responses, are sent back to the host.

When the item is inserted into a macro, the following dialog box appears:

The user can choose one of the three legacy response modes.

Option Description

Enable All Macro Responses

When this command is encountered with this option selected, the macro is put into a mode where all responses (errors included) are sent to the host. This is the default.

Disable Macro Responses

(Except Errors)

When this command is encountered with this option selected, the macro is put into a mode where successful responses are not sent back to the host, but error responses are.

Disable All Macro Responses (Silent Mode)

When this command is encountered with this option selected, the macro is put into a silent mode where both successful responses and error responses are not sent back to the host.

Page 15: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

14

3 Macro Commands Macro Response Options (Legacy)

Example 1: In the following example, this command, with Disable All Macro Responses (Silent Mode) selected, is used to hide Tag Not Found errors, and instead, flashes Hub Output A if the tag is not found. If the Tag ID is successfully read, then it is sent to the host with the Transmit Last Response command.

Example 2:

In the following example, this command is used twice – first to silence the macro while reading the first 5 bytes of a tag, and then to re-enabled macro responses, to read and report the tag serial number, but only if the first 5 bytes of the tag had a string less than the string “44444”

This command may be inserted anywhere in a macro, and when encountered, puts the macro into that mode from that point onward.

Page 16: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

www.balluff.com

15

3 Macro Commands Error Behavior Options

Options Values

Error Behavior Mode On Error, Halt Macro, or On Error, Continue Macro

This command instructs the macro whether to continue, or halt on errors.

When the item is inserted into a macro, the following dialog box appears:

By default, when a macro begins, all errors generated by commands during the execution of the macro cause the macro to halt at that point - this includes errors such as Tag Not Found. Example 1: In the following example, this command is used to allow the macro to continue even if the Tag Read ID command fails. Without this command, a Tag Not Found error would cause the macro to immediately end, and the Execute Macro 2 command would never get executed.

Custom Header / Terminator

Option Values Set Custom Header / Terminator for (Response Type)

Command ACK Responses Tag Data Responses Error Responses Multi-Tag NTAG Responses Custom String Responses

Custom Header 0-10 bytes of Hex or ASCII data Custom Header Length (Bytes)

Value 0-10

Custom Terminator 0-10 bytes of Hex or ASCII data Custom Terminator Length (Bytes)

Value 0-10

Display Mode (Data entry only)

Hex or ASCII

Page 17: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

16

3 Macro Commands Custom Header / Terminator

By default, when a macro begins, all five types of responses generated by the RFID Controller during the execution of the macro (described under 3.1 Macro Response Options) are sent back to the host with the standard ABX Header / Terminator characters. This command, in conjunction with the Macro Response Options macro command, allows the macro to change the header and terminator characters of each type of response. If the particular response-type’s behavior has been set to Custom in the Macro Response Options command, then this command is used to define the custom header and terminator characters.

Custom Header / Terminator

When the item is inserted into a macro, the following dialog box appears:

In the top Set Custom Header / Terminator for: portion of the dialog box, the type of response to be customized is chosen.

In the bottom Custom Header / Terminator portion of the dialog box, the custom header and terminator bytes can be specified, in either HEX or ASCII. The custom header and terminator can be anywhere from 0 to 10 bytes long.

Note You can only change 1 response-type’s header/terminator characters per command. If the header / terminators are to be changed for all five types of responses, then 5 commands will be needed.

Note Only RFID controls with serial interfaces (RS232, USB etc.) that use the ABx protocol can use this command. The header and terminators of CBx responses cannot be customized or changed.

Page 18: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

www.balluff.com

17

3 Macro Commands Custom Header / Terminator

Example 1: In the following example, this command is used in conjunction with the Macro Re-sponse Options command to change the header and terminator characters of a Read Tag ID response

The Macro loops indefinitely, and if a Tag ID is successfully read, then it is sent to the host with the custom header “<” and the custom terminator “>” – no other re-sponses will be sent to the host (i.e. “Tag Not Found” Errors)

Note The Custom Header / Terminator Command can be used to change the custom header / terminators of a response type on the fly, to different values, anywhere in the macro.

Page 19: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

18

4 Single-Tag Commands The following commands are used to read / write data from / to a tag, lock portions

of the tag, or perform EAS operations upon the tag, when only one tag is expected in the field.

Single-Tag 4.1 Search

Options Values

Timeout in milliseconds 0-65535

This command performs a Tag Search command.

When this command is executed, the result, either a Tag Found message, or a Tag Not Found error is sent to the host.

When the item is inserted into a macro, the following dialog box appears:

Example 1: In the following example, the Tag Search command is used to determine if a tag is present, without actually doing a read or write operation. If a tag is found, a Tag found message is sent the host. If no tag is found, a Tag Not Found error is sent to the host.

Page 20: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

www.balluff.com

19

4 Single-Tag Commands

Single-Tag 4.2 Read ID

Options Values

Timeout in milliseconds 0-65535

This command performs a Tag Read ID command.

When this command is executed, the ID of a tag is read. If the Tag ID is read suc-cessfully, it is sent to the host. If the Tag ID is not read, the appropriate error is sent to the host.

When the item is inserted into a macro, the following dialog box appears:

Example 1: In the following example, the Tag Read ID command is used to read the Tag ID which the Tag ID is sent to the host. If the first 4 bytes of the Tag ID are less than “4444” then controller output A is set, otherwise the macro ends.

Single-Tag 4.3

Read Data Options Values

Start Address 0-65535 Read Length (Bytes) 0-247 Timeout in milliseconds 0-65535

This command performs a Tag Read Data command.

When this command is executed, data is read from the tag at the starting address for the specified read length. If the data is read successfully, it is sent to the host. If the data is not read, the appropriate error is sent to the host.

Page 21: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

20

4 Single-Tag Commands Single-Tag Read Data

When the item is inserted into a macro, the following dialog box appears:

Example 1: In the following example, the Tag Read Data command is used to read 10 bytes from the tag at address 0, and the result is transmitted back to the host. If the first 5 bytes read equal “HELLO” then controller output A is set, otherwise the macro ends.

Single-Tag 4.4

Start Continuous Read Data

Options Values

Start Address 0-65535 Read Length (Bytes) 0-247 Timeout in milliseconds 0-65535

This command performs a Start Continuous Read command.

When this command is executed, the RFID Controller begins operating in Continuous Read Mode – however continuous reads won’t begin until the macro is finished.

This command is not used to read actual data for processing within a macro - it only instructs the RFID Controller to begin continuous reads once the macro terminates.

Page 22: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

www.balluff.com

21

4 Single-Tag Commands Single-Tag Start Continuous Read Data

When the item is inserted into a macro, the following dialog box appears:

Example 1: In the following example, 5 bytes are read from address 0 of the tag, and if these bytes equal “START”, then the macro starts Continuous Read Mode, reading 100 bytes from address 0. The continuous reading begins when the macro ends.

Single-Tag 4.5

Stop Continuous Read Data

Options Values

None

This command performs a Stop Continuous Read command.

When this command is executed, the RFID Controller stops operating in Continuous Read Mode – when the macro terminates, the RFID Controller will not resume continuous reads.

Since there are no editable items for this command, when the item is inserted into a macro, no dialog box appears.

Example 1: In the following example, 10 bytes are read from address 0 of the tag, and sent to the host. If the first 4 bytes equal “STOP”, then the macro stops Continuous Read Mode.

Page 23: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

22

4 Single-Tag Commands

Single-Tag 4.6 Write Data

Options Values

Start Address 0-65535 Write Length (Bytes) 0-241 Timeout in milliseconds 0-65535 Write Data 0 to 241 bytes of either ASCII or HEX Data Display Mode HEX or ASCII

This command performs a Tag Write Data command.

When this command is executed, data is written to a tag at a specified address for the specified write length. If the data is successfully written, a Tag Write Data ACK response is sent to the host. If the write fails, the appropriate error is sent to the host.

When the item is inserted into a macro, the following dialog box appears:

To enter the data to be written to the tag, it may be typed into the Write Data box, in either ASCII text, or in 2 digit HEX values separated by spaces.

ASCII Data Example: HEX Data Example:

Page 24: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

www.balluff.com

23

4 Single-Tag Commands Single-Tag Write Data

The data written to the tag is the same either way – this is just for convenience of data entry, or for human-readability.

Note Writing the ASCII string ‘1’ ’2’ ’3’ ’4’ ’5’ to a tag writes the HEX values 31 32 33 34 35 – it is important to realize that when you enter numbers in ASCII mode, that these are the ASCII characters themselves, and not the numerical equivalent. If you wanted to write the actual byte values 0x01 0x02 0x03 0x04 0x05, you would need to use HEX data entry mode.

Example 1:

In the following example, the first 10 bytes of a tag are read, and sent to the host. If the first 5 bytes equal “HELLO”, then the Tag Write Data command is used to write the string “GOODBYE” to the tag at tag address 100.

Single-Tag 4.7

Fill Data Options Values

Start Address 0-65535 Fill Length (Bytes) 0-241 Timeout in milliseconds 0-65535 Fill Byte 1 byte of either ASCII or HEX Data Display Mode HEX or ASCII

This command performs a Tag Fill Data command.

When this command is executed, a specified fill byte is written to a tag at a specified address for the specified length. If the data is successfully written, a Tag Fill Data ACK response is sent to the host. If the write fails, the appropriate error is sent to the host.

Page 25: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

24

4 Single-Tag Commands Single-Tag Fill Data

When the item is inserted into a macro, the following dialog box appears:

To enter the fill byte to be written to the tag, it may be typed into the fill byte box, as either an ASCII character, or as a 2 digit HEX value.

The fill byte value written to the tag is the same either way – this is just for convenience of data entry, or for human-readability.

Note Writing the ASCII character ‘1’ to a tag writes the HEX value 0x31 – it is important to realize that when you enter numbers in ASCII mode, that these are the ASCII characters themselves, and not the numeri-cal equivalent. If you wanted to write the actual byte value 0x01, you would need to use HEX data entry mode.

Example 1:

In the following example, the Tag Fill Data command is used to write the byte value 0xFF from address 0 though address 499 of the tag.

Note A fill length of 0 and start byte of 0 will fill the entire tag.

Page 26: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

www.balluff.com

25

4 Single-Tag Commands

Single-Tag 4.8 Write Timestamp

Options Values

Timestamp Format Byte Binary ASCII Format 1 ASCII Format 2 ASCII Format 3

Start Address 0-65535 Timeout in milliseconds 0-65535

This command performs a Tag Write Timestamp command.

When this command is executed, a timestamp is written in one of 4 different formats, to a tag. The time is taken from the RFID controller’s internal real-time clock (if present.) If the timestamp is written, a Tag Write Timestamp ACK response is sent to the host. If the tag write fails, the appropriate error is sent to the host.

When the item is inserted into a macro, the following dialog box appears:

The four timestamp formats are:

Format Description

7-Byte Binary (Format 0)

This format writes the timestamp in 7 bytes starting at the specified Start Address, in the form of Year MSB, Year LSB, Day of Month, Month, Hour, Minute, and Second.

ASCII Format 1 This format writes the timestamp in 19 bytes starting at the specified Start Address, in the form MM/DD/YYYY HH:MM:SS

ASCII Format 2 This format writes the timestamp in 19 bytes starting at the specified Start Address, in the form DD/MM/YYYY HH:MM:SS

ASCII Format 3 This format writes the timestamp in 19 bytes starting at the specified Start Address, in the form YYYY/MM/DD HH:MM:SS

Page 27: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

26

4 Single-Tag Commands Single-Tag Write Timestamp

Example 1: In the following example, the Tag Write Timestamp command is used to write the current timestamp to a tag in MM/DD/YYYY HH:MM:SS format

Single-Tag 4.9 Increment / Decrement Data

Options Values

Operation Increment of Decrement Start Address 0-65535 Data Length 1, 2 or 4 byte value By Value 0-255 for 1 byte values

0-65535 for 2 byte values 0-4294967296 for 4 byte values

Timeout in milliseconds 0-65535 This command performs a Tag Increment or Tag Decrement command.

When this command is executed, the RFID Controller will read data of the specified length at the specified Start Address, and either increment or decrement that value by the specified By value amount, and write the new value back to the same address. If the result is written successfully, a Tag Increment (or Decrement) Data ACK response is sent to the host. If the operation fails, the appropriate error is sent to the host.

The Data Length option specifies the byte-width of the value being incremented or decremented. A 1 byte value will increment up to 0xFF (255) and then wrap around to 0x00, whereas a 2 byte value will increment up to 0xFFFF (65535) before wrapping around to 0x0000. A 4 byte value will increment up to 0xFFFFFFFF (4294967296)

The values are arranged with the MSB first. When the item is inserted into a macro, the following dialog box appears:

Page 28: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

www.balluff.com

27

4 Single-Tag Commands Single-Tag Increment / Decrement Data

Example 1: In the following example, a 2 byte value at address 0 of a tag is incremented. If the resulting value is over 0x200 (512), then the message Tag Incremented over 512 times is sent to the host.

Single-Tag 4.10 Write AFI

Options Values

New AFI Byte 0-255 Timeout in milliseconds 0-65535

This command performs a Tag Write AFI command.

When this command is executed, a new AFI byte value is written to a tag. If the new AFI byte value is successfully written, a Tag Write AFI ACK response is sent to the host. If the write fails, the appropriate error is sent to the host.

When the item is inserted into a macro, the following dialog box appears:

Example 1:

In the following example, the value 128 is written to a tag as the new AFI Byte value.

Page 29: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

28

4 Single-Tag Commands

Single-Tag 4.11 Lock AFI

Options Values

Timeout in milliseconds 0-65535 This command is used to lock the AFI field of the tag.

When this command is successfully executed, the AFI Field of the tag will be permanently locked and the AFI byte value can then never be changed. If the AFI byte value is successfully locked, a Tag Lock AFI ACK response is sent to the host. If the command fails, the appropriate error is sent to the host.

When the item is inserted into a macro, the following dialog box appears:

Example 1:

In the following example, the AFI Byte is locked in the tag.

Single-Tag 4.12

Lock Memory Blocks

Options Values

Start Block 0-255 Number of Blocks 0-255 Timeout in milliseconds 0-65535

This command is used to Lock Memory Blocks of the tag.

When this command is successfully executed, the specified memory blocks of the tag will be permanently locked and the blocks can then never be changed. If the command succeeds, a Tag Lock Memory Blocks ACK response is sent to the host. If the command fails, the appropriate error is sent to the host.

When the item is inserted into a macro, the following dialog box appears:

Page 30: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

www.balluff.com

29

4 Single-Tag Commands Single-Tag Lock Memory Blocks

Example 1:

In the following example, the 10 memory blocks of the tag starting at block 20 are locked.

Note Memory blocks are different sizes for different tag types.

Single-Tag 4.13 EAS Operation

Options Values

EAS Operation Set, Clear, Lock or Alarm Timeout in milliseconds 0-65535

This command is used to perform one of the following EAS Operation on a tag:

– Set EAS

– Clear EAS

– Lock EAS

– Alarm EAS When the item is inserted into a macro, the following dialog box appears:

Page 31: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

30

4 Single-Tag Commands Single-Tag EAS Operation

The four EAS Operations are:

Operation Description Set EAS This operation sets the EAS bit of the tag. When this bit is

set, the tag will respond when an Alarm EAS operation is performed.

Clear EAS This operation clears the EAS bit of the tag. When this bit is cleared, the tag will NOT response when an Alarm EAS operation is performed.

Lock EAS This operation permanently locks the EAS bit of tag in its current setting of either being set or cleared. Once locked, it can never be changed.

Alarm EAS This operation causes any tag that has its EAS bit set to respond. Tags that do not have EAS functionality, or have their EAS bit cleared will not respond. If any tags respond, the response will be a standard Command ACK response. Otherwise, a “Tag not found” response will be generated.

Example 1:

In the following example, the EAS bit is cleared in the tag.

Example 2:

In the following example, the Alarm EAS command is sent to the tag. If the EAS bit has been set (as in the previous example) then the tag will respond with an Alarm, and an Alarm EAS ACK response is returned to the host. If the EAS bit is not set (cleared) or is not supported in the tag, then a Tag Not Found response is returned to the host.

Page 32: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

www.balluff.com

31

5 Multi-Tag Commands The following Multi-Tag Commands are used in situations where more than one

tag is expected in the field during the timeout period.

Multi-Tag 5.1 Inventory

Options Values

Anti-Collision Modes Single-Slot or Multi-Slot AFI Byte 0-255 Tag Limit 0-255 Timeout in milliseconds 0-65535

This command performs a Multi-Tag Inventory command.

When this command is executed, a separate response containing the Tag ID will be generated and sent to the host for each tag that is found. After the timeout ex-pires, a final NTAGS Response is sent to the host containing the total number of tags found during the entire timeout period.

When the item is inserted into a macro, the following dialog box appears:

The AFI Byte value can be used to filter which tag respond to this command. An AFI byte value of 0 means All Tags, whereas any other non-zero value means Only Tags with this AFI byte value

The Anti-Collision Mode determines which ISO15693 Anti-Collision Mode is used.

The Tag Limit specifies a maximum number of tags to report.

Page 33: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

32

5 Multi-Tag Commands Multi-Tag Inventory

Example 1:

In the following example, a Multi-Tag Inventory command is used with the options:

– Multi-Slot Anti-Collision

– Tag Limit of 10 tags

– AFI Byte value of 25

– Timeout of 5 seconds.

The first (up to 10) tags with an AFI Byte value of 25 that the controller finds will generate responses to the host that contain the Multi-Tag Inventory opcode, and the ID of the tag. When a total of 10 tags are found, or the five second Timeout is reached whichever comes first, a final NTAGS Response will be returned to the host containing the total number of tags found.

Example 2: In the following example, a Multi-Tag Inventory command is used with the options

– Multi-Slot Anti-Collision

– Tag Limit of 100 tags

– AFI Byte value of 0

– Timeout of 5 seconds.

The first (up to 100) tags that the controller finds will generate responses to the host that contain the Multi-Tag Inventory opcode, and the ID of the tag. When a total of 100 tags are found, or the five second Timeout is reached whichever comes first, a final NTAGS Response will be returned to the host containing the total number of tags found. Note that the AFI Byte value of the tags can be any value, since 0 was used for the AFI Byte.

Multi-Tag 5.2 Search

Options Values

Anti-Collision Modes Single-Slot or Multi-Slot AFI Byte 0-255 Tag Limit 0-255 Timeout in milliseconds 0-65535

This command performs a Multi-Tag Search command.

This command is exactly like the Multi-Tag Inventory command above, except that no Tag IDs are returned to the host, only the final NTAGS Response containing the number of tags found. This command is used when only the total number of tags in the field is required.

Page 34: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

www.balluff.com

33

5 Multi-Tag Commands Multi-Tag Search

When the item is inserted into a macro, the following dialog box appears:

The AFI Byte value can be used to filter which tag respond to this command. An AFI Byte value of 0 means All Tags, whereas any other non-zero value means Only Tags with this AFI Byte value.

The Anti-Collision Mode determines which ISO15693 Anti-Collision Mode is used.

The Tag Limit specifies a maximum number of tags to search for.

Example 1:

In the following example, a Multi-Tag Search command is used with the options:

– Multi-Slot Anti-Collision

– Tag Limit of 50 tags

– AFI Byte value of 255

– Timeout of 15 seconds.

The Controller will look for tags with an AFI Byte value of 255, until it finds 50 tags, or the 15 second Timeout is reached. An NTAGS Response will be returned to the host containing the total number of tags found.

Multi-Tag 5.3 Read Data

Options Values

Anti-Collision Modes Single-Slot or Multi-Slot Start Address 0-65535 Read Length (Byte) 0-243 AFI Byte 0-255 Tag Limit 0-255 Timeout in milliseconds 0-65535 Include ID with Data Checked or Unchecked

Page 35: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

34

5 Multi-Tag Commands Multi-Tag Read Data

This command performs a Multi-Tag Read Data command.

This command is used to Read data from multiple tags in the field. When this command is executed, data of the specified Read Length will be read from the specified Start Address from every tag found in the field with the specified AFI Byte value. For each tag that is found and read from, a separate response containing the data read from the tag will be generated and sent to the host. If Include ID with Data is checked, then the Tag ID will also be included in each response.

After the Timeout expires, a final NTAGS Response is sent to the host containing the total number of tags read from during the entire Timeout period.

When the item is inserted into a macro, the following dialog box appears:

The AFI Byte value can be used to filter which tags are read from with to this com-mand. An AFI Byte value of 0 means All Tags, whereas any other non-zero value means Only tags with this AFI Byte value.

The Anti-Collision Mode determines which ISO15693 Anti-Collision mode is used.

The Tag Limit specifies a maximum number of tags to write to.

Example 1:

In the following example, a Multi-Tag Read Data command is used to read 20 bytes starting at byte 0 of multiple tags. Other options in the command are:

– Multi-Slot Anti-Collision

– Tag Limit of 100 tags

– AFI Byte value of 128

– Timeout of 15 seconds

– Tag ID included in Data the responses.

When the command is executed, the first (up to 100) tags with an AFI Byte value of 128 that the controller finds will generate responses that contain the Multi-Tag Read Data opcode, the Tag ID and the specified data read from each tag.

When a total of 100 tags are found, or the 15 second Timeout is reached, whichever comes first, a final NTAGS Response will be returned to the host containing the total number of tags found and read from.

Page 36: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

www.balluff.com

35

5 Multi-Tag Commands Multi-Tag Read Data

Multi-Tag 5.4 Write Data

Options Values

Anti-Collision Modes Single-Slot or Multi-Slot Start Address 0-65535 Write Length (Byte) 0-247 AFI Byte 0-255 Tag Limit 0-255 Timeout in milliseconds 0-65535 Write Data 0-237 bytes of ASCII or Hex Data Display Mode ASCII or Hex

This command performs a Multi-Tag Write Data command.

This command is used to write data to multiple tags in the field. When this command is executed, the specified Write Data will be written at the specified Start Address for the specified Write Length to every tag found in the field with the specified AFI Byte value. For each tag that is found and written to, a separate response containing the ID of the tag will be generated and sent to the host. After the Timeout expires, a final NTAGS Response is sent to the host containing the total number of tags written to during the entire Timeout period.

When the item is inserted into a macro, the following dialog box appears:

Page 37: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

36

5 Multi-Tag Commands Multi-Tag Write Data

The AFI Byte value can be used to filter which tags are written to with to this command. An AFI Byte value of 0 means All Tags, whereas any other non-zero value means Only Tags with this AFI Byte value.

The Anti-Collision Mode determines which ISO15693 Anti-Collision Mode is used.

The Tag Limit specifies a maximum number of tags to write to.

Example 1:

In the following example, a Multi-Tag Write Data command is used to write “HELLO” starting at byte 0 of multiple tags. Other options in the command are:

– Multi-Slot Anti-Collision

– Tag Limit of 100 tags

– AFI Byte value of 128

– Timeout of 15 seconds.

When the command is executed, the first (up to 100) tags with an AFI Byte value of 128 that the controller finds and successfully writes “HELLO” to will generate responses that contain the Multi-Tag Write Data opcode and the Tag ID.

When a total of 100 tags are found, or the 15 second Timeout is reached, whichever comes first, a final NTAGS Response will be returned to the host containing the total number of tags found and written to.

Multi-Tag 5.5 Fill Data

Options Values

Anti-Collision Modes Single-Slot or Multi-Slot Fill Address 0-65535 Fill Length (Byte) 0-65535 AFI Byte 0-255 Tag Limit 0-255 Timeout in milliseconds 0-65535 Fill Byte ! ASCII or Hex Fill Byte

This command performs a Multi-Tag Fill Data command.

This command is used to fill portions of multiple tags in the field. When this command is executed, the specified Fill Byte value will be written at the specified Start Address for the specified Fill Length bytes to every tag found in the field with the specified AFI Byte value. For each tag that is found and written to, a separate response containing the ID of the tag will be generated and sent to the host. After the Timeout expires, a final NTAGS Response is sent to the host containing the total number of tags written to during the entire Timeout period.

Page 38: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

www.balluff.com

37

5 Multi-Tag Commands Multi-Tag Fill Data

When the item is inserted into a macro, the following dialog box appears:

A Start Address of 0 and Fill Length of 0 means Fill entire Tag.

The AFI Byte value can be used to filter which tags are written to with to this command. An AFI Byte value of 0 means All Tags, whereas any other non-zero value means Only Tags with this AFI Byte value.

The Anti-Collision Mode determines which ISO15693 Anti-Collision Mode is used.

The Tag Limit specifies a maximum number of tags to write to.

Example 1:

In the following example, a Multi-Tag Fill Data command is used to write the Fill Byte 0x00 from Start Address 100 for a Fill Length of 50 bytes to multiple tags. Other options in the command are:

– Multi-Slot Anti-Collision

– Tag Limit of 100 tags

– AFI byte value of 0

– Timeout of 15 seconds.

When the command is executed, the first (up to 100) tags that the controller finds and successfully writes 50 bytes of 0x00 starting at address 100 will generate responses that contain the Multi-Tag Fill Data opcode and the Tag ID.

When a total of 100 tags are found, or the 15 second Timeout is reached, whichever comes first, a final NTAGS Response will be returned to the host containing the total number of tags found and written to.

Page 39: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

38

5 Multi-Tag Commands Multi-Tag Fill Data

Example 2:

In the following example, a Multi-Tag Fill Data command is used to completely fill multiple tags with 255 (0xFF) bytes. Other options in the command are:

– Multi-Slot Anti-Collision

– Tag Limit of 100 tags

– AFI Byte value of 0

– Timeout of 15 seconds.

When the command is executed, the first (up to 100) tags that the controller finds and successfully fills with 0xFFs will generate responses that contain the Multi-Tag Fill Data opcode and the Tag ID.

When a total of 100 tags are found, or the 15 second Timeout is reached, whichever comes first, a final NTAGS Response will be returned to the host containing the total number of tags found and filled.

Multi-Tag 5.6 Write AFI

Options Values

Anti-Collision Modes Single-Slot or Multi-Slot New AFI Byte 0-255 AFI Byte 0-255 Tag Limit 0-255 Timeout in milliseconds 0-65535

This command performs a Multi-Tag Write AFI command.

This command is used to write a New AFI Byte to multiple tags in the field. When this command is executed, the specified New AFI Byte will be written to every tag found in the field with the specified AFI Byte value. For each tag that is found and written to, a separate response containing the ID of the tag will be generated and sent to the host. After the Timeout expires, a final NTAGS Response is sent to the host containing the total number of tags written to during the entire Timeout period.

When the item is inserted into a macro, the following dialog box appears:

Page 40: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

www.balluff.com

39

5 Multi-Tag Commands Multi-Tag Write AFI

The AFI Byte value can be used to filter which tags are written to with to this command. An AFI Byte value of 0 means All Tags, whereas any other non-zero value means Only Tags with this AFI Byte value.

The Anti-Collision Mode determines which ISO15693 Anti-Collision Mode is used.

The Tag Limit specifies a maximum number of tags to write to. Example 1:

In the following example, a Multi-Tag Write AFI command is used to change the AFI Byte value of multiple tags, from 1 to 2. Other options in the command are:

– Multi-Slot Anti-Collision

– Tag Limit of 100 tags

– Timeout of 15 seconds.

When the command is executed, the first (up to 100) tags with An AFI Byte value of 1 that the controller finds and successfully writes a New AFI Byte value of 2 will generate responses that contain the Multi-Tag Write AFI opcode and the Tag ID.

When a total of 100 tags are found, or the 15 second Timeout is reached, whichever comes first, a final NTAGS Response will be returned to the host containing the total number of tags found and written to.

Multi-Tag 5.7 Lock AFI

Options Values

Anti-Collision Modes Single-Slot or Multi-Slot AFI Byte 0-255 Tag Limit 0-255 Timeout in milliseconds 0-65535

This command performs a Multi-Tag Lock AFI command.

This command is used to lock the AFI Byte value of multiple tags in the field. When this command is executed, the AFI Byte will be locked in every tag found in the field with the specified AFI Byte value. For each tag that is found and locked, a separate response containing the ID of the tag will be generated and sent to the host. After the Timeout expires, a final NTAGS Response is sent to the host containing the total number of tags locked during the entire Timeout period.

Page 41: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

40

5 Multi-Tag Commands Multi-Tag Lock AFI

When the item is inserted into a macro, the following dialog box appears:

The AFI Byte value can be used to filter which tags are locked with to this command. An AFI Byte value of 0 means All Tags, whereas any other non-zero value means Only Tags with this AFI Byte value.

The Anti-Collision Mode determines which ISO15693 Anti-Collision Mode is used.

The Tag Limit specifies a maximum number of tags to lock.

Example 1:

In the following example, a Multi-Tag Lock AFI command is used to permanently lock the AFI Byte value of multiple tags. Other options in the command are:

– Multi-Slot Anti-Collision

– Tag Limit of 100 tags

– AFI Byte value of 0

– Timeout of 15 seconds.

When the command is executed, the first (up to 100) tags that the controller finds and successfully locks the AFI Byte value of will generate responses that contain the Multi-Tag Lock AFI opcode and the Tag ID.

When a total of 100 tags are found, or the 15 second Timeout is reached, whichever comes first, a final NTAGS Response will be returned to the host containing the total number of tags found and locked.

Page 42: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

www.balluff.com

41

5 Multi-Tag Commands

Multi-Tag 5.8 EAS Operation

Options Values

Anti-Collision Modes Single-Slot or Multi-Slot EAS Operation Set, Clear, Lock or Alarm AFI Byte 0-255 Tag Limit 0-255 Timeout in milliseconds 0-65535

This command performs one of four Multi-Tag EAS Operation commands on multiple tags in the field.

When this command is executed, the specified EAS Operation will be performed on every tag found in the field. For each tag that is found and operated on, a sepa-rate response containing the ID of the tag will be generated and sent to the host. After the Timeout expires, a final NTAGS Response is sent to the host containing the total number of tags that the operation has been performed on during the entire Timeout period.

The four EAS Operations are:

Operation Description

Set EAS This operation sets the EAS bit of the tag. When this bit is set, the tag will respond when an Alarm EAS operation is performed.

Clear EAS This operation clears the EAS bit of the tag. When this bit is cleared, the tag will NOT response when an Alarm EAS operation is performed.

Lock EAS This operation permanently locks the EAS bit of tag in its current setting of either being set or cleared. Once locked, it can never be changed.

Alarm EAS This operation causes any tag that has its EAS bit set to respond. Tags that do not have EAS functionality, or have their EAS bit cleared will not respond. If any tags respond, the response will contain the ID of the tag (unlike the Single-Tag EAS Operation command)

When the item is inserted into a macro, the following dialog box appears:

Page 43: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

42

5 Multi-Tag Commands Multi-Tag EAS Operation

The AFI Byte value can be used to filter which tags are operated on with to this command. An AFI Byte value of 0 means All Tags, whereas any other non-zero value means Only Tags with this AFI byte value.

The Anti-Collision Mode determines which ISO15693 Anti-Collision Mode is used.

The Tag Limit specifies a maximum number of tags to perform the operation on.

Example 1:

In the following example, a Multi-Tag Set EAS command is used to set the EAS bit of multiple tags. Other options in the command are:

– Multi-Slot Anti-Collision

– Tag Limit of 100 tags

– AFI Byte value of 0

– Timeout of 15 seconds.

When the command is executed, the first (up to 100) tags that the controller finds and successfully sets the EAS bit of will generate responses that contain the Multi-Tag Set EAS opcode and the Tag ID.

When a total of 100 tags are found, or the 15 second Timeout is reached, whichever comes first, a final NTAGS Response will be returned to the host containing the total number of tags found and had their EAS bit set.

Example 2:

In the following example, a Multi-Tag Alarm EAS command is used to find all the tags in the field that have their EAS bit set. Other options in the command are:

– Multi-Slot Anti-Collision

– Tag Limit of 100 tags

– AFI Byte value of 0

– Timeout of 15 seconds.

When the command is executed, the first (up to 100) tags that the controller finds that have their EAS Bit set will generate responses that contain the Multi-Tag Alarm EAS opcode and the Tag ID.

When a total of 100 tags are found, or the 15 second Timeout is reached, whichever comes first, a final NTAGS Response will be returned to the host containing the total number of tags found and had their EAS bit set.

Page 44: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

www.balluff.com

43

6 Set / Clear Output Commands The following Output commands are used to SET or CLEAR outputs of an RFID

Controller (or Hub).

Set Outputs 6.1 Options Values

Set Hub Outputs A, B, C, D Checked or Unchecked Set Controller Outputs A, B Checked or Unchecked

This command sets outputs.

There are two types of outputs than can be set with the Set Outputs command:

Hub Outputs or Controller Outputs. For RFID Controllers with outputs, this command will set the specified output signal to High. For hubs, this command will send a Subnet16 message to the Hub to instruct it to set the specified output signals to High.

This allows a macro to directly control external hardware connected to the controller or hub, such as conveyors, diverters, stack lights, etc..

When the item is inserted into a macro, the following dialog box appears:

Note Either Hub Outputs or Controller Outputs can be set with this command, but not both types in the same command.

Note If an output is not set, it is not cleared by this command. Only those outputs explicitly set will be affected by this command.

Page 45: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

44

6 Set / Clear Output Commands Set Outputs Example 1:

In the following example, a Tag ID is read. If the first digit of the ID is less than 5, then Hub Output A is set. If the first digit is greater than 8, then Hub Outputs B is set.

Example 2:

In the following example, a Tag ID is read. If there is an error, then Controller Output A is set.

Clear Outputs 6.2 Options Values

Set Hub Outputs A, B, C, D Checked or Unchecked Set Controller Outputs A, B Checked or Unchecked

This command clears outputs.

This command is exactly the same as Set Outputs except it is used to Clear the outputs - Set them to Low.

Page 46: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

www.balluff.com

45

6 Set / Clear Output Commands Clear Outputs When the item is inserted into a macro, the following dialog box appears:

Either Hub Outputs or Controller Outputs can be cleared with this command, but not both types in the same command.

Note If an output is not cleared, it is not set by this command. Only those outputs explicitly cleared will be affected by this command.

Example 1:

In the following example, a Tag ID is read. If there is an errror, then Controller Output A is cleared.

Page 47: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

46

7 Macro Specific Commands The following commands are Macro Specific Commands that are used to do a

variety of special functions related to the execution of the macro, such as performing conditional checks on results, transferring control of macro execution to other parts of the macro (or even other macros), labeling execution points of the macro, transmitting custom messages, inserting delays, inserting descriptive comments or ending macro execution.

Labels 7.1 Options Values

Label Name 1-255 Characters Labels are names given for specific points in the macro program. Labels give the program the ability to Branch or redirect execution of the macro to other parts of the macro.

Every macro has an initial Label called Start that is fixed at the very beginning of the macro. This is the only item that can never be deleted from the Workspace.

Labels do not take up any program space and do nothing of themselves - you can add as many as you want. They simply exist to allow the macro compiler to identify a place to branch to (or go to) with a branch instruction (described later in this chapter).

When the item is inserted into a macro, the following dialog box appears:

Label names can be up to 255 characters - in practice, however, Label Names should be short, 1 to 16 characters long or so. They can contain any typeable characters, including spaces, and are case sensitive.

Page 48: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

www.balluff.com

47

7 Macro Specific Commands Labels Example 1:

In the following example, a Label called “Sample Label” has been inserted into a simple macro.

In this example, the Label serves no real purpose. The macro will simply skip over the Label and execute all the four read instructions in sequence.

Example 2:

In this macro, a simple Branch instruction has also been inserted:

In this macro, the first two reads would be executed, but then the macro would Branch over and skip the third read, and proceed directly to the fourth read. The third read is never executed under any circumstances in this macro.

Branch 7.2 Options Values

Branch Label Name 1-255 Characters This command causes the flow of macro execution to unconditionally Branch to another place in the macro. This requires that a Label has been created at the destination of the Branch command. This is the equivalent of a GoTo command.

Page 49: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

48

7 Macro Specific Commands Branch When the item is inserted into a macro, the following dialog box appears:

Note If the Label does not actually exist at the time you insert this command, that’s ok – you will see a warning message next to the command item in the Workspace that says “(*** NOT FOUND)” – this is an indication that the Macro compiler does not know yet where you want to actually Branch – you still need to insert a Label with the appropriate name.

Note With all Branch commands, care should be taken not to cause macros to enter Infinite Loops unless that is the desired behavior.

Example 1:

In this example, a Branch to the Label called “SKIP_EVERYTHING” has been inserted at the beginning of the macro. Since there is no Label called “SKIP_EVERYTHING”, the warning message (*** NOT FOUND) is displayed.

Note If this macro were to be loaded, and executed, a fatal error would occur.

Page 50: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

www.balluff.com

49

7 Macro Specific Commands Branch Example 1:

In this example, the appropriate label called “SKIP_EVERYTHING” has been inserted, right before the end of the macro. When this macro is executed, the Branch instruction will cause the macro to skip over the next three commands, and resume executing at the Label - which in this case, just ends the macro.

Conditional 7.3 Branch

Options Values

Branch Condition One of the following conditions:

If the last READ result < Compare Data If the last READ result > Compare Data If the last READ result = Compare Data If the last READ result != Compare Data If the last READ result CONTAINS the Compare Data (Ignore Offset) If the last READ or WRITE caused ANY Error If the last READ caused a READ Error If the last WRITE caused a WRITE Error If the last READ or WRITE caused a TAG NOT FOUND Error If the last READ or WRITE caused a (Legacy) TAG NOT FOUND Error If Controller INPUT A = Low If Controller INPUT A = High If Controller INPUT B = Low If Controller INPUT B = High If Controller INPUT A = Low and INPUT B = Low If Controller INPUT A = High and INPUT B = Low If Controller INPUT A = Low and INPUT B = High If Controller INPUT A = High and INPUT B = High If Controller OUTPUT A = Low If Controller OUTPUT A = High If Controller OUTPUT B = Low If Controller OUTPUT B = High If Controller OUTPUT A = Low and OUTPUT B = Low If Controller OUTPUT A = High and OUTPUT B = Low If Controller OUTPUT A = Low and OUTPUT B = High If Controller OUTPUT A = High and OUTPUT B = High

Page 51: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

50

7 Macro Specific Commands Conditional Branch

Table continued:

Options Values

Compare Start 0-65535 Compare Length 0-255 Compare Data 0-255 bytes of ASCII or Hex Compare Data Branch to Label Existing Label Name (1-10 characters)

This command causes the flow of macro execution to Conditionally Branch to another place in the macro, based on the results or errors of the previous RFID commands:

– Tag Search

– Tag Read ID

– Tag Read Data

– Tag Write Data

– Tag Fill Data

– Controller Input / Output States

This command requires that a Label has been created at the destination of the Branch, if the condition is met. This is the equivalent of an If -Then - GoTo command.

When the item is inserted into a macro, the following dialog box appears:

In the top section labeled Branch Condition is a ListBox containing 26 different conditions, some involving data, some involving errors, some involving inputs or outputs. The first five allow branching based on the results of the previous Tag Read Data, or Tag Read ID command.

Page 52: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

www.balluff.com

51

7 Macro Specific Commands Conditional Branch

The next five allow Branching based on errors generated by the previous RFID commands:

– Tag Search

– Tag Read ID

– Tag Read Data

– Tag Write Data

– Tag Fill Data The last 16 allow Branching based on combinations of states of the Controller Inputs / Outputs. In the middle, there is a DataEntryBox for entering a string of Compare Data, as well as an Offset and Length. Compare Data is only used for the first 5 condition options. Note: The offset here is the offset within the last read result, not a tag address off-set. So, for instance, if you just read 8 bytes from address 100 of the tag, and you want to compare the last 2 of those bytes, you would use Compare Start (Offset) of 6, and a Compare Length of 2. Note: All comparisons such as “Less Than” and “Greater Than” are compared byte for byte. Therefore the string “ABCD” which has the actual HEX byte values of 41 42 43 44 is “Less Than” the string “abcd” which has the actual byte values of 61 62 63 64. Likewise, the string “Cat” (43 61 74) is “Less Than” the string “CAT” (43 41 54) Lastly, there is a “Branch to Label” name that indicates the label to which you want the macro to branch if the condition is met.

Note The Offset here is the Offset within the last read result, not a tag address Offset. So, for instance, if you just read 8 bytes from Start Address 100 of the tag, and you want to compare the last 2 of those bytes, you would use Compare Start (Offset) of 6, and a Compare Length of 2.

Note All comparisons such as Less Than and Greater Than are compared byte for byte. Therefore the string “ABCD” which has the actual HEX byte values of 0x41 0x42 0x43 0x44 is Less Than the string “abcd” which has the actual byte values of 0x61 0x62 0x63 0x64. Likewise, the string “Cat” (0x43 0x61 0x74) is Less Than the string “CAT” (0x43 0x41 0x54).

Page 53: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

52

7 Macro Specific Commands Conditional Branch

Lastly, there is a Branch to Label Name that indicates the Label to which you want the macro to Branch if the condition is met.

Note If the Label does not actually exist at the time you insert this command, that’s ok – you will see a warning message next to the command item in the Workspace that says “(*** NOT FOUND)” – this is an indication that the Macro compiler does not know yet where you want to actually Branch – you still need to insert a Label with the appropriate name.

Note With all Branch commands, care should be taken not to cause macros to enter Infinite Loops unless that is the desired behavior.

Example 1:

In the following example, the macro will use the Conditional Branch command to branch to “TOO_LOW” and Set Controller Output A if the last 2 bytes of the previous 8 byte read were Less Than the string “XY”, otherwise the macro just ends.

Example 2:

In the following example, the macro will use the Conditional Branch command to branch to “MATCH” and set Controller Output A if the first 5 bytes of the previous 8 byte read were equal to the byte values 0x01 0x02 0x03 0x04 0x05, otherwise the macro just ends.

Page 54: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

www.balluff.com

53

7 Macro Specific Commands Conditional Branch

Example 3:

In the following example, the macro will use the Conditional Branch command to branch to “FOUND_FAILURE” and Set Controller Outputs A and B if the string “FAILURE” is found anywhere in the previous 100 byte read, otherwise the macro just ends.

Example 4:

In the following example, the macro will use the Conditional Branch command to branch to “ERROR_OCCURRED” and Set Hub Output A if the attempted Tag Read Data command fails for any reason, otherwise the macro just ends. Notice that the On Error - Continue Macro command needed to be inserted into the macro, otherwise the macro would just end on an error, and not set the output.

Example 5:

In the following example, the macro will use the Conditional Branch command to branch to “Partial_Write_Failure” and Set Controller Output B if the attempted Tag Write command fails with a Tag Write Error, otherwise the macro just ends. Notice that the On Error - Continue Macro command needed to be inserted into the macro, otherwise the macro would just end on an error, and not set the output. A Tag Not Found error will not cause the Hub Output to be set – only an actual Tag Write failure. This can be very useful in applications where Tags not being written at all is not a problem, but tags being partially written is.

Page 55: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

54

7 Macro Specific Commands

Transmit Last 7.4 Response

Options Values

None

This command causes the last result / response of the following commands to be sent again to the Host:

– Tag Search

– Tag Read ID

– Tag Read Data

– Tag Write Data

– Tag Fill Data

This command is usually used in conjunction with Disable All Host Responses, so that commands may be executed, such as Tag Reads, so that the macro may do some comparisons of the results before deciding if the result should actually be sent back to the host. This allows filtering of responses, and can make applications more efficient.

Since there are no editable items for this command, when the item is inserted into a macro, no dialog box appears.

Example 1:

In this Example, all response types are disabled, a Tag ID is read, and if the last byte of the Tag ID is less than 5, then and only then is the Tag ID sent to the host, via the Transmit Last Response command.

Page 56: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

www.balluff.com

55

7 Macro Specific Commands

Transmit 7.5 Custom String

Options Values

Custom String Data 0-247 bytes of ASCII or Hex Data

This command causes the RFID Controller to transmit a Custom String of data back to the host. This allows additional flexibility in what gets sent back to the host, and gives the ability to send human-readable, informative data in certain applications where the data can be viewed as text.

This command is also very helpful in debugging macros, allowing you to trace the execution of the macro, by inserting many Transmit Custom String commands at various points in the macro.

When the item is inserted into a macro, the following dialog box appears:

Also, the Display Mode of this command can be set to either HEX (with Spaces) or ASCII.

To enter the Custom String to be returned, it may be typed into the Write Data box, in either ASCII text, or in 2 digit HEX byte values separated by spaces.

Example 1:

In the following example, two bytes are read from a tag. If those two bytes are 0x01 0x02, then the Custom String “Batch Passed” is sent to the host. If the two bytes are 0x03 0x04 then the Custom Sting “Batch Failed” is sent to the host.

Page 57: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

56

7 Macro Specific Commands Transmit Custom String

Example 2

In the follow example, which is just a fragment of a large macro, many Transmit Custom Strings are inserted as debugging aids to trace the flow of the macro.

Execute Macro 7.6 Options Values

Macro Number to Execute

1-8

This command causes the RFID Controller to end the current macro and immediately begin executing another macro. When that macro finishes, control is not returned to the current macro. This command allows macros to be chained together to form larger programs.

Page 58: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

www.balluff.com

57

7 Macro Specific Commands Execute Macro When the item is inserted into a macro, the following dialog box appears:

Any macro from 1 to 8 can be executed with this command.

Note Compiled macros do not have an intrinsic Macro Number associated with them – they can be loaded into any of the eight macro slots available in a BIS M-6xx and BIS U-6xx Series RFID Controller. Therefore it is up to the user to keep track of which macros are which, and to know beforehand, for example, what each macro number will have loaded.

Note Care should be taken not to cause a macro to get caught in an Infinite Loop, unless that is the desired behavior.

Note If a macro is executed that does not exist, macro termination will end.

Example 2

In the following example, the first 6 bytes of a tag are read. If the first 3 bytes equal “RED” then Macro 5 is executed. If the first 4 bytes equal “BLUE” then Macro 6 is executed. Otherwise macro 7 is executed.

Page 59: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

58

7 Macro Specific Commands

Wait 7.7 Options Values

Wait Time in milliseconds

0-65535

This command causes the flow of macro execution to pause for the specified duration. It can be used in cases where a delay is desirable.

When the item is inserted into a macro, the following dialog box appears:

Example 1:

In the following example, Controller Output A is set High for 500ms, then Low for 500ms, in an Infinite Loop.

Note 7.8 Options Values

Note 0-255 characters of text

The Note command is actually just a place to put text notations within a macro, for comments or other informational purposes. They do not affect the flow of the macro execution. They can include descriptions of program logic, or Version Numbers, or anything that the user feels should be noted.

When the item is inserted into a macro, the following dialog box appears:

Page 60: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

www.balluff.com

59

7 Macro Specific Commands

Wait 7.9 The strings can be up to 255 bytes long each. They do not take up any macro space.

Example 1:

The following example shows a fragment of a large macro that has many Notes inserted, to describe the flow of the macro, and provide other information.

End 7.10 Options Values

None

This command causes the immediate termination of a macro. This command should be inserted at any point in the macro where you want macro execution to stop.

The macro compiler automatically inserts an implied End at the end of every macro, regardless if you have one manually inserted. Still, it is probably good programming practice to put an End at the end of all macros.

Since there are no editable items for this command, when the item is inserted into a macro, no dialog box appears.

Page 61: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

60

7 Macro Specific Commands End Example 1:

In the following example, the first 6 bytes of a tag are read. If the first 3 bytes equal “RED” then Hub Output A is set, and the macro Ends. If the first 4 bytes equal “BLUE” then Hub Output B is set, and the macro Ends. Otherwise Hub Output C is set, and the macro Ends.

Example 2:

The following example shows a common programming error: In this example, if the first bytes of the tag do not match “RED” or “BLUE”, Hub Output C is set. However, macro execution does not stop after Hub Output C is set, and the macro will continue executing, passing over the “ON_RED” Label, and setting Hub Output A, before ending.

It is important to insert End commands at each point you want the macro to stop.

Page 62: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

C-Macro BuilderTM For BIS M-6xx Series RFID Controller

www.balluff.com

61

Appendix

ASCII Table

Page 63: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation
Page 64: C-Macro Builder TM - Balluff...C-Macro BuilderTM For BIS M-6xx Series RFID Controller 7 2 Overview The C-Macro Builder is a software tool that allows the quick creation and compilation

Balluff GmbH Schurwaldstraße 9 73765 Neuhausen a.d.F. Germany Phone: +49 7158 173 0 Fax: +49 7158 5010 [email protected]

www.balluff.com No.

924

040

E • E

ditio

n H

15; S

ubje

ct to

mod

ifica

tion.