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
.
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.
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.
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.