Cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

first part of first shift

Hi Sim Superusers,

 

I have a unique situation where I need to check if an incoming part is the first part of first shift on an entrance control. Challenge is, we do not know when the first part arrives. it may arrive 7 am, or 9 am, or 10.15 am. But no matter when it arrives, I need to check if that is the first part of first shift. 

 

Share your thoughts and Thank you!!

 

Karthik Murugan

6 REPLIES 6

Re: first part of first shift

Hello Karthik Murugan,

 

how about using an unplanned control with a shiftcalendar and setting a variable there?

Then check the variable in your entrance control.

 

With regards

Andreas

 

Unbenannt.PNG

Re: first part of first shift

Solution Partner Legend Solution Partner Legend
Solution Partner Legend

The shiftcalendar have a control "Unplanned". I believe it is actived both when a shift ends and when a shift starts.

In the control, set a global boolean variable FirstProductInShift := true

 

In the entrance control:

if FirstProductInShift = true
    --do the special code
    FirstProductInShift := false
end

  This way the code should only be run for the special first product of each shift.

 

Re: first part of first shift

Solution Partner Legend Solution Partner Legend
Solution Partner Legend

I guess I was a bit too slow with my similar reply. Smiley Happy

Re: first part of first shift

Thanks for the reply.

 

How often or where should the unplanned control method be called?

 

Thanks!!

Re: first part of first shift

Solution Partner Legend Solution Partner Legend
Solution Partner Legend

Do you mean where you define the control?

 

In that case, open the shiftcalendar. Press F12. This should open a panel where you define controls for objects. In the section called "Unplanned", set the path to your method. 

 

Or did you mean something else?

Re: first part of first shift

That worked well!! Thank you!!