Keyboard/Barcode Reader

This function block is designed to read keyboard and barcode inputs in real-time. It can switch between modes to handle key presses or barcode reading seamlessly.

πŸ“₯ Inputs

This function block does not have any inputs.

πŸ“€ Outputs

String Outputs the latest keyboard input or barcode read.

Boolean A true or false value signaling whether a new input has been registered.

πŸ•ΉοΈ Controls

Mode A dropdown that allows users to choose between two modes:

  • Key Press: Reads individual key presses.

  • Barcode Reading: Reads a sequence of keystrokes as a barcode.

🎨 Features

Real-Time Input The block captures input instantly and continuously, making it suitable for dynamic environments where quick data entry is essential.

Flexible Modes Switch between reading simple key presses or full barcode sequences effortlessly.

πŸ“ Usage Instructions

  1. Select Mode: Choose either Key Press for individual key input or Barcode Reading to read input sequences as barcodes.

  2. Connect Outputs: Link the outputs to other blocks as needed for processing the read input.

  3. Read Input: The system reads inputs immediately, making them available for further use in real-time scenarios.

πŸ“Š Evaluation

When executed, this function block will continuously listen for input and return the latest value registered alongside a boolean indicating whether a new entry has been received.

πŸ’‘ Tips and Tricks

Barcode Reading Setup

Ensure your barcode scanner is configured to send an "Enter" key after scanning. This enables the block to properly accumulate the input into a single string.

Mode Switching

You can switch modes dynamically while the function block is running. Make sure to check the output to confirm which mode it is currently set to.

Testing Key Presses

For testing purposes, you can manually type key inputs in the Key Press mode while observing the output in real-time to verify that key detection is working correctly.

πŸ› οΈ Troubleshooting

No Input Detected

If you are not receiving any input, check if the function block is properly initialized and that there are no other applications or systems intercepting keyboard events.

Incorrect Barcode Reads

Make sure the barcode scanner sends a termination character (like "Enter") after each scan, as this character is crucial for the block to successfully capture and process the input.

Last updated