Problem with Availibility Control

All topics on coding 4Dscript in Enterprise Dynamics.
Post Reply
Andreas
Posts: 6
Joined: Thursday 09 April, 2015 - 19:42

Problem with Availibility Control

Post by Andreas »

Hi,
I want to change the availability of an Advanced Transporter. Therefor I use the availability Control Atom in combination with an availability schedule.

The AD picks atoms according to a specific label. This is controlled by a conditional control atom. When I connect the AD with the availability control atom the AD’s availability changes, but I works as before.
I think the problem is the involvement of the conditional control atom but I do not find a solution for the problem (if I remove the conditional control atom an checks the automatically load function the AD stops picking atoms).

Maybe someone solves the problem, I added an example.

Thanks in advance.
Attachments
Test Avilibility.mod
(25.77 KiB) Downloaded 287 times
User avatar
HarryBunnik
Posts: 362
Joined: Monday 07 February, 2011 - 11:22

Re: Problem with Availibility Control

Post by HarryBunnik »

Ha Andreas,

Your "conditional control" is indeed interfering with your "availability control". So in your condition, you've got to check if the "Availability control" is active or not. What I did is adding an incoming channel (4th) to the "Conditional control" and connect it to the information channel of the "Availability control". Then I update the condition to check on the availability as well:

Code: Select all

And(
  content(in(1, c)) = 0, 
  Att([Available], in(4, c)) = 1, 
  Or(
    IndexMatch(content(refWarehouse1), Label([kd], rank(count, refWarehouse1)), 5) > 0,
    IndexMatch(content(refWarehouse2), Label([kd], rank(count, refWarehouse2)), 5) > 0
  )
)
And then it seems to work nicely :-)

Regards,

Harry
Andreas
Posts: 6
Joined: Thursday 09 April, 2015 - 19:42

Re: Problem with Availibility Control

Post by Andreas »

Hi Harry,

thank you for your help, it works (quite simple).

Best regards,
Andreas
Post Reply