background image

Issue 6 
5 October 2009 
 

Serial text display 

 

Programming Guide 

 

[ Version 3.4 Firmware ]

 

Содержание BA484D

Страница 1: ...Issue 6 5 October 2009 Serial text display Programming Guide Version 3 4 Firmware ...

Страница 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 ...

Страница 3: ...t 10 Key Mode 0 Default 10 Key Mode 1 10 Key Mode 2 11 Operational Modes 11 CRC Generation 11 Multidrop Operation 12 Graphics Transfers 13 File Format 13 Downloads 13 Uploads 14 Standard Screens 15 Cyclic Data 16 Basic Concepts 16 Updating using ASCII values 17 Updating using Binary Data 17 Data Timeout 17 Mapped Variables 18 Scripting Pattern Matching 18 Command Summary 19 Screen Handling Text 19...

Страница 4: ...ase Variable 55 F1 Font 1 56 F2 Font 2 57 F3 Font 3 58 F4 Font 4 59 F5 Font 5 60 FL Flashing 61 FR Font Restore 62 FS Fill Screen 63 FW Fill Window 64 GBn Graphic Block 65 HBn m Horizontal Bargraph 66 HC Home Cursor 67 HRn m p Horizontal Rotate 68 HSn m p q r s t Horizontal Scroll 69 IF Inhibit Flashing 70 KF Keep Fonts 71 LA Left Align 72 LF Line Feed 73 LHx l Line Horizontal 74 LN Line New 75 LV...

Страница 5: ...s 115 Script Commands 115 Pattern Matching Commands 116 Scripting 117 Overview 117 Downloading and controlling scripts 117 Operation with BEKA protocol 117 Operation with Modbus RTU Protocol 118 Script Flow 118 Key Handling 119 Jump Register 120 Delays and Waits 120 Events 121 Script Event Update Firmware 3 4 Onwards 121 Timer Event Firmware 3 4 Onwards 123 Script Errors 124 Script Timeout Firmwar...

Страница 6: ...n of the instrument display An overview of the protocol Specific information on more advanced features A command summary where the commands are grouped together by function and presented in a series of tables A command reference where each command is listed in alphabetical order and covered in detail The information is presented in a consistent layout and examples given to demonstrate the use of t...

Страница 7: ...he installation without using host resources Speed Increase A command has been added SA to increase the internal speed of the Intrinsically Safe versions of the display at the expense of a reduction in backlight intensity Screen redraws are much faster and more complex pattern matching can be achieved Soft fonts storage There is now the ability to save Font 5 soft fonts The following features have...

Страница 8: ...aphics The size of the pixels improves the contrast and hence the readability at greater distances The display is also backlit by an ultra efficient green LED module which enables the screen to be viewed in all conditions from bright sunlight to total darkness Switch Inputs There are six switches on the front of the panel mounted instrument and four on the field mounted instrument Both models have...

Страница 9: ...M Pixel Mode commands for further information Write Modes Refers to the way text and graphics are written on the screen Mode 0 is normal objects appear as a black image on a clear background Mode 3 is inverse objects appear as a clear image on a black background Modes 1 and 2 are more complex and are used for special effects See the Write Mode section and also the WM command Background Modes Refer...

Страница 10: ...an be added to the screen in four ways each being associated with a particular Write Mode However the write mode is ignored in two cases where it is not considered appropriate namely restored frames and bargraphs In these cases changing the appearance of such items may render them meaningless The four modes are Write Mode 0 is the normal method of updating the screen The object is written to the s...

Страница 11: ...lows For example Existing New Object Resultant Screen to be written Screen Display Display Background Modes The background is only ever visible when the screen is set to flash the foreground image alternates with the background image every second i e If the background is clear then some text on the foreground will disappear and re appear every second Alternatively the background can be made all bl...

Страница 12: ...idden from view This hidden screen can then be made visible by issuing a single command This is especially useful where the host cannot sustain a high data rate or where very complex screens are being generated As far as the operator is concerned the display updates almost immediately even though it may have taken several seconds to construct For simple applications frames can be disregarded The u...

Страница 13: ...ired In addition to the two EEprom locations there is a totally separate location also in EEprom that is used to store a power on logo This is a full screen graphic that appears when the unit is first turned on or after the unit is re booted It is possible to use this area as another storage location but whatever is in that location will also be used as the logo SF Save Frame From either frame RF ...

Страница 14: ...des are o No response o Response to every correctly formatted command o Response to a combination of correctly formatted commands Where a response is returned a user must wait for the response before sending further commands Message error checking is programmable Modes are o No error checking o Simple checksum o 16bit Cyclic Redundancy Check Switch status is encoded into the returned message or ca...

Страница 15: ...ser example K0 Command accepted no keys pressed E4 Command error detected key 4 pressed 6 Command unrecognised key 6 pressed P0 Command rejected unit being configured Any key presses are discarded S3 Command rejected unit running a script key 3 pressed X0 Communication error detected B0 Script engine in a Busy state Note The unit is configured by a local user accessing the configuration menu direc...

Страница 16: ...tely a response is returned to each command Plain text is written directly to the screen no reply message Mode 2 Multiple commands can be sent but these are not executed until a Command Implement CI command is sent One reply is returned for each set of commands An error in any of the commands will result in a Command Error response Plain text is ignored Mode 3 As Mode 2 but the CI command is repla...

Страница 17: ... and 4 until eight shifts have been performed When this is done a complete eight bit byte will have been processed Step 6 Repeat Steps 2 5 for the next eight bit byte of the message Continue doing this until all bytes have been processed Result The final contents of the CRC register is the CRC value This CRC value is then appended to the message The LSB of the CRC is sent first followed by the MSB...

Страница 18: ... correctly received A binary download from the host to the display of the graphic file is then expected within the timeout period of 2 seconds The image must be exactly 120x64 pixels and if not an error response is returned After the file has been downloaded the CI CCn or CRnn command must be sent as per the current operational mode the check byte s being calculated from all of the bytes in the BM...

Страница 19: ... Uploads The protocol is also extended to give the facility of obtaining a screen dump from the display The main use for this is in the preparation of instruction manuals but it could also be used in a debugging role UE Upload Enable command Because a graphic upload generates a significant amount of data there must be safeguards in place to ensure that the data is really required The US Upload Scr...

Страница 20: ...this Programming Guide For hosts that support the Modbus protocol registers can be written to directly without using any BEKA protocol commands Please see the Serial Text Display Modbus Interface Guide for further information 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 stan...

Страница 21: ...CVn string Cyclic Variable The number of decimal places to display DDn m Define Decimal Define upper and lower limits for the bargraphs DLn m p Define Limits Assign Tag information for each input variable DTn string Define Tag Assign Units information for each input variable DUn string Define Units Show or hide the data status SHn Status Hide Select the standard screen format to display SOn Screen...

Страница 22: ... expected The length must be 1 4 x8 40 bytes and if not an error response is returned After the data has been downloaded the CI CCn or CRnn command must be sent as per the current operational mode the check byte s being calculated from all 40 bytes of the input data The download is acknowledged if it was correctly received including checksum or CRC checks and the values are displayed There is a 2 ...

Страница 23: ...defined custom screens Function Command Meaning Place a horizontal or vertical bargraph on the screen and assign it to one of the eight input variables DBn m p q r Define Bargraph Place a numeric variable on the screen at the current cursor position in the current font size DVn m p q Define Variable Remove one or all previously defined bargraphs EBn Erase Bargraph Remove one or all previously defi...

Страница 24: ...cs draw lines and boxes on the screen System affect the operation of the text display Mapped Variables link text and graphics to cyclic data values Scripting allows control by a user defined sequence of commands Screen Handling Text Command Meaning CLn Clear Line CMy x Cursor Move CS Clear Screen CW Clear Window EL Erase Line FS Fill Screen FW Fill Window HC Home Cursor LN Line New RS Request Stat...

Страница 25: ...F5 Font 5 FL Flashing IF Inhibit Flashing LA Left Align LF Line Feed NA No Align NL No Linefeed NU No Underline RA Right Align ST Steady SW Smart Wrap TW Text Wrap UL UnderLine WMn Write Mode Pixel Graphics Command Meaning DG Download Graphic DS Download Screen HRn m p Horizontal Rotate HSn m r s t u v Horizontal Scroll UE Upload Enable US Upload Screen ...

Страница 26: ...Line Vertical VBn m Vertical Bargraph Mapped Variables Command Meaning CD Cyclic Data CTn Cyclic data Timeout CVn m Cyclic Variable DBn m p q r Define Bargraph DDn m Define Decimal DLn m p Define Limits DTn string Define Tag DUn string Define Units DVn m p q Define Variable EBn Erase Bargraph EVn Erase Variable NS New Screen SVn Show Variable ...

Страница 27: ...t FR Font Restore GBn Graphic Block KF Keep Fonts MCn Make Connection ODn Output De energised OEn Output Energised PM Pixel Mode RB ReBoot RC Release Connection RFn Restore Frame RLx Restore Logo RM Row Mode SAn Speed Adjust SBn Set Backlight SFn m Save Frame SHn Status Hide SL Save Logo SOn Screen Option SSn Screens to Scroll TOn Time Out VFn Visible Frame VLn Variable Last ...

Страница 28: ... 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 ...

Страница 29: ...ference 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 ...

Страница 30: ...certain modes Notes Detailed comments Uses Describes where the command may be used Example A simple example showing how to use the command Be aware that most examples assume a SD command has been issued to clear the screen first This section may be omitted for complex commands additional information can be found in other parts of this guide Gotchas Common pitfalls to be aware of See Also Other rel...

Страница 31: ...be drawn and then displayed when they are complete Rapid switching between two different information screens Example Assume the display is showing some data and the active frame and visible frame are both set to 0 AF1 Set active frame to 1 LCD display screen unaltered CS Clear the hidden frame LCD display screen unaltered SW Set smart wrap formatting on to cope with a long line of text WTThis text...

Страница 32: ...awn and an error response it returned to the host Uses The BD command allows information to be segmented borders to be drawn line images to be constructed Example CS Clear Screen PM Set Pixel Mode CM63 0 Move the cursor to the bottom left had corner of the display LCD BD64 120 1 A box a single pixel thick is drawn round the edge of the display LCD CM31 60 Move the cursor to the centre of the LCD d...

Страница 33: ...nd sent Uses The BM command allows attention grabbing messages special effects Example BM0 Background to flashing characters is all pixels off WTFLASH Write the text FLASH to the screen Alternates each second with BM1 Background to flashing characters is all pixels on WTFLASH Write the text FLASH to the screen Alternates each second with BM2 Background to flashing characters is all pixels are the ...

Страница 34: ...mmand allows Text to be automatically aligned without the need for cursor move commands Tidy screen presentation Example PM Set Pixel Mode CM40 0 Set up the vertical position move the cursor to 40 pixels down from the top of the screen on the left hand side of the screen CA Align all following text centrally WTThis is centred Write the message The horizontal position is calculated from the length ...

Страница 35: ...ommand string Uses The CCn command allows Commands to be queued but not actioned until required Basic message error checking Example Assume the text display is in operational mode 3 In order to clear the screen a CS command must be sent followed by the CCn command where n represents the 8 bit sum of the characters C S ASCII values of the example command are 60 decimal 3C hex C 67 decimal 43 hex S ...

Страница 36: ...oad from the host to the display of the input values is then expected The length must be 1 4 x8 40 bytes and if not an error response is returned After the data has been downloaded the CI CCn or CRnn command must be sent as per the current operational mode the check byte s being calculated from all 40 bytes of the input data The download is acknowledged if it was correctly received including check...

Страница 37: ... of the main menu When it is disabled in this way the CE command has no effect on the access to this menu The commands have no effect on the LCD display screen The instrument sends a different response to commands from the host when it is in the programming menus Uses The CE command allows changes to instrument configuration to be made after a CP Configuration Prohibit command Example CP Lock out ...

Страница 38: ...ses The CI command allows Commands to be queued but not actioned until required Commands to be as actioned as quickly as possible as there is no error checking or responses to the host until all the commands have been actioned Complex screens to be designed and tested just using a terminal emulator Example Assume the display is in Operational Mode 2 The command string CS FS CS FS CI will clear the...

Страница 39: ... is in use the line numbers are relative to the window That is line 0 is the top line of the window Cursor position is unchanged by this command Uses The CLn command allows Message status information to be cleared Ensures new messages can be written without leaving part of an old message in place Clearing of lines in a window Example Assume the initial display is F1 Make sure we know the font in u...

Страница 40: ...at the end of the inserted text When graphics images are written to the screen the cursor position is unaltered In Row mode this command is window aware If a window is in use the parameters y and x are relative to the current window Uses The CM command allows Positioning of text and graphics objects Example CS Clear Screen RM Set Row Mode F1 Small 8x6 pixel font CM1 20 Move the cursor to the secon...

Страница 41: ...isabled in this way the CE command has no effect on the access to this menu The commands have no effect on the display LCD screen The instrument sends a different response to commands from the host when it is in the programming menus Uses The CP command allows The prevention of unauthorised changes to instrument configuration The prevention of operators missing messages from the host due to the in...

Страница 42: ...nd allows Commands to be queued but not actioned until required Rigorous message error checking Example Assume the text display is in operational mode 4 To clear the screen the following command needs to be sent CS CRnm The parameters n and m are calculated by running the ASCII value of the characters C S through the CRC algorithm When this is done the CRC code generated is 0x8040 Hence n 40 hex 6...

Страница 43: ... The CS command provides A known starting point before drawing a new screen Example CS Clear Screen Gotchas Defined variables and bargraphs are NOT cleared by this command or rather they are but are updated again automatically Use the EV and EB commands to remove the mappings or use the NS command to clear the screen and all the mappings If windows are being used they must be defined after this co...

Страница 44: ... according to the Status As the acceptable timeout value is totally dependant on the application and the host capabilities it is adjustable from 10 Seconds to 40 Minutes For simple applications the timeout value can be set to 0 which disables the facility The parameter n sets a timeout period of n x 10 seconds n 0 deactivates the timeout function Uses The CT command allows Users to be warned that ...

Страница 45: ...e displayed For example the command CV1 123 456 will set the input variable 1 to a value of 123 456 The string is converted to a numeric value and appears on the standard screens drawing a bargraph if appropriate The value can be updated when necessary by simply sending the same command with the new value Note that there is no mechanism to set the data GOOD or BAD all data is assumed to be GOOD Us...

Страница 46: ...ts of a window it can also be used to create frames to contain text and graphics Using this technique is much faster than using a BD Box Draw command in Pixel Mode Uses The CW command allows A known starting point before updating a window Creation of a simple border Example RM Set Row Mode FS Turn all screen pixels on DW2 5 20 100 Define a window two rows from top and bottom 20 pixels in from both...

Страница 47: ...ied input on screen the variable is moved from the old to the new position The command will fail and a parameter error result is produced if any part of the defined bargraph is off screen Uses The DB command allows A process variable to be shown on screen as a continuously updated bargraph Up to 8 bargraphs to be displayed on a single screen Bargraph definitions to be saved together with on screen...

Страница 48: ...lue of m 5 will select an automatic mode whereby the maximum number of decimal places is shown dependant on the available space Variables are centred when automatically formatted and right justified when manually formatted Information written in this way is saved to non volatile memory and is retained if power to the display is lost Uses The DD command allows The standard screens to show the opera...

Страница 49: ...ownload Screen commands Detailed information is in the Graphics Transfer Section Page 13 Soft fonts are lost when power is removed from the display Fonts can be saved restored as a block using the KF Keep Fonts and FR Font Restore commands Uses The DF command allows Any special character to be stored in the display so that it can be written to the screen just like any other character Example CS Cl...

Страница 50: ...s can form a backdrop onto which standard text or data is then added Pictures can sometimes convey simple messages more easily than text Example CS Clear Screen RM Set Row Mode F1 Small 8x6 pixel font CM3 0 Move the cursor to the start of the 4th row WTGraphics Write the word Graphics CM5 0 Move the cursor to the start of the 6th row WTExample Write the word Example PM Change to Pixel Mode CM60 50...

Страница 51: ...es The DL command allows Optimum scaling of bargraphs Displaying of process variables in the form of bargraphs when used in conjunction with the DB command Example SD Start from a known screen CM1 10 Move to Row 1 DL1 0 0 100 0 Define the bargraph limits for IN_1 as 0 0 and 100 0 DB1 100 0 0 0 Define a horizontal bargraph 100 pixels long using IN_1 and the limits specified by the DL command CM2 8 ...

Страница 52: ... The download mechanism is identical to the DFn Download Font and DG Download Graphic commands Detailed information is in the Graphics Transfer Section Page 13 The cursor position is unchanged by the command Uses The DS command allows A full screen image to form a backdrop onto which standard text or data is then added A customised logo to appear at power on when used with the SL Save Logo command...

Страница 53: ...o non volatile memory and is retained if power to the display is lost The DT command is used to send an ASCII string with a maximum length of 16 characters Uses The DT command allows Displayed variables to have an associated description on screen Standard screens to be used for the convenient display of up to eight process variables with little application programming Example SO2 Select Screen for...

Страница 54: ...096 is mapped to the degrees symbol For example the string Temp C is displayed as Temp C The DU command is used to send an ASCII string with a maximum length of 8 characters The command needs to be repeated for each input variable in order to set the appropriate units of measure Uses The DU command allows Displayed variables to have an associated unit of measure on screen Standard screens to be us...

Страница 55: ...rom the old to the new position The command will fail and a parameter error result is produced if any part of the defined variable is off screen Uses The DV command allows Up to 8 process variables to be shown and continuously updated on screen The status condition of the variable to be indicated Variable definitions to be saved with text and graphics using the SF command Example SD Start from a k...

Страница 56: ...ew window i e DW0 7 0 119 The CS Clear Screen and PM Pixel Mode commands also remove a window definition Uses The DW command allows Text to be scrolled in a window Trend graphs to be drawn by combining the use of the Horizontal Scroll HS command Static text and graphics to be protected headings footers or titles can be left in place while different messages are displayed and cleared within a windo...

Страница 57: ...fferent ways depending on the value of n There is no need to erase a bargraph if you just want to change its position Just set up the new attributes and issue another DB command To erase bargraphs from stored frames restore the frame erase the bargraphs and re save the frame Uses The EB command allows Bargraphs to be permanently erased from the display The CS Clear Screen command does not work on ...

Страница 58: ...n from the top of the screen CA All text is aligned centrally WTThis text is Write out the text BM2 Set the flash background to the inverse of the foreground image F2 Font size 2 16 x 10 pixels CM4 0 Move the cursor to the fourth line down from the top of the screen FL Set the Flashing attribute so any text written will flash if flashing is enabled WTFLASHING Write out the text CM6 0 Move the curs...

Страница 59: ...osition is unchanged by this command Uses The CLn command allows Message status information of variable length to be erased Ensures new messages can be written without leaving part of an old message in place Example F1 Sets the single row font 8 x 6 pixels CA Turn on the centre align attribute WTText line 0 Write out a line of text LN Down to the next line Last two commands repeated up to WTText l...

Страница 60: ...ways depending on the value of n There is no need to erase a variable if you just want to change its position or font Just set up the new attributes and issue another DV command To erase variables from stored frames restore the frame erase the variables and re save the frame Uses The EV command allows Mapped Variables to be permanently erased from the display The CS Clear Screen command does not w...

Страница 61: ...ten in Operational Modes 0 and 1 The font sizes are as follows F1 Single row font 8 x 6 pixels F2 Two row font 16 x 10 pixels F3 Three row font 24 x 15 pixels F4 Four row font 32 x 19 pixels F5 Six row font 48 x 29 pixels All fonts have a full 7 bit character set except F5 All fonts have true decenders except F1 Uses The F1 command allows The maximum number of characters on the screen Creation of ...

Страница 62: ...nd They also affect free text written in Operational Modes 0 and 1 The font sizes are as follows F1 Single row font 8 x 6 pixels F2 Two row font 16 x 10 pixels F3 Three row font 24 x 15 pixels F4 Four row font 32 x 19 pixels F5 Six row font 48 x 29 pixels All fonts have a full 7 bit character set except F5 All fonts have true decenders except F1 Uses The F2 command allows Improved readability over...

Страница 63: ...and They also affect free text written in Operational Modes 0 and 1 The font sizes are as follows F1 Single row font 8 x 6 pixels F2 Two row font 16 x 10 pixels F3 Three row font 24 x 15 pixels F4 Four row font 32 x 19 pixels F5 Six row font 48 x 29 pixels All fonts have a full 7 bit character set except F5 All fonts have true decenders except F1 Uses The F3 command allows Improved readability ove...

Страница 64: ...lso affect free text written in Operational Modes 0 and 1 The font sizes are as follows F1 Single row font 8 x 6 pixels F2 Two row font 16 x 10 pixels F3 Three row font 24 x 15 pixels F4 Four row font 32 x 19 pixels F5 Six row font 48 x 29 pixels All fonts have a full 7 bit character set except F5 All fonts have true decenders except F1 Uses The F4 command allows An important parameter to dominate...

Страница 65: ...ree text written in Operational Modes 0 and 1 The font sizes are as follows F1 Single row font 8 x 6 pixels F2 Two row font 16 x 10 pixels F3 Three row font 24 x 15 pixels F4 Four row font 32 x 19 pixels F5 Six row font 48 x 29 pixels All fonts have a full 7 bit character set except F5 All fonts have true decenders except F1 Uses The F5 command allows Maximum visibility Eye catching warnings when ...

Страница 66: ...rom the top of the screen CA All text is aligned centrally WTThis text is Write out the text BM2 Set the flash background to the inverse of the foreground image F2 Font size 2 16 x 10 pixels CM4 0 Move the cursor to the fourth line down from the top of the screen FL Set the Flashing attribute so any text written will flash if flashing is enabled WTFLASHING Write out the text CM6 0 Move the cursor ...

Страница 67: ... allows Time to be saved rather than having to download soft font sets after a power down Example CS Clear the screen F2 Define the font size required WTStatus Write out the text Status CM7 65 Bottom line of screen 65 pixels from the left of the screen WTAlarm Write the text Alarm FR Recover soft fonts N B The position of the command is unimportant The command could have been issued at any time af...

Страница 68: ...Removes any windows that may be defined equivalent to issuing a DW0 7 0 119 command Homes the cursor equivalent to issuing a HC command Uses The FS command provides A known starting point before drawing a new screen Example FS Fill Screen Gotchas If windows are being used they must be defined after this command See Also CS Clear Screen CW Clear Window DW Define Window HC Home Cursor ...

Страница 69: ...sing this technique is much faster than using a Box Draw BD command in Pixel Mode Uses The FW command allows A known starting point before updating a window Creation of a simple border Example RM Set Row Mode CW Turn all screen pixels on DW1 6 10 110 Define a window one row from top and bottom 10 pixels in from both sides FW Set all the pixels in the window area to on F2 Set required font size CM3...

Страница 70: ...which block of 64 bytes is being sent or read from the display Graphics commands will ignore any data past the end of file in a block and data in any higher numbered blocks Uses The GB command allows The data length limitations in transferring graphics data to be overcome Example GB0 Set Graphics Block 0 Read Write first 64 bytes of data to the display using the GRAPHIC_DATA parameter GB1 Set Grap...

Страница 71: ...n to form the frame so HB80 0 and HB80 1 are visually identical as are HB80 79 and HB80 80 Uses The HB command allows Simple graphical representation of values or progress Bargraphs to be combined without restriction with other text and graphics Example SD Return screen to known state CM2 20 Move cursor to the second row down 20 pixels from the left of the screen HB80 20 Draw a horizontal bargraph...

Страница 72: ... Home cursor is done automatically by commands such as CS FS CW FW and setting any font size Uses The HC command allows Any subsequently written text to be easily positioned at the top of the display A starting point for constructing new screens Example SD Put the display in a known state F2 Set the font size CM7 30 Cursor down to the bottom of the screen WTBottom Write out some text HC Home the c...

Страница 73: ...s functioning correctly even though no useful information is available to view Example Assume the default logo is displayed and that we are writing to Frame 0 SF1 2 Save this frame to scratchpad RAM CS Now clear the current screen Nothing is visible to the user but the logo is still in scratchpad ram HR1 0 4 HR1 0 4 HR1 0 4 Rotate the top 5 rows one pixel to the right Repeat the command to rotate ...

Страница 74: ...e width of the screen but as it is a window aware command the effective width may be controlled by setting up a suitable window Uses The HS command allows Line bar block charts that scroll with time Visual effects Example To use this command effectively takes more commands than can easily be listed here However consider the following screen which will illustrate the possibilities This illustrates ...

Страница 75: ...l text is aligned centrally WTThis text is Write out the text BM2 Set the flash background to the inverse of the foreground image F2 Font size 2 16 x 10 pixels CM4 0 Move the cursor to the fourth line down from the top of the screen FL Set the Flashing attribute so any text written will flash if flashing is enabled WTFLASHING Write out the text CM6 0 Move the cursor to the sixth line down from the...

Страница 76: ...ly on power up The font data is written as a block and will overwrite any previously stored data To add a soft font definition to the current stored values they should be restored to the instrument memory first The new font can then be downloaded and the entire new font set re saved Uses The KF command allows A quicker method of providing soft fonts after power on Example FR Get any existing font ...

Страница 77: ...ancelled by the NA command or any of the other text alignment commands CA RA SW TW Uses The LA command allows Text to be automatically aligned without the need for cursor move commands Tidy screen presentation Example SD Set the display to a known state CM3 60 Move the cursor to the middle of row 3 LA Set left align attribute WTLeft Left align the word Left on the current row RA Set the right alig...

Страница 78: ... the effect of moving the cursor to the beginning of the next row down when a single carriage return character 13 decimal 0x0D in hex is received If the cursor is already on the bottom line of the display or window the current screen is scrolled up one line and the cursor positioned at the beginning of the bottom line The NL command cancels this attribute making LF and CR independent actions NL is...

Страница 79: ...command allows information to be segmented borders to be drawn line images to be constructed Example SD Set the display to a known state PM Set display to Pixel Mode CM33 0 Move the cursor to pixel row 33 at the left of the screen LH120 4 Draw a horizontal line 120 pixels long and 4 pixels wide RM Back to Row Mode SW Turn Smart Wrap attribute on Text wraps without splitting words HC Home the curso...

Страница 80: ...y on the bottom line the display will scroll up one line leaving the cursor on the new bottom line Uses The LN command allows A vertical scroll of text and graphics to occur if the cursor is already on the bottom line A quicker but more limited version of the Cursor Move command Example SD Set the display to a known state CA Align all following text centrally WTLine 1 Write some text LN Move the c...

Страница 81: ...mages to be constructed Example SD Set the display to a known state PM Set display to Pixel Mode CM63 58 Move the cursor to pixel row 63 in the middle of the screen LV64 4 Draw a vertical line 64 pixels long and 4 pixels wide RM Back to Row Mode DW0 7 0 57 Define a window on the left half of the screen SW Turn Smart Wrap attribute on Text wraps without splitting words HC Home the cursor to top lef...

Страница 82: ...e they are not connected Single instrument configurations with address 0 will return an error response to this command Uses The MC command allows Multiple instruments to be connected to one host port Example MC1 Make connect to the instrument with address 1 CS Clear the screen on instrument address 1 SW Set the smart wrap attribute on instrument address 1 WTThis text has been sent to the instrumen...

Страница 83: ... NA command allows manual formatting after special alignment attributes have been used Example SD Set screen to known state RA Set right alignment attribute on WTThis text is Write out some text LN Cursor to next line down left of screen WTright aligned Write some more text LN Cursor to next line down left of screen NA Cancel text alignment attribute WTThis is not Write some text this time it appe...

Страница 84: ... LF separately to be accommodated Example SD Set screen to known state LF Set Linefeed attribute on WTFirst line of text Write a line of text WT CR Send a CR character with the Line Feed attribute set this would be interpreted as CR LF Note The square brackets are not sent they are just there to show that a Carriage Return character ASCII 13 is sent WTMore text This text written on the line below ...

Страница 85: ...commands CS EV0 EB0 in succession This command also Removes any windows that may be defined equivalent to issuing a DW0 7 0 119 command Homes the cursor equivalent to issuing a HC command Uses The NS command allows An efficient method of clearing the screen after mapped variables have been used Example NS New Screen Gotchas If windows are being used they must be defined after this command See Also...

Страница 86: ...ly affects text written after the attribute has been set Uses The NU command allows A combination of underlined and plain text to appear on the same screen Example SD Set screen to known state CA Centre align the text UL Set Underline attribute on F2 Choose a font size not F1 WTUnderlined Write out some text that is underlined NU Cancel the underline attribute CM6 0 Move the cursor down WTNoUnderl...

Страница 87: ...ects which output is being controlled n 1 controls the output A1 A2 n 2 controls the output A3 A4 The command ODn turns off de energises output n The command OEn turns on energises output n Uses The OD command allows The display to control alarms annunciators sounders etc under program control Example OE1 Output A1 A2 is energised short circuit OE2 Output A3 A4 is energised short circuit OD1 Outpu...

Страница 88: ...which output is being controlled n 1 controls the output A1 A2 n 2 controls the output A3 A4 The command OEn turns on energises output n The command ODn turns off de energises output n Uses The OE command allows The display to control alarms annunciators sounders etc under program control Example OE1 Output A1 A2 is energised short circuit OE2 Output A3 A4 is energised short circuit OD1 Output A1 ...

Страница 89: ... to optimise the response time Alternatively complex screens can be written to the non active frame and then made visible This gives the appearance of a fast redraw after a short pause Uses The PM command allows Flexibility of text and graphics positioning Tidy screen presentation Example PM Set Pixel mode CM11 1 Move the cursor to Line 11 Row 1 WTText Write the word Text CM15 26 Move the cursor t...

Страница 90: ...fter the attribute has been set The command is cancelled by the NA command or any of the other text alignment commands CA LA SW TW Uses The RA command allows Labelling the right hand soft keys Constraining text away from text or images on the left of the screen Text to be automatically aligned without the need for cursor move commands Example SD Set screen to known state RA Set right alignment att...

Страница 91: ...to force a complete restart of the instrument which may be needed if the host and display are independently powered An alternative is to issue the SD Screen Defaults command which simply initialises the display to a known state Uses The RB command allows The entire instrument to be put into a known state Example RB Reboot the instrument A delay of up to 2 seconds may elapse before the watchdog tim...

Страница 92: ...0 will return an error response to this command Uses The RC command allows Multiple instruments to be connected to one host port Example MC1 Make connect to the instrument with address 1 CS Clear the screen on instrument address 1 SW Set the smart wrap attribute on instrument address 1 WTThis text has been sent to the instrument at address 1 Send this text to the instrument with address 1 RC Relea...

Страница 93: ...rwrite this location See the SF Save Frame command for details Uses The RF command allows Images to be transferred from one frame to another Any data screen to be flashed using the sequence SF0 2 FL EF BM2 RF2 Example Assume the display is showing some data and our active frame is set to the same value as the visible frame SF0 2 Save frame 0 to scratchpad RAM CS Clear screen for new message LN Mov...

Страница 94: ... for 10 seconds between each screen scroll If there is no saved logo this command will restore the default BEKA logo The logo is always recovered to the current visible frame overwriting the frame contents Note this command is the only command that does not write to the current active frame Uses The RL command allows A customised logo to appear if the system is not being used or there have been no...

Страница 95: ...strain and align text Writes to the display in Row Mode are always faster than Pixel Mode operation and should be used wherever possible Uses The RM command allows Rapid display of text messages Simple text alignment Example CS Clear screen for new message RM Set Row Mode CA Centre align the text WTPlease Write out message F2 Use a larger font size CM3 0 Move the cursor to row 3 WTPRESS KEY 6 Writ...

Страница 96: ...sed in a loop waiting for an operator key press Uses The RS command allows Operator feedback The only method for checking the keys in Operational Mode 0 Example CS Clear screen for new message RM Set Row Mode CA Centre align the text WTPlease Write out message F2 Use a larger font size CM3 0 Move the cursor to row 3 WTPRESS KEY 6 Write more text F1 Back to the small font CM5 0 Move the cursor to r...

Страница 97: ...t the fastest speed possible Increasing the processor clock speed increases the current taken by the circuitry so the maximum backlight intensity is reduced to compensate The speed of internal processing and screen redrawing is increased but all other timing parameters remain unchanged e g communication speed flash rate In order to maintain code compatibility between different models the SAn comma...

Страница 98: ... for further information The new backlight intensity is not saved in EEprom If permanent changes to the backlight intensity are required use the configuration or quick access menus The RB ReBoot command restores the backlight to the default value as part of the initialisation process Uses The SB command allows The backlight to be flashed to attract attention Panel illumination to be controlled by ...

Страница 99: ...en HC Cursor homed WM0 Normal text RM Row Mode IF Inhibit Flashing ST Text Steady attribute NA No Text Alignment or Wrap BM0 Background Mode 0 NU No Underline As a consequence the screen is cleared window definitions are removed display scrolling is turned off and key press data cleared Uses The SD command allows A known starting point for the creation of each screen Example SD Set Screen defaults...

Страница 100: ...ram Detailed information about the use of frames can be found in the Frames Section Page 7 Uses The SF command allows Complex screen backdrops to be saved to which live data can then be added Temporary frame storage while another message is displayed Images to be moved between frames Normally static frames to flash by saving them and then restoring them with the FL and EF attributes turned on This...

Страница 101: ... 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 Gotchas Make sure that the section on Frames Page 7 is read and understood Be aware of the limitations regarding scratchpad RAM unexpected results may easily occur Frame n may or may not currently be visible Use the VF command to achieve the desired res...

Страница 102: ...figuration menu See the Standard Screens section on Page 15 for further details Uses The SH command allows The displayed screen to be simplified where the extra text could be confusing Example SO1 SH0 Standard screen single variable displayed at a time Status shown SH1 Standard screen two variables displayed at a time Status hidden Gotchas The local configuration menu can also be used to alter the...

Страница 103: ...ime by issuing another SL command If a user logo is no longer required then clear the screen and execute the SL command This will restore the default BEKA logo Uses The SL command allows A customised logo to appear at power on Example CS Clear Screen DS Tell the display to expect a 64 x 120 pixel graphics image that it should display full screen Binary download of BMP file is now sent Image is dis...

Страница 104: ...hs displayed n 10 Standard screen eight variables displayed n 11 Standard screen eight variables and eight horizontal bargraphs displayed Initial Value Set by the configuration menu Modes All Screen Modes Notes This command function is also found in the configuration menu See the Standard Screens section on Page 15 for further details Uses The SO command allows The displayed screen to be changed w...

Страница 105: ...s Screens are restored to the current active frame This frame is then made visible Uses The SO command allows A custom screen to be made visible by a single keypress Unused screens to be hidden Example This command can be used to hide a user logo in the following way Download the logo using the GB and DS commands Save the logo in EEprom area 2 Set SS2 Set BS2 The user logo will be displayed on pow...

Страница 106: ...non flashing text and graphics Example SD Set the display in to a known state FL Set the flashing attribute EF Enable flashing F2 Use font 2 CA Align the text in the centre of the screen CM2 0 Down to row 2 WTFlashing Write the word Flashing ST Cancel the flashing attribute CM5 0 Down to row 5 WTSteady Write the word Steady Alternating each second with See Also BM Background Mode EF Enable Flashin...

Страница 107: ...put variable is being shown by using this command The SVn command forces the unit to display input variable n using the current screen format i e if 2 variables per screen are being shown then issuing a SV4 command will show input variables 3 and 4 Uses The SV command allows An operator to be alerted to a particular value A host can display a sequence of input variables Example SO2 Start with a 4 ...

Страница 108: ... command CA LA RA or TW It is cancelled by the NA command SW can be used with either the full screen or within a window Uses The SW command allows Simple formatting of text strings Example SD Set the display to a known state SW Set the Smart Wrap WTThis is a very long line of text that shows how the Smart Wrap attribute automatically formats the text Write a lot of text It all fits on screen CS Cl...

Страница 109: ...a multidrop application each individual display must be communicated to within their timeout period Uses The TO command allows Users to be warned that the message displayed may be out of date Example TO2 Sets a timeout period of 2 x 10 20 seconds Assume that the following screen was being displayed If no communication was received for more than 20 seconds the warning screen will alternate every se...

Страница 110: ...creen and an error is returned to the host Uses The TW command allows Strings can be sent without worrying about their length Maximum visible message size albeit with poor formatting Example SD Set the display to a known state CM3 0 Cursor Move to line 3 TW Set Text Wrap attribute WTThis text exceeds the line length Send a long line of text which exceeds the screen width Note that all the text is ...

Страница 111: ...ommand is included to prevent accidental use of the US command which would disrupt normal communications for a few seconds Uses The UE US commands allow Screen contents to be uploaded to a host computer as a Windows format BMP file These screen captures can be included in operator user manuals and other documentation This combination of commands was used to generate the example screen shots in thi...

Страница 112: ...lined use a line draw command LH in pixel mode Characters defined in the soft fonts are also underlined using this command This should be born in mind when defining the characters The Underline attribute is cancelled with the NU command Uses The UL command allow Attention to be focussed onto certain text Screen presentation to be improved by the use of headings Example SD Set the display in to a k...

Страница 113: ...bytes and the acknowledge but not the check bytes themselves The 1086 byte data block saved to file is a graphics image of the screen in 2 colour Windows BMP format This command requires the Upload Enable UE command to be sent immediately prior to it Uses The UE US commands allow Screen contents to be uploaded to a host computer as a Windows format BMP file These screen captures can be included in...

Страница 114: ... so VB60 0 and VB60 1 are visually identical as are VB60 59 and VB60 60 Uses The VB command allows Simple graphical representation of values or progress Bargraphs to be combined without restriction with other text and graphics Example SD Set the display in to a known state CM7 5 Cursor down to the bottom row five pixels in VB64 44 Draw a vertical bar 64 pixels long with 44 pixels filled CM7 14 Cur...

Страница 115: ...tantly restored a single command to alternate two images Example AF1 All writes to the display after this command are directed to screen 1 which is currently hidden CS Screen 1 is cleared display still shows the initial message F5 Large Font enabled display still shows the initial message WTSTOP The word STOP is written on the hidden screen display still shows the initial message VF1 Screen 1 now ...

Страница 116: ...andard screen 1 each press of the up arrow will show the next input value as follows If IN_1 is currently being displayed Up arrow will change the display to show IN_2 Down arrow will change the display to show IN_8 If the VL2 command is sent then the action will be modified as follows If IN_1 is currently being displayed Up arrow will change the display to show IN_2 Down arrow will change the dis...

Страница 117: ...rse of the data is written to the screen over writing the current screen contents Detailed information is in the Display Features Section Page 5 Uses The WM command allows Complete flexibility over the appearance of text and graphics Allows objects to be written that although they may overlap do not overwrite each other Inverse can be used to highlight XOR writes will undo what has been written Ex...

Страница 118: ...s command will assume that the soft font specified has already been downloaded or restored No error is generated if a soft font does not exist it just writes uninitialised data Soft fonts are lost when power is removed from the display Most fonts can be saved restored as a block using the KF Keep Fonts and FR Font Restore commands Uses The WS command allows Any special character to be written to t...

Страница 119: ...g with the WT command the character should be included twice To simplify temperature display the character alt 096 is mapped to the degrees symbol For example the string Temp C is displayed as Temp C Font 1 can display an up arrow by using ASCII character 130 alt 0130 a down arrow by using ASCII character 129 alt 0129 and a block by using ASCII character 127 alt 0127 Text that exceeds the line len...

Страница 120: ...and Meaning CU Cyclic Text Update Script String Variables CX n string Cyclic Text DPn Download Program ES Execute Script JRn Jump Register KS Kill Script SEn Script Event TS Terminate Script Script Commands Command Meaning BB Become Busy BI Become Idle BR Become Ready DT Delay Time DXn m Define Script String EDn m Event Disable EEn m lab Enable Event GKn lab Go Key GRn lab Go Register GSlab Go Sub...

Страница 121: ...e Variable MVn Make Variable PCn m Pattern Control PDn m p Pattern Definition PEn label Pattern Event PJn m p q label Pattern Jump PKn Pattern Kill PRstring Pattern Response PSn m Pattern Size PTn m label Pattern Timeout PVn m p Pattern Variable PWn m p Pattern Write VD Variable Debug ...

Страница 122: ... script can be loaded The end of the script is marked by a nul following the command terminator i e two consecutive 0x00s e g CSnulWTHello worldnulnul would when downloaded and run clear the screen and put Hello world on the top line of the display Some basic checks are carried out on the script as it is downloaded so it is possible to get a parameter error returned To help pinpoint the source of ...

Страница 123: ...er to make the commands different from the usual BEKA commands they have been prefixed with a These commands are for use of the script engine and are meaningless to the normal BEKA command processor Script commands are processed in order one after the other For example LN WTHello Will move down a line and write Hello on the screen After writing the Hello the script will stop LN WTHello ES Will mov...

Страница 124: ...this example the script clears the screen and writes up the message instructing the user to press key 1 or 2 it then drops into a loop which checks the keys If key 1 is pressed the flow is altered to go to label one This causes the script engine to write Screen 1 on the bottom line of the screen and clears the rest of the line It then reverts to the scanning of the keys The same applies to key 2 T...

Страница 125: ...ut up an alarm message If the host issues a JR100 command then the message Host Alarm 1 will appear on the display and the Jump Register will be reset to 0 Similarly if the host were to issue a JR200 command then Host Alarm 2 will appear on the display and the Jump Register will be reset to 0 Note that setting the jump register to any other number will not have any effect and the register will rem...

Страница 126: ...n support a maximum of 20 events Like the Jump Register the Event Register is set with the SEn Set Event command where n is in the range 1 to 20 Once the event has been seen by the script engine the event register is cleared to 0 Events are enabled with the EEn m label command where n 0 to respond to a key press event and n 1 to respond to the Event Register m the number of the key or register and...

Страница 127: ... 500ms As an exercise it is left to the reader to work out what happens when the host issues a SE20 command The use of Events allows the programmer to create different process views of the plant and display them depending on what the user needs to see at that time It is also possible for the host to interrupt normal operation to show alarm messages etc However there is a potential problem while th...

Страница 128: ...r a specified number of seconds has been added TEn label generates an event after n seconds has elapsed It is a one shot event that can be cancelled by specifying a zero delay to the same label i e TE0 label This example script will switch output1 on and off at 5 second intervals SD Set the display in to a known state TE5 on Enable a Timer Event to happen after 5 seconds BI Become Idle LBon OE1 Se...

Страница 129: ...cmsg when key 6 is pressed ST5 tout Set a Script Time out to go to tout if no communications for 5 seconds or more SD Set Display to a known format NS Clear all Mapped Variables CM0 1 WTScript Timeout Test Display a Message F2 Set Font 2 CM3 30 DV1 5 2 1 1 Display Mapped Variable IN_1 BI Become Idle LBtout Define Timeout Event F2 Font 2 CM6 0 Move Cursor to line 6 CA Set Centre Align WM3 Set Inver...

Страница 130: ...us the use of a save frame and then restore frame will only restore the image of the string displayed at the time that the save frame was executed In the following example the time 2 variables with their units and tags are displayed on then screen when the script has been downloaded and run SD NS CM0 90 DX1 5 CM2 57 DV1 5 1 1 1 CM4 57 DV2 5 1 1 1 CM2 6 DX2 8 CM4 6 DX3 8 CM2 91 DX4 4 CM4 91 DX5 4 B...

Страница 131: ...ded ASCII string This data is followed by the standard response sequence for the current operational mode GL Get Line The GL command is confirmed and then the last script error line number is returned as an 18 byte zero padded ASCII string This data is followed by the Standard response sequence for the current operational mode JRn Jump Register Sets the Jump Register to n n is a number in the rang...

Страница 132: ...e defined event n 0 to define key press events where m is in the range 0 to 6 n 1 to define register events where m is in the range 0 to 20 Note if m 0 then all events in that class are disabled EEn m label Enable Event Goes to the label label on the defined event n 0 to define key press events where m is in the range 1 to 6 n 1 to define register events where m is in the range 1 to 20 GKn label G...

Страница 133: ...ol to the calling script STn label Script Timeout Generates an event when there has been no communications with the text display for n seconds It is a one shot event The event can cancelled with ST0 label TEn label Timer Event Generates an event after n seconds has elapsed It is a one shot event The event can cancelled with TE0 label WKn t Wait Key Waits for key n to be pressed or a time of m x 10...

Страница 134: ...rn Capture In order to capture data it has to have a defined structure The structure is often fixed by the manufacturer but can be configured in some cases In our example above the pattern is 9 bytes in length including the two fixed framing bytes one at the start and one at the end The 7 bytes in the middle can change depending on the range and value measured by the system The BEKA display can be...

Страница 135: ...ne command In this command n is again the pattern number 1 4 m informs the system which byte of the message to look at and p tells the system what that byte should be So for our example PD1 1 2 will tell the system that the first byte of pattern 1 must have the value of 0x02 STX for a match to be made PD1 9 3 would perform a similar action and ensure that the 9th byte is always 0x03 ETX In the exa...

Страница 136: ...atest value is written over the old value Indirect Action Commands The indirect action commands are a little more complex These commands work on a stored variable rather than writing directly to the screen The concepts behind cyclic data and mapped variables should be understood before attempting to use this type of action There are commands to add data to the store and then to convert the store i...

Страница 137: ...ore before it is processed with the MV command The AVstring Add Variable command does exactly this AV combined with PV allows the store to be set as needed E g IV AV PV1 3 6 MV1 The above code initialises the store loads a minus sign into it and then adds the value from the matched data before sending it to cyclic data IN_1 This it makes it appear as negative number Note that any number of AV comm...

Страница 138: ...nore the sign bit Control byte value 0x01 0x04 0x82 Mask value 0x07 0x07 0x07 Result after ANDing 0x01 0x04 0x02 Expected Value 0x01 0x01 0x01 Result Expected i e Jump YES NO NO This converts into code as F1 CM2 61 PJ1 2 7 1 addkv PJ1 2 7 2 addv PJ1 2 7 4 addmv GTdone LAaddkv WTkV GTdone LAaddv WTV GTdone LAaddmv WTmV LAdone EL The cursor is lined up the decision process is made the units written ...

Страница 139: ...rectly matched the timeout timer is reset and it starts to count down again Therefore if the pattern is always sent repeatedly before the timeout time then the timeout event will not trigger However if the host does not send the next pattern in time the timeout event will occur and the operator can be warned Once the event has happened it will not happen again until it another valid pattern has be...

Страница 140: ...end the a response to the host computer to tell it to change range or to continue with the process The PRstring Pattern Response command allows the user to do this The string is limited to 28 bytes by the maximum line length Non printable characters can be sent by using a backslash to tell the handler that the next two bytes are hex representation E g 03 would send the 0x03 value or ETX To send a ...

Страница 141: ...value q If it matches the script jumps to label label n is in the range 1 to 4 m is in the range 1 to 32 p is in the range 1 to 255 q is in the range 1 to 255 PKn Pattern Kill Deletes and disables pattern number n n is in the range 1 to 4 PRstring Pattern Response Sends the specified string to the host system string is any ASCII string up to 28 bytes long Non printable characters are sent as hex v...

Страница 142: ...137 BEKA Associates Old Charlton Road Hitchin Hertfordshire SG5 2DA Tel 44 0 1462 438301 Fax 44 0 1462 453971 Web www beka co uk Email support beka co uk or sales beka co uk ...

Отзывы: