How to animate my own elevator with BasicTe

How to animate my own elevator with BasicTe

Stefan13
Not applicable
42 Views
6 Replies
Message 1 of 7

How to animate my own elevator with BasicTe

Stefan13
Not applicable

[ FlexSim 24.2.0 ]

I have my own elevator and I want to use BasicTe c to make it work similar to an ASRS but it doesn't work, first I went into animation and created the components .1724744595099.png

then I created the kinematics for the movements here 1724744666831.png

and I tend to think that the problem is in the motion creation code, which looks like this 1724744784498.png

I would really appreciate it if you could help me to make it work, I'll leave the model attached for you to look over.Model_elevator.fsm

0 Likes
Accepted solutions (1)
43 Views
6 Replies
Replies (6)
Message 2 of 7

moehlmann_fe
Observer
Observer
Accepted solution

The nodes you are initializing the kinematics in do not exist. You can use "assert" to make that they do (they will get created if they don't).

treenode axaKin = axa.attrs.assert("kinematic");
treenode platanKin = platan.attrs.assert("kinematic");

In the On Draw you are going down one layer too far and refer to the "MySurrogate" object instead of "platan".

And the offset you are given in the On Begin Offset trigger is relative to the location of the BasicTE. The coordinates of the surrogates you read in the code are relative to their parent object. You need apply a further offset to them.

0 Likes
Message 3 of 7

Stefan13
Not applicable

I only managed that reference "the turntable is not ok, it's coming out of the elevator, how can I do that?1724755121922.png

and the box is not placed on the "platan"

0 Likes
Message 4 of 7

moehlmann_fe
Observer
Observer

Did you fix the On Draw trigger? It should only be a single "first" in line 7.

1724754689875.png

model-elevator_1.fsm

0 Likes
Message 5 of 7

Stefan13
Not applicable

Thank you very much, it works exactly as I want, it just doesn't put the box on the turntable, how can I do this?

0 Likes
Message 6 of 7

moehlmann_fe
Observer
Observer

You have two options.

1) Add an On Entry trigger and make place the item onto the "platan" object. But since the item is not a direct subnode of the BasicTE anymore it will not be counted as content and the TE's state will be "travel empty".

2) Do what the default ASRS does. In the On Draw trigger continually adjust the location of the item to stay in the center of the "platan" object.

if(current.subnodes.length > 0)
{     Object item = current.first;     item.setLocation(platan.getLocation(0.5, 0.5, 1).project(axa, current), Vec3(0.5, 0.5, 0)); }
0 Likes
Message 7 of 7

Stefan13
Not applicable

Thank you very much

0 Likes