question

Ricardo P2 avatar image
0 Likes"
Ricardo P2 asked Isaac Litster edited

Change the item type and colour of a packed flowitem

Hi, I'm packing a pallet with a flow item in a combiner which then passes on to a processor. I was this processor to set the colour and item type of the flow item dependent on the item count at the processor (processors should turn the flow item red with type 1 when item count is 0-19 and set the flow item blue with type 2 when item count is 20-39). At the end of every 40 flow items item count should go down to zero and start again.

combinerrackflowitempack
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

·
tannerp avatar image
0 Likes"
tannerp answered Isaac Litster edited

There are many ways to accomplish this. In my example model, I used two different ways.

The first (top) uses an arrival schedule which sends 20 items at a time of each type. The processor then looks to see which Type the item is and sets the color accordingly. In this approach, the item's Type is determined before it arrives at the Processor.

The second (bottom) uses custom code in the Processor, including a label, that will determine what Type and color to set the item to. This method all happens at the Processor, meaning the Processor will determine the item's Type.

There are other variations of this. Let us know if you'd like more details. Thanks!

Sample: change-item-type-and-colour.fsm


· 3
5 |100000

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

Ricardo P2 avatar image Ricardo P2 commented ·

Hi! Thanks you for your reply, however I wasn't exactly looking for that. I have attached another model, which better explains what I need.

As seen in the bottom model it is the pallet, not the object that changed colour. What I'd like is for the object to change type and colour instead of the pallet while keeping the pallet below the item ( I have managed to do what i'm saying by reversing the ports in the combiner but it no longer makes sense). Hope this explains it better! Looking forwards for your answerchange-item-type-in-pallet.fsm

0 Likes 0 ·
tannerp avatar image tannerp Ricardo P2 commented ·

You can assign the item on the pallet to a new Object in your code through subnodes. Then, the item on the pallet will receive the item Type and color assignment. Please review the code in Processor2.

Model: change-item-color-on-pallet.fsm

0 Likes 0 ·
Isaac Litster avatar image Isaac Litster tannerp commented ·

Hi @Ricardo P2

Does Tanner's reply answer your question? If so, please click the Accept button below the answer. Let us know if you need any more help.

Thank you!

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.