Hi,
I'm having problems with a simple function in ED - send to strategy with if logical function! I need to structure a code by which each product (or batch) will go through a test: if product's time from EntryTime (in Server) till leaving the queue is < or = to 2 hours go to channel 1, else channel 2!
Meaning that if product spends more than 2 hours in server + waiting in queue send it to channel 2.
I've tried and tried, but with no results! Please help me and it is not necessary to appoint me to F1 (I'm fully aware of it and its confusing and misleading English!).
My last try obviously doesn’t solve my problem and is attached. Can anybody give me an advice?
Thank you,
Mario
send to logical function if
send to logical function if
- Attachments
-
- sendto - problem.mod
- (8.37 KiB) Downloaded 276 times
Re: send to logical function if
sorry, I've uploaded a wrong model
this is the right one
this is the right one
- Attachments
-
- sendto - problem.mod
- (10.4 KiB) Downloaded 304 times
- HarryBunnik
- Posts: 362
- Joined: Monday 07 February, 2011 - 11:22
Re: send to logical function if
Ha Mario,
If you set (on the OnExit trigger of your first server) a label on the leaving product that contains the time that a product is busy in the server:
And then check this on the SendTo statement that is on the Queue:
I think it's doing what you want. I've updated your model so you can have a look.I hope it helps you!
Cheers,
Harry
If you set (on the OnExit trigger of your first server) a label on the leaving product that contains the time that a product is busy in the server:
Code: Select all
Label([TimeBeingServed], i) := Time - EntryTime(i)
Code: Select all
If(
Label([TimeBeingServed], first(c)) > hr(2),
2,
1
)
Cheers,
Harry
Re: send to logical function if
Hi Harry,
so far so good! Works like a charm
Thanks mate,
Mario
so far so good! Works like a charm
Thanks mate,
Mario