Initiations & Terminations of Motions


Hi.
Could someone explain how to initiate a motion in a modell after some parameter has obtained a certain value? In the following example I have three bars that I would like to move in positive Z-direction. The small bar, 1, is supposed to move first. After the marker at the top of the small bar has moved some distance the motion of this bar should stop. Then the motions of the long bars, 2, should start. After moving some distance they should also stop.
I have managed to controll the motions with TIME-PARAMETER by using expression: `IF(TIME-2:0,0,200)` in Motion Properties. But insted of TIME I would like to use som Displacement Variable wich should be updated in real time and controll motions. Where and how can I define such variable? When I use expression `IF(DM(I,J)-Z, 0,0,v)`, I get error in the solver.
<?xml version="1.0" encoding="UTF-8"?>
Answers
-
Hi!
There are two topics to discuss with regards to this model:
The Syntax:
The IF statement should follow the following format: IF(EXPR1: EXPR2, EXPR3, EXPR4). Therefore, by updating the expression to IF(DM(I,J)-Z:0,0,v), the solver should no longer throw an error.
The Method:
I'm guessing that the motion of the second rod is to match the motion of the first after the initial displacement is reached. To achieve that, I would change the expression to be a STEP function instead, where the independent variable is the displacement of the first rod. Let's say a marker exists on the second rod named m_0, and let's assume the motion of the second rod should be after 100mm of vertical displacement has been reached. The motion expression could then be written as:
`(DZ({m_0.idstring},{Global_Frame.idstring},{Global_Frame.idstring})-100) * STEP(DZ({m_0.idstring},{Global_Frame.idstring},{Global_Frame.idstring}), 100, 0, 100.1, 1)`
This way, the motion of the first rod is passed into the second rod minus 100 mm, but also it is multiplied by 0 essentially until the 100 mm displacement is reached.
Hope this helps!
Adam Reid
0