Multi-State Picture/Shape
Technical Note 5108
Applicable Model(s)
HMI5000 Series
cMT Series
Title
Multi-State Picture/Shape
Date
01/04/2023
Rev
02
P/N
0907-5108
Summary
In order to use different colors or backgrounds for a multi-state object with more than 2 states, a custom picture or shape must be created. This document shows how to create these pictures and shapes in the EasyBuilder Pro libraries.
Scenario
There is a need to create a word lamp with 10 states, but the objects in EBPro generally only have 2 states. In order to use an object with more than 2 states, a picture or shape must be created in the libraries that can be assigned to the word lamp.
To Add and Use a Shape from the Shape Library
1.
In EBPro go to the Object tab > Shape > Shape Library… to open the Shape manager window.
2.
Create a new library by clicking this icon:
3.
Give the new library file (.plb) a name.
4.
Click open, and you will be asked if you want to create the file, click Yes.
5.
Navigate to one of the non-System shape libraries in Shape manager, in this case, button2.
NOTE: You cannot copy the states of shapes in the “System” shape libraries, for which you can customize the color and pattern. If you want to use shapes, then you will need to copy existing non-System shape states into your custom library. If you want to import your own images, skip to the Picture Library section of this document.
6.
In the library, select one of the shapes, then select the state for that shape that you want to copy. Click the “copy” icon to copy that state.
7.
Navigate back to the custom shape library that you made, click the “paste” icon to paste the shape state that you copied into the library.
8.
Repeat the process until the shape has the desired number of states, click OK.
9.
Go to the Object tab and create a Word Lamp object. On the General tab under “Attributes” enter the number of states that you need.
10.
Go to the Shape tab, deselect the “Use picture” box and select the “Use shape” box.
11.
Click on the “Shape Library…” button, navigate to your custom library, and click OK.
NOTE: The Shape tab will only show up to 6 states (0-5).
12.
Click OK and place the Word Lamp on the development screen. During runtime, the value in the read address of the word lamp will dictate which shape state is displayed (value 0 will display state 0; value 1 will display state 1, etc.).
To Add and Use a Picture from the Picture Library
NOTE: If you want to import an image to the picture library, move to step 2.
1.
To modify a picture in the library, select the export button from the picture manager, save the picture to a known folder on the PC and edit the file with an external image editor like Microsoft Paint.
NOTE: This cannot be done for “System” pictures.
2.
Go to the Object tab > Picture > Picture Library… to open the Picture manager window.
3.
It is recommended to create a new library for custom pictures. Click the New Library button.
4.
Enter a file name for your new library then click open. In this example, a library named custom is created.
5.
If the library does not exist, select Yes to create the library.
6.
Choose the library to save the picture.
7.
Click the location in which the new Picture is to reside. Location 0 is selected above. Select the New button. The Open dialog appears.
NOTE: At least one Picture Library must be attached to the project, or the Import Picture button will be disabled.
8.
Browse to the desired image.
9.
Click Open. The picture will be loaded into the state below the selected state. Use the Up and Down arrows to move the image to the desired state.
10.
Repeat the steps above until all desired pictures have been added.
11.
Create a Word Lamp Object with multiple states.
12.
Go to the Shape tab and tick the Use Picture checkbox then click the Picture Library… button.
13.
Select the new picture in the Custom library and click OK
14.
Click OK and place the Word Lamp on the development screen. During runtime, the value in the read address of the word lamp will dictate which shape state is displayed (value 0 will display state 0; value 1 will display state 1, etc.).