ATTENTION

This FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices.


flexsim.com

Go Back   FlexSim Community Forum > FlexSim Software > Q&A
Downloads

Q&A Using Flexsim and building models

  #1  
Old 06-22-2010
Flavio Brito Flavio Brito is offline
FlexSim Distributor
 
Join Date: Jan 2010
Posts: 42
Downloads: 109
Uploads: 0
Thanks: 47
Thanked 8 Times in 7 Posts
Rep Power: 132
Flavio Brito is on a distinguished road
Default Looking for directory

Hi,

The problem is following: I created an animation in a escavator with Animation Creator of FlexSim 5, but in simulation, I would like to put item inside of shovel, but I haven't found and I don't know how write the directory of shovel positions in tree, to put this on triggers to set the item position during the process.

Attached is clearly.

Thanks,
Attached Files
File Type: zip Kinematics.zip (1.86 MB, 190 views)
The Following User Says Thank You to Flavio Brito For This Useful Post:
Tom David (06-24-2010)
  #2  
Old 06-22-2010
Anthony Johnson's Avatar
Anthony Johnson Anthony Johnson is offline
Manager of Product Development
 
Join Date: Jul 2007
Posts: 440
Downloads: 86
Uploads: 4
Thanks: 171
Thanked 899 Times in 288 Posts
Rep Power: 735
Anthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond repute
Default

So there are several ways to do this. You can use vectorproject() I believe, but in my opinion the easiest way is to get Flexsim to draw the item as if it were located inside the shovel, even though the actual location of the item is inside the excavator. If Flexsim draws the item as if it's inside the shovel, then the positioning of the item is trivial; you just position it to the center of the shovel. To do this:
  1. In the excavator's General Properties tab, uncheck the "Show Contents" box. This will hide the excavator's main content (or, the item whose position is relative to the excavator's main position)
  2. Open a tree view, and navigate to the shovel. This is at Excavadeira2>visual/drawsurrogate/Escavadeira/Body/Army1/Army2/Shovel.
  3. Add an attribute named drawsurrogate to that shovel object's attribute tree, and give it text data with the text: ../../../../../../../..
    The many ../'s are a tree path from the shovel's drawsurrogate attribute back up to the main excavator. This essentially tells Flexsim to draw the content of the excavator (so any items inside the excavator) as if they were inside the shovel itself.
  4. In the OnUpdateOffset (or you can just do it once in the OnLoad), set the item's position as if it were inside the shovel, i.e. to the center of the shovel.

I've attached the model, but not all the media, so you'll need to extract the model into the same directory where your original model is.
Attached Files
File Type: zip Kinematics test Anthony.zip (50.3 KB, 174 views)
The Following 2 Users Say Thank You to Anthony Johnson For This Useful Post:
Phil BoBo (06-23-2010)
  #3  
Old 06-23-2010
LINWEIXU
Guest
 
Posts: n/a
Downloads:
Uploads:
Default

I have a question, if the object uses Animation Creator, how to calculate the transport time, accord to the TaskExecuter Tab Page speed 、acc 、dec.I change these parameter,but the Transport time do not change. i think the transport time is useful for Animation Creator.
  #4  
Old 06-24-2010
Anthony Johnson's Avatar
Anthony Johnson Anthony Johnson is offline
Manager of Product Development
 
Join Date: Jul 2007
Posts: 440
Downloads: 86
Uploads: 4
Thanks: 171
Thanked 899 Times in 288 Posts
Rep Power: 735
Anthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond repute
Default

You can vary the duration/speed of an animation as part of the startanimation() command. There are two parameters you can use for this, speedtype and speedvalue. speedtype can be either SPEED_TYPE_DEFAULT, SPEED_TYPE_DURATION, or SPEED_TYPE_MULTIPLIER. For SPEED_TYPE_DURATION, speedvalue will be interpreted as the total time duration that you want the animation to take. For SPEED_TYPE_MULTIPLIER, speedvalue is a speed multiplier, so a speedvalue of 2 would make the animation go twice as fast as normal. So for transport time, you'd basically start the animation, calculating the transport time yourself and passing that into the startanimation() command.
The Following 4 Users Say Thank You to Anthony Johnson For This Useful Post:
Tom David (06-24-2010)


Thread Thread Starter Forum Replies Last Post
Can I compile a DLL with having DLLMain in a separate directory Steven Hamoen Q&A 1 12-04-2009 05:22 AM


All times are GMT -6.
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.