question

Mike Mayer avatar image
0 Likes"
Mike Mayer asked Mike Mayer commented

Change processor flowitem entry point

A processor accepts flowitems from the left (or, at the top in the attached screenshot).

As flowitems arrive, their front (leading) edges hang off the far left edge of the processor as the flowitem begins traversing across the processor during the cycle. The flowitems go to the next object as soon as their leading edges touch the right edge of the processor.

If I have a conveyor connected directly to the left (input) edge of the processor, and items are stacking-up on the conveyor (normal), the flowitems clash together as the flowitem entering the processor (from the conveyor) is intersected by the next item on the conveyor moving towards the end of that conveyor.

We see this in the attached image where we are making "froot loops". At the entrance to the processor (at top) we see a bright green and blue froot loop mashed together. The bright green one is moving to the end of the conveyor to fill the space just vacated by the blue one, which is now starting to enter the processor (and still hanging off the left or top edge of the processor). The dark green one is on the other side and is departing the processor, no problem there.

If I could change the linear "start" landing point for the flowitem, such that the flowitem starts fully on the surface of the processor and not hanging off the edge thus intersecting with the last froot loop on the conveyor, then I think I'd be OK since they would never coincide (they'd be kept apart).

I tried playing with the small blue cube and point locations "Select the point on the object where the location will be measured" but it did not seem to change the landing (entry) point for flowitems as they move off the conveyor and onto the processor.

Thanks for any ideas.

2020-02-25-14-24-19.png

FlexSim 20.0.2
processor entry point
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

·
Matthew Gillespie avatar image
1 Like"
Matthew Gillespie answered Mike Mayer commented

The item's location is updated by the processor's OnPreDraw. So we can uncheck the Convey Items Across Processor Length checkbox and then write our own pre draw code using the processor's OnPreDraw trigger. I used this code:

for (int i = 1; i <= current.subnodes.length; i++) {
	Object item = current.subnodes[i];
	if (getitemstate(item) == FRSTATE_INQUEUE && getitemvar(item, 2) != 0) {
		double percentAlong = (Model.time - getitemvar(item, 1)) / max(.001, getitemvar(item, 2));
		double xLoc = percentAlong * (current.size.x - item.size.x);
		item.location.x = xLoc;
	}
}

Here's an example model:

conveyinbounds.fsm

The blue cube and point locations are something completely different. You can read about what that does here.


conveyinbounds.fsm (196.2 KiB)
· 1
5 |100000

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

Mike Mayer avatar image Mike Mayer commented ·

Matthew, sorry for the late reply. Thanks for that clever bit of OnPreDraw code to do custom movement. I'm going to give that a try.

I also have a suggestion box item, which I'll submit as an Idea.

Mike

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.