Page 1
Serial text display Programming Guide [ Version 3.4 Firmware ] Issue 6 5 October 2009...
Page 2
This guide applies to the following models: BA488C - Panel mounted, Intrinsically Safe BA484D - Field mounted, Intrinsically Safe BA688C - Panel mounted, Safe Area BA684D - Field mounted, Safe Area...
Introduction This guide describes the BEKA Mode Protocol for the BA488C, BA484D, BA688C and BA684D Serial Text Displays. This information is only required when programming a host to communicate with these displays; it is not required by the end user. The target audience for this guide are software programmers with some experience in communicating with ASCII devices.
Enhanced Features This product is an enhanced version of our original Serial Text display (BA488C / BA484D) . It is compatible with all existing applications as none of the existing commands have been altered. The following features have been added as standard in the Version 3 firmware, released in July 2005:...
Instrument Features A detailed overview of the instrument is given in the instruction manual for each product. This should be read before implementing any system using this instrument. However it is useful to summarise the main features of the display before attempting to design any controlling software application.
A few words about Modes… It is worth reviewing the different modes that are referred to in this manual - these can become confusing if taken into the wrong context! Operational Modes Refers to the communication protocol between the host and the instrument These can range from Mode 0 (the simplest) to Mode 4 (the most complex).
Display Features Some powerful features are built into the display that allow relatively complex visual effects to be generated with only a few simple commands. The command reference section of this programming guide has many examples of what can be achieved with a little creativity and lateral thought.
Write Mode 1 is slightly more complex in that the new object is ‘ORed’ with the existing screen contents i.e. if a pixel is set on the new object being written OR the corresponding pixel is set on the existing screen, then the pixel is set on the screen.
Frames Active and Visible Frames Another concept to grasp is the commands never actually write directly to the screen. Instead there are two “display buffers” that we refer to as ‘Frame 0’ and ‘Frame 1’. Only one of these frames is visible at any time, which is selected by the <VFn>...
Saved Frame Locations It is possible to store the screen contents for later use by saving the Visible Frame to memory via the <SFnm> Save Frame command. (This command can actually save either frame, but for simplicity disregard this for now) There are two types of memory available for saves: - Non-volatile EEprom that is retained on power fail and - A Scratchpad area in RAM that is lost when power is removed from the unit.
The BEKA Protocol The BEKA protocol is very loosely based on the principals behind HTML. Fundamentally, the intention is to make the scripts that generate a screen display “human readable”, in the same way that the source for a web page may be read.
Command format The command format is: <AB[param1],[param2]…,[paramN]> where: AB is the command. [ ] indicates optional parameters separated by comas example: <CM4,90> Cursor Move to Row 4 Column 90 <CS> Clear Screen Response format Key Mode 0 (Default) The response format is of the form: Ka or Ea or ?a or Xa or Sa or Ba or P0 where: K indicates that the previous command/command set has been accepted.
Key Mode 2 The response format is similar to Mode 1 but the “a” is replaced with six consecutive ASCII characters. It is intended mainly for debugging purposes and hosts with limited processing capability. In this mode the key press information is returned as 6 individual bytes. If a key has been pressed then the ASCII character “1”...
The LSB is extracted and examined. If the LSB was a 1, the register is then exclusive ORed with a preset, fixed value (A001 hex). If the LSB was a 0, no exclusive OR takes place. This process is repeated until eight shifts have been performed. After the last (eighth) shift, the next eight-bit character is exclusive ORed with the register's current value, and the process repeats for eight more shifts as described above.
Graphics Transfers File Format In all cases the file format used is a two colour (black and white) bitmap in standard Windows™ / OS2 format. These commonly have a .BMP extension on most PC applications. Downloads The protocol is extended as follows to cover the simple graphics download commands <DS> and <DG> and <DFn> To avoid confusion, a download is defined as being from the host to the display All download functions operate using the same basic sequence: 1) Host sends download command (DS,DG or DF) followed by a <CI>, <CCn>, or <CRnn>...
Please note: The <DS> command is just a special case of the <DG> command but because of its fixed size is executed much more quickly. Graphics can be uploaded to a hidden frame using the <AF> command to select the destination, and the <VF> command to make it visible when complete.
The screen format is selected by either using the local menu (as described in the Instruction Manual) or by using the <SOn> Screen Option BEKA protocol command. One of eleven standard display formats can be selected as shown in the following table:...
Up to eight process variables can be displayed. Commands are provided to “Map” a numeric ASCII string to one of eight Input Variables IN_1 to IN_8. Each variable can also have an associated “Tag description” and “Units” displayed alongside by using the appropriate commands. The front panel buttons are used to scroll the display between the input variables.
Updating using ASCII values The <CV> Cyclic Variable command is used to update each variable individually by sending the numeric value as a simple ASCII string. The syntax is <CVn,string> where n represents the input variable to be updated (= 1 to 8) and string is the numeric value to be displayed.
Mapped Variables If the standard screens are not suitable for a particular application, the functionality of mapped variables can be used to construct a unique screen which can be automatically updated as new cyclic data is received. Up to eight process variables can be mapped and displayed on the screen at any one time. The position and appearance of each variable can be independently assigned, and horizontal and vertical bargraphs may be shown alongside numeric values if desired.
Command Summary There are 94 commands that can be arranged into 7 functional groups: Screen Handling & Text - used to control the screen in text mode Attributes - affect the appearance of text and graphics Pixel Graphics - draw graphical objects on the screen Line Graphics - draw lines and boxes on the screen System...
Attributes Command Meaning <BMn> Background Mode <CA> Centre Align <DWyt,yb,xl,xr> Define Window <EF> Enable Flashing <F1> Font 1 <F2> Font 2 <F3> Font 3 <F4> Font 4 <F5> Font 5 <FL> Flashing <IF> Inhibit Flashing <LA> Left Align <LF> Line Feed <NA>...
Scripting Command Meaning <CU> Cyclic Update <CX,n,string> Cyclic Text <DPn> Download Program <ES> Execute Script <GE> Get Error <GL> Get Line <JRn> Jump Register <KS> Kill Script <SEn> Script Event <TS> Terminate Script Note that these scripting commands are not documented in the command reference section, but can be found in their own section towards the back of this manual starting on page 115.
Command Reference The following section lists each command in alphabetical order. Each page is formatted in the same way so that commands can be compared and reviewed easily. The following page explains the format of each page:...
<..> Command Group Description This is a brief description of the command The allowable range of values Parameters The value at initialisation, if applicable Initial Value Modes Some commands are only available in certain modes Notes Detailed comments Describes where the command may be used Uses A simple example showing how to use the command Example...
<AFn> Active Frame System Command Specify that all writes are directed to Frame n Description Parameters n = 0 or 1 - frame number Initial Value Frame 0 is the default at power up, or after a <SD> Screen Defaults command Modes All Modes All commands (with the notable exception of <RLn>) write to the Active Frame, not the Visible...
<BDy,x,l> Box Draw Line Graphics Draws a box y pixels high, x pixels wide with a line thickness of l Description Parameters y = 2 to 64 - height x = 2 to 120 - width l = 1 to 32 - line thickness Pixel mode only Modes...
<BMn> Background Mode Attributes Defines the appearance of the ‘flashing’ attribute Description Parameters n = 0 to 2 - flashing style Initial Value Modes All Modes The flash background is defined by the value n Notes n = 0 sets all pixels off n = 1 sets all pixels on n = 2 sets the pixels to the inverse of the character or graphic being written To use this command the flashing attribute <FL>...
<CA> Centre Align Attributes Set the attribute so that written text is aligned horizontally within the screen or defined window Description Parameters None Initial Value Not aligned; Text appears at the current cursor position Modes All Modes This command only affects text written after the attribute has been set. Notes In Pixel Mode <PM>...
<CCn> Check Code System Command terminator with 8-bit checksum Description Parameters The parameter is an 8 bit checksum of all the characters in the preceding command string. To calculate the value of the parameter, sum the ASCII values of all the characters in the command string up to but not including the <CCn>...
<CD> Cyclic Data Mapped Variables Update all eight input variables using floating point numbers Description Parameters None Modes All Modes Notes The concepts and usage of Standard Screens, Cyclic Data and Mapped Variables are discussed in their own section starting on Page 15. The <CD>...
<CE> Configuration Enable System Control access to the configuration menus Description Parameters None Initial Value This is the default Modes All Modes The <CE> and <CP> commands control access to the main and quick access menus used for unit Notes configuration.
<CI> Command Implement System Command terminator without any checksum Description Parameters None Modes Operational Mode 2 only Notes The <CI> terminator is the signal to action the preceding command string. It is used only in Operational Mode 2 where a string of commands can be “queued” and then actioned at the same time.
<CLn> Clear Line Screen Handling & Text Clears a complete line on the screen Description Parameters n = 0 to 7 - line number Modes Row Mode Only Notes There are 8 lines on the screen numbered 0 to 7, 0 being the top line. The command clears a number of lines upwards from the stated line, depending on the current font: For font 1 <F1>...
<CMy,x> Cursor Move Screen Handling & Text Moves the cursor on the screen Description Parameters Row Mode: Pixel Mode: y = 0 to 7 y = 0 to 63 x = 0 to 119 x = 0 to 119 In both modes, co-ordinate 0,0 is at the top left of the screen Modes All Modes Notes...
<CP> Configuration Prohibit System Control access to the configuration menus Description Parameters None Initial Value <CE> Configuration Enable is active on power up Modes All Modes The <CE> and <CP> commands control access to the main and quick access menus used for unit Notes configuration.
<CRn,m> Cyclic Redundancy Check System Command terminator with 16-bit checksum Description Parameters The parameters n and m are two 8 bit bytes of the 16 bit checksum of all the characters in the preceding command string, n being the LSB, and m the MSB. To calculate the value of the parameter, use the ASCII values of all the characters in the command string up to but not including the <CRnm>...
<CS> Clear Screen Screen Handling & Text Turn all pixels off, creating a blank screen Description Parameters None Initial Value All pixels are off Modes All Modes This command also: Notes • Removes any windows that may be defined (equivalent to issuing a <DW0,7,0,119> command) •...
<CTn> Cyclic Data Timeout Mapped Variables A mechanism to warn that an input variable has not been updated for (n x 10) Seconds Description Parameters n = 0 to 255 - Multiples of 10 Seconds Initial Value 0, no timeout active Modes All Modes If valid data is not regularly sent to each input value then there is a risk that an operator might take...
<CVn,string> Cyclic Variable Mapped Variables Update a single input variables using ASCII formatted text Description Parameters = 1 to 8 - Input Variable number string = any 7-bit numeric ASCII string Modes All Modes Notes The concepts and usage of Standard Screens, Cyclic Data and Mapped Variables are discussed in their own section starting on Page 15.
<CW> Clear Window Screen Handling & Text Turn all pixels off within a defined window Description Parameters None Initial Value All pixels are off Modes Row Mode only This command also homes the cursor in the defined window area, equivalent to issuing a <HC> Notes command.
<DBn,m,p,q,r> Define Bargraph Mapped Variables This command specifies how an input variable is written as a bargraph to the screen Description Parameters n = 1 to 8 - the input variable number IN_1 to IN_8 m = 5 to 120 - the total length of the bargraph in pixels p = 0 to 8 - Lower limit of bargraph...
<DDn,m> Define Decimal Mapped Variables Set the number of decimal places displayed on standard screens Description Parameters n = 1 to 8 - Input variable m = 0 to 5 - Number of decimal places 0 = Show no decimal places 1 - 4 = Show 1 –...
<DFn> Download Font System Download soft fonts to the display Description Parameters n = 0 to 3 - soft font character Modes All Modes Notes A soft font is any user defined image that is the same size as the current font. The display will store 4 soft fonts (n = 0 to 3) for each font F1 to F5.
<DG> Download Graphic Pixel Graphics Download a graphics image to the screen and display it at the current cursor position Description Parameters None Modes Pixel Mode Only Notes The size of the image is computed from the data sent. If any part of the image would be off-screen when drawn then nothing is drawn on the screen and an error response returned to the host.
<DLn,m,p> Define Limit Mapped Variables This command defines static minimum and maximum limits for bargraph variables so that optimum Description scaling can be chosen Parameters n = 1 to 8 - Input variable number IN_1 to IN_8 m = any 7-bit numeric ASCII string - Lower limit for the bargraph variable p = any 7-bit numeric ASCII string - Upper limit for the bargraph variable...
<DS> Download Screen Pixel Graphics Download a full-screen 64 x 120 pixel graphic image to the screen. Description Parameters None Modes All Modes The <WMn> Write Mode has no effect on this command Notes This command is really just a special case of the <DG> command, but because of the fixed size is executed much faster.
<DTn,string> Define Tag Mapped Variables Set Tag information to be displayed next to the input variable on standard screens Description Parameters n = 1 to 8 - the input variable number IN_1 to IN_8 string - any 7-bit ASCII string up to 16 characters long Initial Value “Inst1_Tag”, “Inst2_Tag”...
<DUn,string> Define Units Mapped Variables Set “Units of Measure” information to be displayed next to the input variable on standard screens Description Parameters n = 1 to 8 - the input variable number IN_1 to IN_8 string - any 7-bit ASCII string up to 8 characters long Initial Value “Units”...
<DVn,m,p,q,r> Define Variable Mapped Variables This command specifies how a process variable is written to the screen Description Parameters n = 1 to 8 - the input number IN_1 to IN_8 m = 1 to 10 - the total variable string length p = 0 to 4 - the maximum number of digits after the decimal point (Over-ridden by m) q = 0 or 1...
<DWyt,yb,xl,xr> Define Window Screen Handling & Text Defines an area of the screen into which certain screen write commands are constrained Description Parameters yt = 0 to 7 - top row of the window area yb = 0 to 7 - bottom row of the window area xl = 0 to 119 - pixel column of the left hand side of the window...
<EBn> Erase Bargraph Mapped Variables This command erases bargraphs created with the <DB> command from the screen. Description Parameters n = 0 - Erases all defined bargraphs from the screen n = 1 to 8 - Erases only the specified bargraph from the screen Initial Value None Modes...
<EF> Enable Flashing Attributes Flash text and graphics written with the Flashing <FL> attribute set Description Parameters None Initial Value Inhibited (No Flashing) Modes All Modes The <EF> is a global command that affects the whole screen Notes The opposite of this command is the <IF> Inhibit Flash command The <EF>...
<EL> Erase Line Screen Handling & Text Erase any text or graphics from the current cursor position to the end of the row Description Parameters None Modes Row Mode only Notes The command erases a number of lines upwards from the current cursor position, depending on the current font: For font 1 <F1>...
<EVn> Erase Variable Mapped Variables This command erases variables created with the <DV> command from the screen. Description Parameters n = 0 - Erases all defined variables from the screen. n = 1 to 8 - Erases only the specified variable from the screen Initial Value None Modes...
<F1> Font 1 Attributes Define the text size written by the <WT> command as 8 x 6 pixels Description Parameters None Initial Value Font 1 is the default used on initialisation Modes All Modes Font 1 is a single row font, each character being 8 pixels high by 6 pixels wide. Notes Font 1 does NOT have true decenders Font 1 has a full 7-bit ASCII character set...
<F2> Font 2 Attributes Define the text size written by the <WT> command as 16 x 10 pixels Description Parameters None Initial Value Font 1 is the default used on initialisation Modes All Modes Font 2 is a two-row font, each character being 16 pixels high by 10 pixels wide. Notes Font 2 has true decenders Font 2 has a full 7-bit ASCII character set...
<F3> Font 3 Attributes Define the text size written by the <WT> command as 24 x 15 pixels Description Parameters None Initial Value Font 1 is the default used on initialisation Modes All Modes Font 3 is a three-row font, each character being 24 pixels high by 15 pixels wide. Notes Font 3 has true decenders Font 3 has a full 7-bit ASCII character set...
<F4> Font 4 Attributes Define the text size written by the <WT> command as 32 x 19 pixels Description Parameters None Initial Value Font 1 is the default used on initialisation Modes All Modes Font 4 is a four-row font, each character being 32 pixels high by 19 pixels wide. Notes Font 4 has true decenders Font 4 has a full 7-bit ASCII character set...
<F5> Font 5 Attributes Define the text size written by the <WT> command as 48 x 29 pixels Description Parameters None Initial Value Font 1 is the default used on initialisation Modes All Modes Font 5 is a six-row font, each character being 48 pixels high by 29 pixels wide. Notes Font 5 has true decenders Font 5 has a limited 7-bit ASCII character set consisting of the following:...
<FL> Flashing Attributes Set the flashing attribute, so that any subsequently written text or graphic will flash when the global Description attribute <EF> is set. Parameters None Initial Value Steady (No Flashing) Modes All Modes Notes The <BMn> Background Mode attribute controls what background appears when the image flashes. This attribute applies to all writes to the screen except bargraphs.
<FR> Font Restore System Recover previously stored soft fonts from EEprom Description Parameters None Modes All Modes Notes This command recovers all the soft fonts in sizes F1 to F5 from EEprom, overwriting any that may have been downloaded, but not kept. This command is required as all currently defined soft fonts (except those stored in EEprom) are lost when power is removed from the instrument.
<FS> Fill Screen Screen Handling & Text Turn all pixels on, creating a black screen Description Parameters None Initial Value All pixels are off Modes All Modes This command also: Notes Removes any windows that may be defined (equivalent to issuing a <DW0,7,0,119> command) Homes the cursor (equivalent to issuing a <HC>...
<FW> Fill Window Screen Handling & Text Turn all pixels on within a defined window Description Parameters None Initial Value All pixels are off Modes Row Mode only This command also homes the cursor in the defined window area, equivalent to issuing a <HC> Notes command.
<GBn> Graphic Block System This command specifies the graphics block that can be accessed through the GRAPHIC_DATA Description register when using the Modbus protocol Parameters n = 0 to 16 - Block segment number Initial Value n = 0 Modes All Screen Modes Notes This command has no purpose if the Modbus protocol is not being used.
<HBn,m> Horizontal Bargraph Line Graphics Draw a horizontal bargraph n pixels long with m pixels filled Description Parameters n = 3 to 120 - Length of bargraph m = 0 to n - Number of filled pixels, starting from the left Modes Row Mode only The <WMn>...
<HC> Home Cursor Screen Handling & Text Return the cursor to the top left of the screen Description Parameters None Modes All Modes Notes This command is a special case of the <CM> Cursor Move command. The vertical position of the cursor is set such that the currently active font will display normally at the top left of the screen.
<HRn,m,p> Horizontal Rotate Pixel Graphics Rotates the screen though the scratchpad RAM by one pixel column at a time. Description Parameters n = 0 or 1 - rotates the screen either Left (n = 0) or Right (n = 1) m = 0 to 7 - The first row to scroll.
<HSn,m,p,q,r,s,t> Horizontal Scroll Pixel Graphics Scrolls a defined area of the screen by one pixel Description Parameters n = 0 or 1 - scrolls the screen either Left (n = 0) or Right (n = 1) m = 0 to 7 - The first row to scroll.
<IF> Inhibit Flashing Attributes Inhibit the automatic 1 second flash of any text or graphics drawn with the <FL> attribute Description Parameters None Initial Value Inhibited (No Flashing) Modes All Modes This command acts on the whole screen. Notes Flashing can be re-enabled by using the <EF> command. The <IF>...
<KF> Keep Fonts System Save previously download soft fonts to EEprom Description Parameters None Modes All Modes Notes This command causes all the soft fonts in font sizes F1 to F5 to be saved to EEprom. Downloaded soft fonts not stored in this way are lost when power is removed. It is not possible to save just an individual soft font number or even all the soft fonts in a given size.
<LA> Left Align Attributes Set the attribute so that written text is aligned to the left of the display or defined window Description Parameters None Initial Value Not aligned; Text appears at the current cursor position Modes All Modes This command sets the attribute that causes text written with the <WT> command to be aligned at the Notes left hand side of the screen (or window, if defined).
<LF> Line Feed Attributes Add a line feed character after a carriage return character has been received Description Parameters None Initial Value This attribute is cleared; Line Feed and Carriage Return are independent actions Modes Row Mode only This command causes the display to add a line feed character after a carriage return character has Notes been received.
<LHx,l> Line Horizontal Line Graphics Draw a horizontal line x pixels long with a line thickness of l Description Parameters x = 1 to 120 - length l = 1 to 64 - line thickness Modes Pixel mode only Notes The line is drawn from the current cursor position upwards and to the right.
<LN> Line New Screen Handling & Text Send a ‘CR + LF’ to move the cursor down one line and to the left hand side of the screen or window Description Parameters None Modes Row Mode Only Notes This command sends a ‘Carriage Return’ + ‘Line Feed’ to the display so that the cursor is moved down one line and to the left hand side of the screen or window.
<LVy,l> Line Vertical Line Graphics Draw a vertical line y pixels high with a line thickness of l Description Parameters y = 1 to 64 - height l = 1 to 120 - line thickness Modes Pixel mode only Notes The line is drawn from the current cursor position upwards and to the right.
<MCn> Make Connection System The following commands are intended for the instrument with address ‘n’ Description Parameters n = 1 to 247 - address range Modes This command is used in multidrop or multiple instrument configurations Notes Only the instrument with address ‘n’ will acknowledge this command. Each instrument must have a unique address;...
<NA> No Align Attributes Cancel all of the text alignment attributes <LA>, <RA>, <CA>, <SW> and <TW> Description Parameters None Initial Value This is the default Modes All Modes This command clears all alignment attributes so that text written with the <WT> command appears at Notes the current cursor position.
<NL> No Linefeed Attributes Cancel the automatic execution of a ‘CR + LF’ when just a single ‘CR’ is received Description Parameters None Initial Value This is the default Modes All Modes This command reverses the action of the <LF> command by cancelling the automatic execution of a Notes ‘carriage return’...
<NS> New Screen Mapped Variables Clears the screen and removes all mapped variables, bargraphs and cyclic text strings Description Parameters None Initial Value None Modes All Modes The <NS> command is functionally equivalent to issuing the three commands <CS><EV0><EB0> Notes in succession.
<NU> No Underline Attributes Cancel the <UL> Underline attribute Description Parameters None Initial Value This is the default Modes All Modes This command cancels the ‘Underline’ attribute so that text written with the <WT> command Notes appears without being underlined It only affects text written after the attribute has been set.
<ODn> Output De-energised System Control the state of the output contacts, making it de-energised Description Parameters n = 1 or 2 - Output number Initial Value De-energised (open circuit) on power up Modes All Modes These commands allow the user to control the state of the output contacts. Notes There are two isolated solid state contacts per display, A1 –...
<OEn> Output Energised System Control the state of the output contacts, making it energised Description Parameters n = 1 or 2 - Output number Initial Value De-energised (open circuit) on power up Modes All Modes These commands allow the user to control the state of the output contacts. Notes There are two isolated solid state contacts per display, A1 –...
<PM> Pixel Mode System Put the unit into Pixel Mode Description Parameters None Initial Value Row Mode Modes All Operational Modes This command allows all text to have pixel positional resolution in both vertical and horizontal Notes directions, rather than being constrained into rows as with Row Mode. Most graphics commands require the display to be in Pixel Mode.
<RA> Right Align Attributes Set the attribute so that written text is aligned to the right of the display or defined window Description Parameters None Initial Value Not aligned; Text appears at the current cursor position Modes All Modes This command sets the attribute that causes text written with the <WT> command to be aligned at the Notes right hand side of the screen (or window, if defined).
<RB> Reboot System Cause a complete restart of the instrument, just as if it had been powered up Description Parameters None Modes All Modes Notes This command causes a complete restart of the instrument, just as if it had been powered up after being switched off.
<RC> Release Connection System Disconnect the currently ‘connected’ instrument Description Parameters None Initial Value All instruments with non-zero addresses power up with no connection active Modes This command is used in multidrop or multiple instrument configurations After an <RC> command has been confirmed by the currently active instrument, no instruments will Notes respond to any commands until a further <MCn>...
<RFn> Restore Frame System Restore a previously saved frame to the currently active frame Description Parameters n = 0 to 2 - Saved Frame memory location Modes The <WMn> Write Mode has no effect on this command Notes This command restores a frame image saved with the <SF> command to the currently active frame. The parameter m specifies which memory location the stored frame is recovered from: n = 0 specifies EEprom area 0 n = 1 specifies EEprom area 1...
= 0 or 1 - Static or Scrolled Initial Value There is a default “BEKA associates” logo built in that appears if no user logo is defined. (OEM versions of the product may have an alternative logo instead) Modes...
<RM> Row Mode System Put the unit into Row Mode Description Parameters None Initial Value Row Mode Modes All Operational Modes This command enables Row Mode. In this mode the screen is split up into eight horizontal rows Notes each eight pixels high. Text is then aligned with these rows In this mode the vertical position in the Cursor Move command it limited to 0 to 7.
<RS> Request Status Screen Handling & Text Get key-press status information from the display Description Parameters None Initial Value None Modes All Modes This command is used to get key-press status information from the display. It has no effect on the Notes screen or any of the display settings.
<SAn> Speed Adjust System Adjusts the processor clock speed at the expense of the backlight intensity Description Parameters n = 0 to 2 - 0 = default speed, 1 = 2 x default, 2 = 4 x default Initial Value 0 = default speed (BA4xx Intrinsically Safe units only) 2 = 4 x default (BA6xx Safe Area units only)
<SBn> Set Backlight System Alter the intensity of the backlight Description Parameters n = 0 to 40 - Backlight Intensity Initial Value Dependant on setting made in configuration menus Modes All Modes This command alters the intensity of the backlight depending on the parameter n: Notes n = 0 backlight off.
<SD> Screen Defaults Screen Handling & Text Cancels all attributes and returns the display to a known configuration Description Parameters None Initial Value This is the default at power up Modes All Modes This command behaves as if the following commands were received by the display: Notes <AF0>...
<SFn,m> Save Frame System Save the specified frame n to memory location m Description Parameters n = 0 or 1 - frame number m = 0 to 2 - memory location Initial Value None Modes All Modes Notes The save frame command allows the specified frame n to be saved to memory location m. m = 0 saves the frame m to EEprom area 0 m = 1 saves the frame m to EEprom area 1 m = 2 saves the frame m to scratchpad RAM...
Page 101
Example 2 <SD> Sets active and visible frames to 0 and clears the screen <RF1> The text “Frame 0” is restored to the screen from EEprom <RF2> The text “Frame 1” is restored to the screen from scratchpad RAM Note: If this last sequence is repeated after the power has been removed and restored, then only the RF0 will restore the saved image correctly as the scratchpad ram contents will be undefined.
<SHn> Status Hide System This command controls the visibility of the data status message on standard screens 1 and 4. Description Parameters n = 0 - Status shown n = 1 - Status hidden Initial Value Set by the configuration menu Modes All Screen Modes Notes...
Save the currently visible frame contents as the power-on logo Description Parameters None Initial Value There is a default “BEKA associates” logo built in that appears if no user logo is defined. (OEM versions of the product may have an alternative logo instead) Modes All Modes Notes The screen may be drawn using the text and graphics commands or simply downloaded from the host as a .BMP file using <DS>...
<SOn> Screen Option System This command allows the screen type to be changed remotely. Description Parameters n = 0 - Text Display Mode: programmable to generate custom screens n = 1 - Standard screen; single variable displayed n = 2 - Standard screen;...
<SSn> Screens to Scroll System This command specifies how many of the saved frames can be scrolled through when the arrow keys Description on the display are pressed. Parameters Values of n allowed and their meanings are: n = 0 - No screens are available.
<ST> Steady Attributes Cancel the flashing attribute set with the <FL> command Description Parameters None Initial Value Steady (No Flashing) Modes All Modes Notes The <ST> command allows: Uses • Screens to be built with both flashing and non-flashing text and graphics Example <SD>...
<SVn> Show Variable Mapped Variables Displays the selected input variable using the current Standard Screen Description Parameters n = 1 to 8 - Input Variable number Modes All, when showing Standard Screens Notes The operator can select which input variable is displayed on the screen by pressing the up and down arrow keys.
<SW> Smart Wrap Attributes Force text that cannot fit on the current line, to be written on the next line without splitting words Description Parameters None Initial Value <NA> No Alignment Modes Row Mode only With the <SW> attribute set, the <WT> command will automatically wrap long lines of text without Notes splitting words.
<TOn> TimeOut System Activate a timer that warns if communications from the host ceases for (n x 10) Seconds Description Parameters n = 0 to 255 - Multiples of 10 Seconds Initial Value 0, no timeout active Modes All Modes This command activates a timer that warns via a screen message that there has been no Notes communication from the host for a defined period of time.
<TW> Text Wrap Attributes Force text that cannot fit on the current line, to be written on the next line Description Parameters None Initial Value <NA> No Align Modes Row Mode only This attributes forces any text that will not fit on the current line to be written on the following line. Notes The operation is not intelligent in any way, the decision of whether to wrap to the next line is made on a character by character basis.
<UE> Upload Enable Pixel Graphics Enables the use of the Upload Screen <US> command Description Parameters None Initial Value Not enabled. <US> command will return an error unless preceded by <UE> Modes All Modes This command enables the use of the Upload Screen <US> command, and must be sent immediately Notes prior to that command.
<UL> UnderLine Attributes Set the Underline attribute, so that any subsequently written text is underlined. Description Parameters None Initial Value <NU> No Underline Modes All Modes Once this attribute has been set, any text written in Fonts 2 to 5 are underlined in the decender area of Notes the font.
<US> Upload Screen Pixel Graphics Upload the current screen contents to the host. Description Parameters None Initial Value Not enabled. <US> command will return an error unless preceded by <UE> Modes All Modes Detailed information about the upload procedure is in the Graphics Transfer Section (Page 13). Notes The <US>...
<VBn,m> Vertical Bargraph Line Graphics Draw a vertical bargraph n pixels high with m pixels filled Description Parameters n = 3 to 64 - Height of bargraph m = 0 to n - Number of filled pixels, starting from the bottom Modes Row Mode only The <WMn>...
<VFn> Visible Frame Screen Handling & Text Page frame n is made visible Description Parameters n = 0 or 1 - frame number Initial Value Modes All Modes The display comprises of two virtual screens, screen 0 and screen 1. Only one of these screens is Notes visible at a time.
<VLn> Variable Last System This command controls the number of variables shown in standard screens. Description Parameters n = 1 to 8 - Last variable to be shown Initial Value Modes All modes Only applicable when showing standard screens Notes The <VLn>...
<WMn> Write Mode Screen Handling & Text Determine how text or graphics is drawn on the screen Description Parameters n = 0 to 3 - mode number Modes All Modes Notes The write mode is defined by the value n n = 0 data is written normally to the screen, over-writing the current screen contents n = 1...
<WSn> Write Soft character Screen Handling & Text Write the soft character number n of the current font at the current cursor position Description Parameters n = 0 to 3 - soft font character Modes All Modes Notes A soft font is any user defined image that is the same size as the current font. The display can accommodate 4 soft fonts (n = 0 to 3) for each font F1 to F5.
<WTstring> Write Text Screen Handling & Text Write text to the display, using any set attributes Description Parameters string = any 7-bit ASCII string Initial Value None Modes All Modes This command allows text to be written to the display and take advantage of all the attributes and Notes formatting commands.
Advanced Commands There are 8 commands in the standard BEKA protocol that are used to control the scripting functionality. There are a further 18 script commands that can be used within the scripts, and 14 Pattern Matching commands to handle fixed format data strings.
P+E buttons. This allows the script to be Started, Stopped and Erased by the user. While the script is running it will reply S0 or B0 to all BEKA commands sent to it apart from a few special ones. These are Terminate Script <TS>, Cyclic Data <CD>, Jump Register <JRn>, Set Event <SEn>, Screen Option <SOn>.
Script Flow A script is a sequence of BEKA commands executed in order. The script engine starts at the top of the list and works its way to the bottom where it stops. This on its own is not very useful and some control over the flow of the script is needed.
In programming terms we often need to execute the same sequence of commands several times during the operation of a program so we have the Goto Subroutine *GSlabel and Subroutine Return *SR. The number of subroutines is limited by the number of labels but it should be noted that the script engine does not support nesting of subroutines. Such constructs should be avoided in simplistic systems.
In order to do this within a script a register has been introduced which can be set from 1 to 255 by the host system. The <JRn> Jump Register BEKA command is used to set the value of the register to n.
*LAStart WTPipe Flow CM3,0 DV1,5,0,1,1 *LAloop *GR100,tb *GTloop *LAtb WTTea Break CM7,0 WTPress 1 To Cancel *WK1,100 *GTStart In this example the text display will show the cyclic data value for variable 1 on the screen for the user to monitor the process.
Page 127
For example: Event 1 executed Event 1 executed again Event 1 executed again Nothing happens as Event 1 has already been executed SE21 Event 2 is executed SE22 Nothing happens as Event 2 has already been executed SE22 Nothing happens as Event 2 has already been executed SE22 Event 1 is executed SE21...
*EE0,2,key2 *EE1,10,evnt10 *EE1,20,evnt20 WTEvent Demo *LAevnt20 cm7,0 WTEvent 20 Occurred *DT10 *LAEvnt10 cm7,0 WTEvent 10 Occurred *DT5 *LAkey2 cm7,0 WTKey 2 Pressed *DT5 This example is the same as the previous one but the set up of the three events is protected. Timer Event (Firmware 3.4 Onwards) A new command to create a timer event after a specified number of seconds has been added.
Script Errors Errors encountered when running a script are displayed on the screen indicating the line number that the error occurred. Any error also stops the script engine from executing any further commands. If necessary, the host can read the error message with the <GE>...
Page 130
On power up the strings are all cleared to blank strings. They can populated with the <CXn,string> command where n is the index of the string to be saved and string is the character string to save. This command does not have any visual effect on the screen display, but when all the strings that require to be updated have been populated with their new values, the <CU>...
Scripting Control Commands Command Meaning Description <CU> Cyclic Text Update Causes all script string variables defined by *DX to be updated Populates one of the 16 cyclic text strings <CXn,string> Cyclic Text n is the index number in the range 1 to 16 Downloads a script into the display n is a block number in the range 0 to 31 containing exactly <DPn>...
Goes to the label label when the register = n n is in the range 1 to 255 *GRn,label Goto Register n can be set externally by BEKA or Modbus commands to control the script flow Executes the subroutine at the specified label label •...
Page 133
*LAlabel Label Defines the label label(6 chars max) Defines the label label(6 chars max) and then Becomes Busy *LBlabel Label (A space saving way of issuing a *LAlabel followed by *BB) Allows a specified key n to enter the display menu system n is in the range 0 to 6, where 0 disables the command m = 0 for main menu, 1 for Quick Access menu *MKn,m,p...
The BEKA display can be set up to handle 4 separate patterns at the same time or to use one pattern to control and redefine other patterns. For the purpose of this document we will only work with one pattern.
Page 135
Once defined, patterns are retained while a script is running. The moment a script is stopped the definition is lost and matching is switched off. This is to allow normal host communication to resume via BEKA protocol or Modbus. If a pattern needs to be removed during a running script, the *PKn Pattern Kill command can be used.
Pattern Processing Now that the data has been captured it has to be processed ready for display. The purpose of the Serial Text Display is to supply a user with information in a manner which makes it easy for them to do their job. This discussion will concentrate on how to get the data from the matched string and display it in the simplest manner.
Page 137
IN_8. It is important to note that *MV will only convert real numbers in a numeric format that it understands e.g. 1.234, 12E-2, -1000.7 etc. It cannot cope with non numbers and will just give an error. As with the *PV command above, the error causes the *MV command to ignore the data and not update the display.
Page 138
Control byte value 0x01 0x04 0x82 Mask value 0x80 0x80 0x80 Result after ANDing 0x00 0x00 0x80 Expected Value 0x00 0x00 0x00 Result = Expected ?( i.e. Jump) To use this in our example code we would test the second byte: *PJ,1,2,128,0,pos *AV- *LApos...
Page 139
*PD1,9,3 *PC1,1 *LAgotit *PJ1,2,128,0,pos *AV- *Lapos *PV1,3,6 *MV1 CM2,61 *PJ1,2,7,1,addkv *PJ1,2,7,2,addv *PJ1,2,7,4,addmv *GTdone *Laaddkv WTkV *Gtdone *Laaddv *Gtdone *Laaddmv WTmV *LADone This script will work correctly as long as the host keeps sending data, but if it stops the value on the display will freeze at the last value received.
Packet Matching Commands Note that Patterns, Events and Jumps must be defined before issuing the *PR command to enable the pattern matching function. Command Meaning Description Add the specified string to the cyclic data store *AVstring Add to Variable string is any ASCII string up to 10 bytes long Initialise Variable Initialise the cyclic data store to a null string Convert the cyclic data store to the cyclic data value IN_n...
Need help?
Do you have a question about the BA488C and is the answer not in the manual?
Questions and answers