Ana səhifə

Leopard II manual Table of Contents


Yüklə 3.21 Mb.
səhifə11/16
tarix24.06.2016
ölçüsü3.21 Mb.
1   ...   8   9   10   11   12   13   14   15   16

4.4Saving/Loading/Printing Programs

Under the File pull down menu of the program editor, you will find the following selections:


New Program – This will completely erase all program lines currently in the editor.
Open Program – This selection will open a file-browsing menu allowing you to load an existing program file saved on disk. This can be useful to create new projects from existing programs that were created with a previous version of C-Max, or that was created for another project. This will only load a program code file (.pgm) and will not affect other items like the System Map or the touch screen file.
Save Program As – Saves the current program code in the editor to a file of your choice, using a file browser to allow you to choose the location and name of the program file. A warning window will appear if you are about to overwrite an existing program file. Like the Open Program command above, Saving a program file this way keeps it independent from any project you might have opened at this time; only the .pgm component file will be saved and with the specified name.
Print – Prints a listing of your program code. A printer control window will be displayed, allowing you to specify the printer and printing options as offered by your printer’s Windows driver.
Print to File – This option allows you to produce a program listing that will be saved in a text file. A file browsing window allows you to choose the location and name of the .txt file that will be produced. The listing will be an ordinary ASCII text file that can be opened with utilities like Notepad or any word processing program. All the program examples shown in this manual were created using this utility.


4.5The Touch Screen Editor

The touch screen editor is used to define the controls, text, and general appearance of what you will see on the screen of your Leopard II. A bit of extra time spent in optimizing the “look” of your screens will certainly pay off in general user satisfaction, but remember that you can always go back to your project and optimize it later if you wish; and a certain amount of trial and error is often inevitable in getting the appearance you really want. The touch screen editor is accessed from the main C-Max screen by clicking on Project -> Touch Screen Setup. If you get an error message saying that your controller type must be defined as a Leopard, go to the System Map and make sure you define it as “Leopard” there first.




Once in the touch screen editor, you will see an editing screen like the one shown in fig 30:

Fig. 30


Looking at the editor layout, we see:
On the left hand side, the screen image that corresponds to your Leopard II screen. It is divided up into individual “touch squares” (which are not truly “square”…). There are 10 squares horizontally and 6 vertically, for a total of 60 squares. Each touch square represents the smallest touch area that the screen controller can distinguish.
Along the top, 24 tabs representing the 24 individual screens that you can define. In the controller, switching screens is done under program control by setting variable #63 to the screen number that you want. Click on the tabs to edit the screen of your choice.
On the right hand side, you have the three different types of objects that you can define on the screen. These are:
1- Status lights. A status light object indicates the On/Off status of an associated device; either an X10 address or an I/O point.
2- Screen Text. The screen text object can be used to display simple text headings and labels, or to display text along with an embedded variable. This is handy for displaying variable analog information like temperatures, times, levels, etc. The variable can be formatted to display in a variety of formats using a formatting string. See the variable formatting application note in section 5 of this manual for instructions on doing this.


  1. Touch Buttons. The “jigsaw puzzle” of rectangles in the lower right of the screen is a selection of the various button sizes and shapes that you can use on a Leopard screen.

Finally, under the screen layout area, there are three programmable options:
1- Beep on Touch. Setting this option to ON will cause the Leopard II to emit a short, low volume beep every time the screen is touched. This can be useful to obtain “tactile feedback” when touching an otherwise rigid screen surface.
2- Show Date and Time. Selecting this option displays the date and time in the upper right hand corner of the screen, regardless of the screen being displayed. If you use this, make sure you leave room for it in your screen layouts.
3- Backlight OFF Delay Seconds. Allows you to set the number of seconds after last touching the screen before the backlighting is turned off. You will usually want to set this to a value long enough to avoid having the backlight turn off while you’re busy pressing buttons or observing displayed information, but short enough to avoid having it stay lighted needlessly, which could cause the CCF tube to age prematurely. Commonly used settings range from 10 to 30 seconds. You can select the value either by using the slider or by manually entering the value in the edit box. Setting this value to 0 will cause the backlight to stay on indefinitely.
With the editor screen now explained, let’s see how it is used. You can see a sample of a screen editing session in the Writing your first program tutorial at the end of Section 1.

4.5.1Adding and Editing Buttons.

To add a button to a screen, first make sure the tab at the top is displaying the right screen number. Click once on the desired button size in the right hand part of the editor screen. A new instance of that button size will be created in the screen layout area, as shown in figure 31:




Fig. 31


Next, click on the new button and drag it to the location where you want it, being careful to align it perfectly with the touch square grid lines. Note that when you add a new button as shown in fig 31, it is purposely not aligned with the grid lines. This is to help you avoid confusing the new button with an existing button at or near the upper left corner, since you would not normally place a button this way. With the button dragged to its desired location, position the mouse cursor over it and then right click to reveal a small two-choice menu. You can either choose Delete Button to erase the button, or Enter Caption to edit the button’s caption and other properties. Selecting Enter Caption will display the following window (fig 32):


Fig. 32
You can now enter the caption you want on the button in the text box and select one of two available font sizes. The Icon# list box allows you to select an icon (as defined and named in the System Map) to be displayed on the button. Displaying an icon will overwrite any text caption. The Draw with Hidden Border check box, when checked, will cause the button’s image (outline) to be invisible, allowing the icon itself to be the button’s image. If you check the Draw with Hidden Border box and do not assign an icon to a button, you will have an invisible but fully functional button. Creating and using icons is covered in the icons application note, in section 5 of this manual.


Once your button properties have been entered, click on OK to close the window and see the new caption displayed in the screen layout area (fig. 33) Note: icon images are not displayed in the editor.

Fig. 33
In order to code instructions for that button in your C-Max program, you need to know its object number. You can see this number by moving your mouse cursor over the button (do not click any mouse buttons). A small point-help window will reveal the object#, the “hidden border” setting (1 = checked, 0 = unchecked) and the icon# associated with this button. Make a note of the button’s object number for coding your C-Max program.




4.5.2Adding and Editing Status Lights.

To add a status light to a screen, first make sure the tab at the top is displaying the right screen number. Click once on the status light in the right hand part of the editor screen. A new instance of a status light will be created in the screen layout area, as shown in figure 34:




Fig. 34
Next, click on the new status light and drag it to the location where you want it. Contrary to touch buttons, status lights do not need to be aligned with the touch square grid lines. Note that when you add a new status light as shown in fig 34, it is purposely not aligned with the grid lines. This is to help you avoid confusing the new status light with an existing one at or near the upper left corner, since you would not usually place a status light this way. With the status light dragged to its desired location, position the mouse cursor over it and then right click to reveal a small three-choice menu. You can either choose Delete Light to erase the status light, or one of Attach X-10 or Attach I/O. to associate the light with either an X10 address or an I/O module point.

If you select Attach X-10, you will see a small window (fig. 35) giving you access to the System Map names of all X10 devices.


Fig. 35


Simply choose the desired X10 device and click on “OK”. Now, when that X10 device is ON (according to the controller’s internal status table) the light will also show “ON”, and show “OFF” when it’s OFF.

If you select Attach I/O, you will see a small window (fig. 36) giving you access to the System Map names of all I/O module devices.




Fig. 36
Start by selecting the desired module (these have to be defined in the System Map first, see Projects), then the I/O point, and click on OK. Note that both input and output I/O points can be selected. Like for the X10 devices, the light will display “ON” or “OFF” according to that I/O point’s status in the controller’s internal status table.


4.5.3Adding and Editing Screen Text

To add a screen text object to a screen, first make sure the tab at the top is displaying the right screen number. Click once on the “Screen Text” phrase in the right hand part of the editor screen. A new instance of a text object will be created in the screen layout area, as shown in figure 37




Fig. 37

Click on the new text object and drag it to the location where you want it. Contrary to touch buttons, text objects do not need to be aligned with the touch square grid lines. With the text object dragged to its desired location, position the mouse cursor over it and then right click to reveal a small two-choice menu. You can either choose Delete Text to erase the text object, or Enter Text to enter/edit the text and optional variable formatting string.

If you select Enter Text, you will see an editing window (fig. 38):




Fig. 38
Enter the text that you want to display in the edit box. You can also enter a variable formatting string to embedded a variable (selected with the list box underneath the text box). For example, you could enter the text as “Outside Temp: %3d F.” and select Variable #3. If your controller program captures the outside temperature in variable #3 and the temperature is 75 degrees, your screen will display “Outside Temp: 75 F.”. There are several formatting options available for displaying variables. You can learn how to use these various options by reading the variable formatting application note in section 5 of this manual.


The right hand side shows that you can display text in two font sizes, small and large. There is also a very large “Numbers Only” font that can only be used to display numbers or formatted variables. This font simulates the 7 segment “LED readout” style often seen on digital clocks and appliances. You can see examples of this type of display in the application notes.
Once you have finished entering your text, click on “OK” and the screen layout window will show the updated text object, resizing it as necessary. You may want to reposition it once the text has been entered.

4.5.4Managing Touch Screen Files:

When you have finished creating your screen layout, you can save your work and/or download it into the controller. You have two approaches you can use: saving and downloading the screen file by itself, or doing these operations as part of a project.



4.5.4.1Individual Screen Saving, Loading;

If you click on the File pull down menu at the top left of the touch screen editor, you will see three menu choices:



4.5.4.2New Touch Screen File

Erases all objects on all screens in the touch screen editor. Used to start a new layout.


4.5.4.3Open Touch Screen File

Used to load an existing touch screen file that can come from another project or a version of C-Max prior to version 2.00 (when projects did not exist). Selecting this will open a file browsing menu and will display all files in the current directory that have the .tch file extension.



4.5.4.4Save Touch Screen Files As

Saves the touch screen file currently in the editor. Selecting this will open a file browsing menu and will display all files in the current directory that have the .tch file extension. You can either select an existing disk file to overwrite or give your file a new name. Saving a touch screen file this way keeps it independent from any project you might have opened at this time; only the .tch component file will be saved and with the specified name.


Clicking on will immediately open the controller access window and download the screen file to the Leopard II. This can be used as a quick shortcut to downloading the screen file when all you really did was modify the screen layout on an otherwise running controller. The other way to download the screen file is by downloading the project, as described in the Projects chapter.

4.5.4.5Project Screen Saving, Loading

The other way to save and download your screen file is by doing it as part of your project management. To use this method, simply close the touch screen editor when you are finished editing your screen file (you will get a warning that your screen file has not been saved, but that’s ok). Then Use the Project pull down menu from the main screen to do Save Project to save your touch screen file along with the other project files, and Download Project to download the desired components of your project to the Leopard II.



1   ...   8   9   10   11   12   13   14   15   16


Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©atelim.com 2016
rəhbərliyinə müraciət