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
|
|||
|
|||
Queue stacking
Hi,
Im having issues trying to stack items neatly in a queue (all on 1 level, long sides touching). Specifically: Using setrot in the onentry trigger doesn't seem to rotate the items (??), so i've just rotated the queue 90 degrees. This now creates the problem that the queue is using the longaxis of the box to get the spacing distance. This value also isn't showing up on the productspacing variable in the queue which i thought may be of some use. I could get around this problem by swapping my x and y dimensions in the original model, but this is part of a much greater project where i don't want to change arould all the other conveyor orientations. i would also like to understand what's going on. Any comments (or even referencing appropriate documentation) would be appreciated. Regards Paul Last edited by Paul Dowling; 11-27-2007 at 08:04 PM. |
#2
|
||||
|
||||
Paul,
I modified your model to show how to do stacking you want inside the queue. Basically, you do not use the default stacking strategy provided by the queue (Choose "Do Nothing" in the Item Placement). Instead, you write some code in the OnEntry and OnExit triger to explicitly set the pisitions and the rotations of the items inside the queue. Here is the code. OnEntry: Code:
... setrot(item,0,0,90); setloc(item,-ysize(item)*content(current),-xsize(item)/2,0); ... Code:
... // reset the item positions in the queue when the first item leaves the queue int numItems=content(current); for(int i=2;i<=numItems;i++){ setloc(rank(current,i),-ysize(item)*(i-1),-xsize(item)/2,0); } ... Please let me know if this solves your problem.
__________________
Best, Alan |
#3
|
|||
|
|||
Thanks Alan, thats exactly what i'm after. Wasn't having much success with setrot earlier for some reason.
So presumeably onexit triggers before an item has left the current object (hence only moving content(current)-1 items in the queue)... Cheers Paul Last edited by Paul Dowling; 11-28-2007 at 12:21 AM. |