5/18/2011

FANUC-Creating a Linked Object

CREATING A CIMPLICITY HMI LINKED OBJECT

Linked Objects save system designers valuable time by providing them with the ability to change a Library object and then let CIMPLICITY HMI finish the job of updating every object that is linked to the Library object in the entire project.

Common uses for Linked Objects include using a single source to create and edit a:

· Title bar that appears on several screens

· Footer that appears on several screens

· Common point value that appears on several screens.

Let’s get started!

You should already have the Demo Project up and running. If not, please go ahead and do that now.

Bring up the Workbench for the demo project. Remember? Use the Start menu, go to Programs, then CIMPLICITY, then HMI, then pick Demo Project.

From here, please launch CimEdit by double-clicking on the screens directory.

First, we’ll bring up the screen we created in the previous exercise. Go to the File menu, choose open, and select the screen titled “MYSCREEN.” We are going to add a new object from the Object Explorer to our screen. Click on the Panels subdirectory under CIMPLICITY Symbols.

Double-click on the following panel object and place in the lower left corner of the screen:

Now we will display the system date and time. Click on the text string icon on the toolbar.

Place the text string on top of the panel you just selected. The Object Properties box will automatically pop up. Under the Text tab, enter “Date and Time” in the string field. (The reason we give this a label is so that we know what it will display when we look at it in configuration mode. Otherwise, you will end up with multiple text strings on your screen that simply say “text” and you may forget what each one is supposed to do.)

In the Display Value area, select $PROJECT.DATETIME as the Expression by clicking on the right arrow and browsing the Cimpdemo points. You will notice that there are many system points (the $ symbol indicates “System”) that have to do with time. Hold your mouse cursor over each one to get a definition of the point value.

In the Display Format field, select Time (Absolute) to display the time and date. In the Time Format field, select MM/dd/yyyy HH:mm:ss.

Click OK to accept the new definitions.

Select both the panel and the text while holding down the SHIFT key and align the objects by clicking on the Align Centers and Align Middles icons in the toolbar.

Now, group the panel and text as one object by clicking on the “Group” icon in the toolbar.

Double-click on the object to bring up the Object Properties dialog box. We will name this text string and panel object. This is very important, because in order to create links, the master or source object must have a name. Click on the General tab. In the Object Name field enter Date & Time.

Save your changes and test out the screen. You should now see the system date and time within the panel object.

Now we will create a brand-new screen. This screen will be known as our “destination” screen for this lab.

Click on the “New Window” toolbar button to create a new screen.

Immediately save this screen. Call it LINK. Save it with the other screens in the cimpdemo/screens directory. (It is the default.)

Both the MYSCREEN and the LINK screens should now be open.

We will now make our system date and time text string and panel object the “source” object. What this means is that the system date and time text string and panel object will be the “master” object that we can copy to other screens. If we make a change to the master object, CIMPLCITY HMI makes the changes to the rest of the linked objects for us! No guessing games involved!

To do a linked Copy:

(Be sure both screens are up.)

1. Click once on the source object to select it. (In this case our source object is the system date and time text string and panel object on MYSCREEN.cim.)

2. Go to the Edit menu and click on Copy.

3. Go to the Edit menu on LINK.cim and click on Paste Special.

4. In the dialog box that pops up, select Paste Link and click on OK. A linked copy of the object should now be on the destination screen.

5. Position the object where you want it on the screen.

span style='mso-ignore:vglayout;;z-index:4;left:0px;margin-left:472px;margin-top:281px;width:104px; height:93px'矩形标注: Destinationspan style='mso-ignore:vglayout;;z-index:3;left:0px;margin-left:157px;margin-top:262px;width:74px; height:87px'矩形标注: Source
Object

Double-click on the copied object (the date and time text string and panel object on LINK.cim) to bring up the Object Properties dialog box. You will see a new tab called “Link Container.” Click on this new tab and you will see the location of the Master/Source object and the name of the object.

Also take notice that YOU DO NOT HAVE ACCESS TO THE GROUP PROPERTIES IN THE OBJECT!! This is because this object is a copy and LINKED to the Master or Source object.

Modifying Linked Objects

First, close LINK.cim.

Go to MYSCREEN.cim. Double-click on the Time & Date text string and panel object to bring up its Object Properties dialog box. Since this is a grouped object, find the Time & Date text string object under the Group tab. Double-click to bring up it’s Object Properties dialog box. Click on the Colors tab. In the fill section change the color to whatever color you want.

Click OK to exit out of both Object Properties dialog boxes. Save the changes to the screen.

Now, open LINK.cim. You should see the changes that you made on the Master object now appearing on the linked object on this screen.

Linked Objects save hours on screen design!

No comments: