Drives are moving GameObjects that include sub components along a defined axis. Every moving component (besides freely moving MUs) needs to be controlled by a Drive. A Drive is not supplying any signal interfaces to PLC signals. For this a Drive Behavior needs to be added to the Gameobject that the Drive script is attached to.

The drive direction for linear axis is always defined based on the local coordinate system, that the drive is attached to.
On a rotational axis the rotation point of the axis is the center point of the local coordinate system and the rotation is around the defined axis.
A drive can also be connected to a Transport Surface. In this case only MUs on the Transport Surface are moved by the drive.

This picture is showing how two drives are connected to the Axis of the handling system in the Demo Model:

GantryY is moving all sub components including GantryZ. The GantryZ Drive is only moving the GantryZ in relation to the position which is given by GantryY.

The next picture shows how GantryY is defined. A Drive and a Drive Behavior script is attached to GantryY:

Drive handles in editor mode

Changing the directions with handles

Handles are only displayed if the Drive Gizmo is turned on

If you select a Drive in the Unity editor special handles are displayed additionally to the standard handles for geometrically moving the drive position. With these handles you can define visually the direction of the drive.

The current direction is shown in pink. You can click again on the currently selected direction to invert the positive direction of the drive. If you click on one of the other two gray directions the drive direction will be changed.

For rotational axis the direction is displayed like that:

The pink arrow shows the positive direction. For rotational axis you can change also invert the direction by clicking on the pink arrow or you can change it by licking on the gray arrows.

Alternatively you can change the drive directions with hotkeys. By pressing on SPACE you invert the direction of the currently selected Drive.
By pressing TAB you iterate through all 6 possible directions (3 linear and 3 rotational.

Drive limits

It is possible to define upper and lower limits for drives. These limits are only used when driving the drive with the JogForward and JogBackward bit. The limits are displayed in edit and simulation mode:

For linear axis the upper limit is shown with the arrow. The arrow begins exactly at the Upper Limit position. The lower Limit is shown with a box.
For rotational axis the limit is displayed by a trimmed circle. The drive is only able to rotate in the white area.

Drive handles in simulation mode

In simulation mode you can’t change the directions of the drives. With the handles you are able to start the drive in jog mode in each direction. If a drive limit is defined, the drive is stopping at it’s limit. Additionally the current position of the drive is displayed in mm. For rotational axis it is displayed in degrees.

Alternatively you can move the selected drive with Hotkeys.
Key 1 is moving the drive to the negative direction.
Key 3 is moving the drive to the positive direciton.

Drives and Unity Physics

Usually linear or rotational Drives are moved without using the Unity PhysX Rigid Bodies because this is more stable. In some circumstances it might be necessary to move the Physics Rigid-Body. This is for example the case if a platform with a part on it should turn rotational. For enabling this you must enable Move This Rigid Body on the Drive:

Public properties and methods

Please check the Game4Automation Class Reference for more information about the properties and methods of this component.

© 2019 in2Sight GmbH - All rights reserved. No part of this publication may be reproduced, distributed, or transmitted in any form or by any means, including printing, saving, photocopying, recording, or other electronic or mechanical methods, without the prior written permission of the publisher.