question

Ouliwen134 avatar image
0 Likes"
Ouliwen134 asked Ouliwen134 commented

how to create a flowitem OnEntering event?

Hello for some reason i want to create a flowitem OnEntering event, and then i can get this event to fire the "Wait for Event" activeity in pf moduel. which listen to the flowitem OnEntering event, and in the cppfunction in the library i found the standard create event function like FIRE_SDT_EVENT(onEntryTrigger, item, port, v_nroftransportsin, v_nroftransportsout); but i found it works well only for the fixresource object event, I could't find a sample about how to create a flowitem event like OnEntering. Any advices are appreciated!

FlexSim 18.2.3
flowitem eventonentering
5 |100000

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

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Ouliwen134 commented

You just need a pointer to the item and then wait for the OnEntering event:

1648570728778.png


Example attached :

itemOnEnteringExample.fsm


· 5
5 |100000

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

Ouliwen134 avatar image Ouliwen134 commented ·

hi jason i want to know how to create a OnEntering event, not how to listen to a OnEntering event. I have tried to use FIRE_SDT_EVENT to create OnEntering event and the Wait for Event activity recieve the event fired,but the eventdata passed to is not correct. I use the following command to create the event :

FIRE_SDT_EVENT( OnEntering(itemobj),itemobj,1);

but the recieved eventdata is like following:

1648602641131.png

so i think maybe i use the command FIRE_SDT_EVENT in a wrong way or the params are not correct. Any advices are appreciated!




0 Likes 0 ·
1648602641131.png (47.1 KiB)
Jason Lightfoot avatar image Jason Lightfoot ♦♦ Ouliwen134 commented ·
Can I ask for what reason you wish to spoof the item into thinking it has entered an object without entering one?
0 Likes 0 ·
Ouliwen134 avatar image Ouliwen134 Jason Lightfoot ♦♦ commented ·

Hi jason, Is it meaning the command will check if the item really entering the object? Because sometime i want to pick a pallet from a pallet stack by serveral operators, but I don't know whick subpallet the operator will to pick. so i just make a task to load the palllet stack, and when the operator really arrived the stack's pick postion, he will check and pick the pallet at the top, at that time, I want to tell system the task to pick "pallet stack" is done.

0 Likes 0 ·
Show more comments
Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Ouliwen134 edited

https://docs.flexsim.com/en/22.1/Reference/CodingInFlexSim/CommandReference/Commands.html#createevent

EDIT:

An On Entry event for an item is associated with an container item like pallet or tote. Those items are prepared to listen to entering other items. You find in flowitem bin an option of packaging other items. This option is responsible to make those adjustments to items.

· 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.

Ouliwen134 avatar image Ouliwen134 commented ·

Hi!Joerg Thanks for your reply. No it is not my question point, and i know the packing methods you mentioned, The real OnEntering event is fired when flowitem entry a fixresource Object or else. @Matthew Gillespie have made a more detailed description here https://answers.flexsim.com/questions/76193/doubt-on-wait-for-event.html?childToView=76269#comment-76269. and I don't think we can use the comamand createevent to create a flowitem OnEntering event.

0 Likes 0 ·