We need to create the msg tags: * Data Type: MESSAGE ![[Pasted image 20241119164256.png]] `Motor[xx].Drive.DigitalInputs_Value` ![[Pasted image 20241119163426.png|750]] Every tag need to setup the Path: ![[Pasted image 20241119163118.png|726]] ### On every motor we add the Read of the DIs every 100ms *** #### At R201_Input routine ==MSG(Motor_M23160_Read_DigitalInputs_MSG);== Motor[1].I.Pht1:=Motor[1].Drive.DigitalInputs_Value.19;// DI4 - 0 : Product presence - 1 : Empty Motor[1].I.Pht2:=Motor[1].Drive.DigitalInputs_Value.20;// DI5 - 0 : Product presence - 1 : Empty ```pascal // Ingressi Motore M23160 - Shibuya if Motor[1].Presence then if Clock_Pulse._100ms then (* LENZE 550i DI Bit 16: Digital input 1 Bit 17: Digital input 2 Bit 18: Digital input 3 Bit 19: Digital input 4 Bit 20: Digital input 5 Bit 21: Digital input 6 Bit 22: Digital input 7 Bit 25: STO status *) MSG(Motor_M23160_Read_DigitalInputs_MSG); end_if; CPS(M23160:I1,Motor[1].Drive.Telegram.I,1); Motor[1].I.CircuitBreaker:=not IO45431.0; Motor[1].I.Thermic:=1; Motor[1].I.Pht1:=Motor[1].Drive.DigitalInputs_Value.19;// DI4 - 0 : Product presence - 1 : Empty Motor[1].I.Pht2:=Motor[1].Drive.DigitalInputs_Value.20;// DI5 - 0 : Product presence - 1 : Empty Motor[1].I.Pht3:=KI_NotPresent; Motor[1].I.Pht4:=KI_NotPresent; Motor[1].I.Pht5:=KI_NotPresent; Motor[1].I.Pht6:=KI_NotPresent; Motor[1].I.Sn1:=KI_NotPresent; Motor[1].I.Sn2:=KI_NotPresent; Motor[1].I.Sn3:=KI_NotPresent; Motor[1].I.Sn4:=KI_NotPresent; Motor[1].I.Sn5:=KI_NotPresent; Motor[1].I.Sn6:=KI_NotPresent; Motor[1].I.PEW:=KPEW_NotPresent; end_if; ```