Table of Contents

BoolToSignedDirection

This simulation component converts a boolean input for positive direction and a boolean input for negative direction into a single signed direction of type Integer.

BoolToSignedDirection

When to use

Use this simulation component if you have components which have a continuous signed direction as an input.

For example, if you want to control a pneumatic cylinder with help of a PLC, as seen in the image below, the two cylinder signals of the PLCConnector simulation component are connected to the BoolToSignedDirection simulation component.

BoolToSignedDirection as Cylinder control

How to use

Add this simulation component from the simulation component library. Connect the output of a signal which represents a boolean value for positive direction to the corresponding input and do the same for the signal which represents a negative direction. Connect the SignedDirection output to the simulation component which needs a continuous signed direction as an input.

Parameters

Inputs

PositiveDirection

An input indicating that the signed direction output should be 1.

NegativeDirection

An input indicating that the signed direction output should be -1.

Outputs

SignedDirection

An output which is 1 if PositiveDirection & !NegativeDirection or -1 if !PositiveDirection & NegativeDirection and 0 otherwise.

Example

In this example, a pneumatic cylinder is controlled by a PLC as described and shown in the picture above.

BoolToSignedDirection Example Properties

If the WorkingPosition output is set to True and the BasePosition output is set to False, the BoolToSignedDirection simulation component generates 1 as a continuous positive output signal. Then the KinematicTranslationMover simulation component moves the cylinder by the input Speed to the defined upper limit.

BoolToSignedDirection moves Workpiece with Cylinder

Further Information

For more details visit the Video Guides section, where you can find a video guide demonstrating this topic under Pivoting cylinder.