Jump to content

Setting The Screen to display.


Recommended Posts

The Horner OCS (PLCs with inbuilt HMI) have multiple screens available that can be programmed with text, data and graphics.

The number of screens is determined by the OCS hardware. In the XL series, there are typically 1023 screens.

There are three means of selecting a screen to display from within the code.

1) Each screen is mapped onto a %D location with screen 1 at %D1. A boolean function that sets the "%D" register will cause that screen to display. If the "%D" register is temporarily true, then the screen will be temporarily shown. If the "%D" bit is set, then the most recent "%D" register to be set will be the new permanent screen to be displayed.

2) There are two screen display functions that can be called, Change Screen and Display Screen where Display Screen is a temporary showing of the identified screen and Change Screen changes the "default" display screen.
Each screen has a unique address from 1 to 1023 (or what ever the maximum screen number is for the hardware)

3) The third means of controlling the screens, is to use the System Register %SR1 which is an index to the displayed screen. To display a screen, set the register %SR1 equal to the screen that needs to be displayed.

 

NOTE : i.  For ease of code debugging and enhancement, only use one method of screen control.
           ii.  The screen displayed is the latest screen to be called. If the Screen is altered more than once in a scan, the screen seen will be the last change made.

Screen Jumps

In addition to manipulating the screens directly from within the code, it is common to use jump buttons on each screen to "jump" to the next desired screen. The actual screen being displayed can be determined from within the code by reading the %SR1 register at any time.
The use of screen jumps can be quite restrictive in some circumstances with one of the issues being the real estate required to add sufficient screen jumps to suit the task.

Clever screen control can hide and show screen jump buttons that are overlaid, but at this point, you are controlling the visibility of buttons and direct screen control by code can be a simpler option.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...