how to add the following logic?

HELLO,everyone!

 

how to add the following logic?

1、Before transporting the OP10 workpiece+The pallet for the blanks from A (OP10 workpiece+The pallet for the blanks) to B (Disassembly of components) for disassembly, C (Install the component) will check whether the number of OP10 pallets in D (The pallet for the OP10 workpieces
) is greater than 0; 

2、After the workpiece passes through station B (unloading station), the workpiece is not allowed to flow out of station A (OP10 + blank tray).

3、After parts are released from C (assembly station), A (OP10 + blank tray) is allowed to be released.

 

Thank you very much!