question

MarcPost avatar image
0 Likes"
MarcPost asked tannerp commented

Run animation with PF only on process time

Hi all,

How could I run an animation for the operators (with PF) only during the processing time of the processor they are assigned to (Use operator for process marked in the 3D of the processor)?

example:

Run animation only on process time.fsm


Thanks!

Choose One
animationpf
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

·
tannerp avatar image
0 Likes"
tannerp answered tannerp commented

Hi @MarcPost,

The "UseTablet" animation is particularly long, coming in at around 30 seconds. I don't know of a way to stop an animation once its started, I can only interrupt the original animation with a new animation. This still doesn't quite do what you're getting at, so I've developed another solution. There may be other ways to achieve this, but I found this to work just fine. (As a side note, I tried using a Wait For Event activity that would wait for the processor to finish and then override, or "stop", the animation. It didn't work how I wanted it to.)

I added labels on the processors that represent the cycle time that the operators will use as the duration of the animation run. We can access those labels on operators. The operators are tied to processors through labels in the Process Flow (see "Assign Labels" activity). When an object arrives at a given processor, it triggers the operator assigned to that processor to travel and run the animation for the duration specified by the "ProcessTime" label on the processor.

The only thing I don't like is that it condenses the animation into the time by speeding up the animation, which makes it abnormally fast. If you could cut down the animation or use a different one that has a duration closer to your process times, it might look better.

Hopefully that all makes sense. I've attached the model. Let me know if you have questions.

run animation only on process time updated.fsm


· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

MarcPost avatar image MarcPost commented ·

Thank you very much @tanner.p, it's just what I was looking for!

Just one more thing, how can I update the new processor label for variable processing times?

I tried with an On Entry Trigger->Set Label: Object: Current; Label: "ProcessTime"; Value: ??

Thank you!

0 Likes 0 ·
tannerp avatar image tannerp MarcPost commented ·

@MarcPost,

The first thing is that you want the Processor to use its label for the process time, not the other way around. It's much harder to update the label according to the Process Time value than to update the Process Time value according to the label. Hopefully that makes sense. I've incorporated this idea in the updated model that I've attached. It looks like this.

To change a label on an object, you can do a variety of things. There are triggers in the 3D objects that can do this, or you could do it through an "Assign Labels" activity in Process Flow, or you can use custom script in a trigger or activity. The FlexScript you would use looks like this:

Model.find("MyProcessor").ProcessTime = 5; //This sets ProcessTime label to 5

Because it's an object, you can access its labels directly through dot syntax. Otherwise, you would have to reference it as an object.

In the attached model, I've opened a script window that you can use to practice this. Change the value for the process time in the code and it will change the value for all the processors in the group "Processors".

dynamic update processtime.fsm

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.