Page 1 of 1

reading content in queue every minute

Posted: Friday 04 June, 2021 - 15:31
by Isa
Hello ,
I'm a student who is working on a school project. I want to know how much products are in a queue. I would like to read this value every minute and write it to excel. So if i run the simulation for a hour, I want to have 60 numbers in my excel sheet. Can you help me with the code that takes care of the reading in the queue every minute.

Kind regards,

Isa

Re: reading content in queue every minute

Posted: Friday 04 June, 2021 - 15:52
by HarryBunnik
Hi Isa,

There are a few options to do create a trigger every 60 seconds.

The first one is to create a small model Source - Sink to the side where the source is releasing every 60 seconds a product and to use the entry trigger of the Sink to execute the command.

The second one, which is a more advanced way is to use the User Event atom that you can find in the library (TIME => User Events).

Under the ...\Documents\Enterprise Dynamics\10.4\Models\Examples\Data\Writing Data To Table.mod a small example model can be found, which might be useful.

I hope this helps you further!

Regards,

Harry

Re: reading content in queue every minute

Posted: Friday 04 June, 2021 - 16:38
by Isa
Hello Harry,

thank you very much for your very quick Answer, you helped me a lot. I followed your advise and it works.

Kind Regard,

Isa