Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The following example displays a conveyor belt which that carries a box. The animation plays only when it is turned on by a button.

a) Create two tags: a digital tag for controlling the conveyor belt and an analog tag for controlling the box position. Name the tags “CONVEYOR” and “BOX”, respectively.

...

b)     Go  Go to [Edit] – [Insert Animation Bitmap] and select a conveyor belt object. Insert 2 of these objects into the graphic page.

...

c)     Configure  Configure the tags for both objects as shown below.

...

d)     During  During the animation, we want the conveyor belt to appear to rotate clockwise. For the chosen animation, this means we need to select the left-side object and press [Arrange] – [Filp(M)] – [Vertical], then select the right-side object and press [Arrange] – [Flip(M)] – [Horizontal]. Then, position the objects so that they appear to form a single conveyor belt as shown.

...

e)      Go  Go to [Draw] – [Rectangle] and insert a rectangle object in the graphic page. Place the object directly above the left conveyor object, as shown.

...

f)      Select the ‘H-Move’ function in the rectangle’s [Object Configuration] window. Enter the name ‘BOX’ in the tag field and assign the data range from 0 to 30.

...

g)     Set  Set the base position as ‘Left’ under the [Horizontal Move] tab. Set the distance to 380.

...

i) Go to [Draw] – [Switch/Lamp] and create a bit switch to control the ‘CONVEYOR’ tag. Configure the object as shown below.

...

j)     Launch  Launch the project in Xpanel or the simulator. When the switch is pressed, the conveyor belt and box will begin moving. The rectangle object moves from the left of the belt to the right side. When the ‘BOX’ tag value becomes greater than 30, the analog value will be reset to 0 and the box will move back to the left side.

...