This command controls Autoread mode at runtime. Usually, the Autoread subsystem will be stared at boot time if the reader is configured to work autonomously. However, you can still enable and disable Autoread at runtime. This is e.g. needed if you use VHL & Autoread in combination, so you can interrupt Autoread to run VHL commands.

AR.SetMode automatically empties the reader's message buffer. This ensures that the next AR.GetMessage you run doesn't return "old" data from a card detected before running AR.SetMode.


Parameters (request frame)

Name Type/Size Description
Mode Enumeration (8 bits)

Defines if Autoread is active, so the reader scans autonomously for cards.

The reader will disable Autoread mode automatically if you execute a card-accessing command (e.g VHL.Select ).
  • Disabled (0x00)
    Do not run Autoread at all.
  • Enabled (0x01)

    The reader will boot in Autoread mode and scan for cards, no matter if its configuration contains an Autoread RFID interface component or not.

    If there is an Autoread RFID interface component, the reader will check if a card is valid and buffer its card identification, so you can retrieve it using AR.GetMessage. Then, the reader will continue scanning for other cards. If another card is detected before the last card identification has been retrieved by the host, the last card identifications will be queued in a last-in-first-out queue.

    If there is no Autoread RFID interface component, project cards won't be read; however, the reader will still do the following:

    • Scan and accept ConfigCards. This means the reader can be reconfigured even if the connection to the host is interrupted.
    • Fire Baltech Script events
  • EnableOnce (0x02)
    Same as Enabled; however, the reader will stop Autoread mode as soon as it has detected (and read) a card. You can now interact with the card using VHL commands. When you're done, reenable Autoread by running AR.SetMode again.
  • EnableIfDefinedRules (0xFF)
    The reader will boot in Autoread mode only if its configuration contains at least 1 Autoread RFID interface component, i.e. if the configuration value Autoread/Rule[0]/Template is defined. Then the behavior is the same as Enabled.

Returned values (response frame)