The LED directive places an entry box on the screen that captures all default keystrokes and processes them. This is typically used to allow operators to enter PLU numbers or weights in order to sell items.
Trivia. The LED control was named after the '7 segment LED' displays seen on calculators
Command Options (Display)
Sets the name of the LED control. This "name" is used by other controls to send commands to this LED. By convention, the main LED on the primary selling screen is called "kp", but you are free to use whatever name you wish.
NAME must be unique over all screens, as commands can be sent to screens/windows that are not topmost.
Defines the bounding box position the LED is drawn on the window.
Specifies the RGB triple colour to use as the background.
Specifies the RGB triple colour for the text.
An optional tool tip to be displayed when the mouse hovers over this control.
Sets the font characteristics to use on the displayed output.
Request that a border is drawn around this LED
If the LED control is Empty, or zero, it will draw a "0" much like a calculator. If the blankzero directive is present then it will not draw any output text until user entered values are given.
Control Options (Commands We Process)
The LED control is designed to store keystrokes or button presses as the operator enters a value. When the operator is finished entering they typically press the "enter" key/button, this key sends a command (via sendstr command) to the LED which takes the stored value, processes it and sends it for further processing. The examples below make this clearer
The following is the commands the LED can react too
The sell() command allows you to generate a range of commands that are understood to create products and add them to the current sale.
The following example shows how key#13 (enter) uses the sendstr() PosCommand to send "sell(pid,1)" to the LED called "kp". This causes the LED to sell product the product with the "Pid" set to the value currently showing. It then sends the character #42 to the "kp", which is the character to reset the LED to empty.
204|stock|||key|13|sale? sendstr(sell(pid,1),kp) send(42,kp)|160 |<--definition -->|<-- Pos Commands -->|
(Advanced, Rare). If the LED control has sell codes defined, and the current value matches the sellcode, then the command on the sellcode is processed instead of the command sent via the "sell()" option. See below for details of using sell codes
Used for fuel controller interfacing. Not documented for general customer use.
If the command cannot be processed as a known command above, then the value is sent into the control as a update to be stored.
Sell codes allow you to define that certain values in the LED take different actions to normal, without needing to dedicate a specific button. For example, the default action of the enter key might be to send "sell by plu" to the LED control. If however, the LED is showing "ticket" as the current value, then sellcodes allow you to bypass this default action and perform a different action for this exception
Sell codes are defined using settings and apply to all LED controls. You do not need to use sell codes, everything sell codes do can be done by reading and decodinng the LED current value before sending the command, but sell codes can be useful to quickly add functionality for special purposes.
; fpos.ctl (or similar) force:LEDSellCode0=ticket,screen(tickets) force:LEDSellCode1=exit,message(99,1, You typed %PARAM%)If the user types "ticket" into the screen and presses "enter", the enter key will send the default command of say "sell(pid,1)" to the LED. This command will dynamically change to "screen(tickets)" and that command will be executed instead.
When loading the setting LEDSellCodeN, the system starts scanning at N=0 and stops when ever a gap of 10 undefined "N" is seen. This means different SellCode settings with small gaps in sequence are ok, but large gaps will stop the scanning.