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 10-06-2009
Gavin Douglas Gavin Douglas is offline
Flexsim User
 
Join Date: Feb 2008
Posts: 65
Downloads: 1
Uploads: 0
Thanks: 27
Thanked 1 Time in 1 Post
Rep Power: 152
Gavin Douglas is on a distinguished road
Default

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
Attached Files
File Type: zip testmodel.zip (39.8 KB, 224 views)
__________________
"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  
Old 10-06-2009
Esther Bennett Esther Bennett is offline
Flexsim User
 
Join Date: Mar 2008
Posts: 115
Downloads: 27
Uploads: 0
Thanks: 103
Thanked 116 Times in 50 Posts
Rep Power: 271
Esther Bennett is a name known to allEsther Bennett is a name known to allEsther Bennett is a name known to allEsther Bennett is a name known to allEsther Bennett is a name known to allEsther Bennett is a name known to all
Default

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  
Old 10-06-2009
Gavin Douglas Gavin Douglas is offline
Flexsim User
 
Join Date: Feb 2008
Posts: 65
Downloads: 1
Uploads: 0
Thanks: 27
Thanked 1 Time in 1 Post
Rep Power: 152
Gavin Douglas is on a distinguished road
Default

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  
Old 10-06-2009
Brandon Peterson's Avatar
Brandon Peterson Brandon Peterson is offline
The Flexsim Consultant
 
Join Date: Jul 2007
Location: Salt Lake City, Utah
Posts: 382
Downloads: 29
Uploads: 6
Thanks: 192
Thanked 516 Times in 235 Posts
Rep Power: 490
Brandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant future
Default 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  
Old 10-07-2009
Gavin Douglas Gavin Douglas is offline
Flexsim User
 
Join Date: Feb 2008
Posts: 65
Downloads: 1
Uploads: 0
Thanks: 27
Thanked 1 Time in 1 Post
Rep Power: 152
Gavin Douglas is on a distinguished road
Default

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


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.