ATTENTIONThis 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 |
#1
|
|||
|
|||
I want to stack a pallet on top of a pallet. The first pallet is just a container for the second pallet. The second pallet is a container for some flow items that I want to leave alone. I'm doing something like this to align the two pallets:
ONENTRY if (port==1) setloc(item,.5,-.50,-.20);//Pallet if (port==2) setloc(rank(item,1),.44,-1.06,2.50);//Pallet II with 3 flow items "Packed" The second pallet doesn't align. Without messing w/ the shape factors can I do this. Attached is a simple model. The pallet is not in the center of the second pallet (cart). I guess changing the shape factors on the cart would do it, but messing with the shape factors always screws me up and I want to do it w/code. Thanks
__________________
"A bird is an instrument working according to mathematical law, which is within the capacity of man to reproduce." -Leonardo da Vinci, 1502 Last edited by Brandon Peterson; 10-06-2009 at 01:05 PM. |
#2
|
|||
|
|||
Hello Gavin,
I took a quick look at your model and you seem to relocate the Cart in the OnEntry trigger of CombinerB. The combiner will move a pallet into the Cart when combining with a default location of 0,0,SZ_Cart for the pallet. So moving the Cart won't make any difference to the location of the pallet in the cart. I think your idea will work, but to be sure that the pallet is already moved into the cart, I would put the code on the OnSetupFinish trigger in stead of the OnEntry. Then you don't have to specify the port as well, because the Cart will be the item and the Pallet will be the first( item ) and you can use only your second (greened out) rule from your OnEntry trigger Esther |
The Following User Says Thank You to Esther Bennett For This Useful Post: | ||
Brandon Peterson (10-06-2009) |
#3
|
|||
|
|||
Yes, putting on the other trigger (OnSetUpFinish) did the trick. Seems like other people would have this problem...must be other ways around it.
THANKS!!
__________________
"A bird is an instrument working according to mathematical law, which is within the capacity of man to reproduce." -Leonardo da Vinci, 1502 |
#4
|
||||
|
||||
Alternative method for changing combined flowitem placement
Gavin,
Another way you could have done it was to change the way the cart places an object within itself. In your model you can do this by editing the OnRecieve eventfunction of the Cart flowitem. Here are the steps you will need to follow to do that: 1. Open up a tree view. 2. Click on the plus sign for the Tools folder. 3. Click on the plus sign for the FlowItemBin object. 4. Click on the plus sign for the Cart folder. 5. Click on the ">" sign for the Cart object 6. Click on the plus sign for the behaviour node. 7. Put the following code in the OnReceive Node: setloc(i, xsize(c) / 2 - xsize(i) / 2, -ysize(c) / 2 + ysize(i) / 2, zsize(c) * .748); 8. Rebuild all Flexscript: Click Build -> Build Flexscript Now the cart flowitems will automatically place objects that are combined inside of them in the center of the cart and at the correct height. The code in the OnReceive of the flowitem takes the variable c to mean the flowitem the code is on and i to mean the flowitem it is receiving. I hope that this helps, it is at least an alternative method to having to change a bunch of triggers. Good Luck, Brandon
__________________
thats not normal. |
The Following 5 Users Say Thank You to Brandon Peterson For This Useful Post: | ||
Tom David (10-06-2009) |
#5
|
|||
|
|||
That rocks Brandon...thanks for that nugget!
__________________
"A bird is an instrument working according to mathematical law, which is within the capacity of man to reproduce." -Leonardo da Vinci, 1502 |
Thread | Thread Starter | Forum | Replies | Last Post |
how to make the forklift grab a pallet from the upper levels of the rack and place it in the first or second l | LINWEIXU | Q&A | 5 | 09-04-2009 01:25 AM |
Unpack an pallet | Michael Hartlieb | Q&A | 3 | 07-20-2009 09:04 AM |
simple pallet question (i think) | bsantens | Q&A | 2 | 03-23-2009 11:39 AM |
Shape of an "operator with a Manuel-Pallet-Truck" | Simon Farsah | Q&A | 1 | 02-28-2009 02:05 PM |
Box Picking from a pallet in a rack | Michael Hartlieb | Q&A | 9 | 12-11-2008 10:12 AM |