Ana səhifə

Leopard II manual Table of Contents


Yüklə 3.21 Mb.
səhifə9/16
tarix24.06.2016
ölçüsü3.21 Mb.
1   ...   5   6   7   8   9   10   11   12   ...   16

4C-Max User’s Guide

This section of the manual describes the various utilities available in C-Max for programming and using your Leopard II. C-Max is a combination of program and screen editor, program and data loader, debugging tool, testing utility, etc. Each one of these functions will be described in detail. Although the program editor is the main screen and the first thing that you see when first start C-Max, we will begin with the Project sub menu since this is where you would start the creation of a new project and application program.



4.1Projects

C-Max 2.0 introduces the concept of "projects" which aims to make file management easier by keeping the files (the "pgm", "tch", and any "bmp" files for icons) for a given controller together in a directory. This allows a user to load and save all these related files together in one operation, saving time and avoiding frustration in having to locate separate files.




4.1.1Creating a Project

From the main screen,(fig. 25), create a project by clicking on ProjectNew Project.




Fig. 25
You will see a file browsing window (fig 26).





Fig. 26


Browse to a directory, or create a new one (recommended) where you want to keep the files associated with this project. It is best that you create a seperate directory for each project, using the “new directory” control in the file browser (the small file folder with a sparkle). Once you have browsed to the desired directory, enter a name for your new project and click on "Open" to first save your project).


4.2The System Map

The first thing you should do when you begin a new project is to create the System Map. The System Map allows you to identify any expansion modules or slave controllers that you may have, as well as permitting you to give your own names to most of the data items (variables, timers, X10 devices, etc). A bit of time invested in creating and maintaining it will make programming much easier, and your programs will be almost self-documenting. Start by creating a new Project as explained previously and then create/edit your System Map as follows:


Click on ProjectSystem Map. You will see a new window with an expandable list starting with “Ocelot” at the top. (fig 27).



Fig. 27


If your controller is a Leopard II (or the original Leopard), right click on the word “Ocelot” and choose the “Leopard” controller type (once you have chosen Leopard, you cannot set it back to Ocelot). Then click on each module address that you have in your system and once again, right click to choose the type of module at that address. Note the Bobcat types: Bobcat-T = temperature, Bobcat-H = humidity, Bobcat-A = ASCII (serial), etc.
Now, you will notice that to the left of each module that you add (and also under the master controller on the line labeled “Local”) there is a small box with a “+” sign. Clicking on a “+” will expand that module’s list of resources, like I/O ports, variables, timers, touch buttons, etc. You can now edit each of those resource’s labels and give them meaningful names. If X-10 address B/9 is the hall light, then you can enter “Hall Light”. The process of editing resource names is similar to editing file names in Windows; click once to select the item, a second time to highlight the whole name, and optionally a third time to position the cursor within the existing name.

When you edit an item under icons you not only name the icon but also actually define it there. By right-clicking on a name, you will see a file browsing window allowing you to locate the bitmap file that you want to use for this icon. Once the correct file has been located, clicking on “Open” will make a copy of the icon file to the project directory. Keep this in mind if you want to edit the icon image later. Complete instructions on creating and using icons are given in the icons application note in section V of this manual.


Once you are done, choose ProjectSave Project and this will save your newly created System Map in the project file. If you now start to create a program or edit an already loaded one, you will see the assigned names right in the program text. If you already had a program loaded in the editor, you can immediately update the program listing with the new names by clicking on the Update button in the lower left-hand corner of the program editor screen. You will also see the assigned names in the appropriate list boxes when adding/editing lines. Save Project As allows you to save an existing project under a new name and/or directory. Open Project is used to load an existing project into C-Max for editing.
Saving your project always saves all the related files for that project (the program file, touch screen file, and system map. Each of these component files will be given the same name (but with the corresponding .pgm, .tch, .prj file extensions). It is a good idea to regularly use Save Project as you are working on the various tasks in creating your application, such as editing the program code or creating the touch screen layout.
The Download Project menu selection will show a pop-up window (fig. 28). This provides a handy single-operation way to download the various project components (icons, program, touch screen definition) to the controller. Simply select the item(s) you want to download by checking the appropriate boxes and start the download by clicking on Begin Download.


Fig. 28


1   ...   5   6   7   8   9   10   11   12   ...   16


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