# Move mechanisms

**URL:** <https://tech-community.robotics.abb.com/t/move-mechanisms/1686>\
**Category:** RobotStudio S4\
**Created:** [February 16, 2008, 12:32am UTC](https://tech-community.robotics.abb.com/t/move-mechanisms/1686 "2008-02-16T00:32:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![marcoafeliciano](https://avatars.discourse-cdn.com/v4/letter/m/a183cd/32.png) [@marcoafeliciano](https://tech-community.robotics.abb.com/u/marcoafeliciano)\
**Post date:** [February 16, 2008, 12:32am UTC](https://tech-community.robotics.abb.com/t/move-mechanisms/1686/1 "2008-02-16T00:32:22Z")

</div>

Hello.  
I am working in a project on robotstudio in which I have four mechanisms, two with 4 joints, and two with only one. I was already seeing the examples in the forum, but I don’t understand how works the timers in the VBA. If you can explain me, i’ll be happy. My problem is that I don’t know what’s the function of some things in the code.

I’ve this in my macro:

…

Set m2 = ActiveStation.Mechanisms.Item(“C\_b”)  
jointValues = m2.jointValues  
jointValues(0) = 3.14 'Rotational  
jointValues(1) = 0 'Prismatic  
jointValues(2) = 0.05 'Prismatic  
jointValues(3) = 0.05 'Prismatic  
m2.jointValues = jointValues  
ActiveStation.Refresh  
jointValues = m2.jointValues

Set m1 = ActiveStation.Mechanisms.Item(“P\_b”)  
jointValues = m1.jointValues  
jointValues(0) = 0  
m1.jointValues = jointValues  
ActiveStation.Refresh  
jointValues = m1.jointValues

…

My problem is that I have lots of movements whith every mechanism, but in Robot\_studio I only see the last… and don’t understand how to use yours exemples in my case…

Thank You
