| 
															
																@@ -17,6 +17,7 @@ namespace VirgoRT.Devices 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     public class IoTriStateLift2 : BaseDevice, IDevice 
															 | 
															
															 | 
															
																     public class IoTriStateLift2 : BaseDevice, IDevice 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     { 
															 | 
															
															 | 
															
																     { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         private readonly DIAccessor _diOrigin;//是否到达原点 
															 | 
															
															 | 
															
																         private readonly DIAccessor _diOrigin;//是否到达原点 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        private readonly DIAccessor _diOrigin2; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         private readonly DIAccessor _diP1;//是否到达位置1 
															 | 
															
															 | 
															
																         private readonly DIAccessor _diP1;//是否到达位置1 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         private readonly DIAccessor _diP2;//是否到达位置2 
															 | 
															
															 | 
															
																         private readonly DIAccessor _diP2;//是否到达位置2 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         private readonly DIAccessor _diP3;//是否到达位置3 
															 | 
															
															 | 
															
																         private readonly DIAccessor _diP3;//是否到达位置3 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -91,7 +92,7 @@ namespace VirgoRT.Devices 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     return MovementPosition.Middle; 
															 | 
															
															 | 
															
																                     return MovementPosition.Middle; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 else if (_diP1.Value == false && _diP2.Value == false && _diP3.Value) 
															 | 
															
															 | 
															
																                 else if (_diP1.Value == false && _diP2.Value == false && _diP3.Value) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     return MovementPosition.Down; 
															 | 
															
															 | 
															
																                     return MovementPosition.Down; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                else if (_diOrigin.Value) 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                else if (_diOrigin.Value && _diOrigin2.Value) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     return MovementPosition.Origin; 
															 | 
															
															 | 
															
																                     return MovementPosition.Origin; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 return MovementPosition.Unknown; 
															 | 
															
															 | 
															
																                 return MovementPosition.Unknown; 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -124,6 +125,7 @@ namespace VirgoRT.Devices 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																             _diOrigin = ParseDiNode("diOrigin", node, ioModule); 
															 | 
															
															 | 
															
																             _diOrigin = ParseDiNode("diOrigin", node, ioModule); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            _diOrigin2 = ParseDiNode("diOrigin2", node, ioModule); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             _diP1 = ParseDiNode("diP1", node, ioModule); 
															 | 
															
															 | 
															
																             _diP1 = ParseDiNode("diP1", node, ioModule); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             _diP2 = ParseDiNode("diP2", node, ioModule); 
															 | 
															
															 | 
															
																             _diP2 = ParseDiNode("diP2", node, ioModule); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             _diP3 = ParseDiNode("diP3", node, ioModule); 
															 | 
															
															 | 
															
																             _diP3 = ParseDiNode("diP3", node, ioModule); 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -207,7 +209,7 @@ namespace VirgoRT.Devices 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     break; 
															 | 
															
															 | 
															
																                     break; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 case Position.origin: 
															 | 
															
															 | 
															
																                 case Position.origin: 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     { 
															 | 
															
															 | 
															
																                     { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                        if (_diOrigin.Value) 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                        if (_diOrigin.Value && _diOrigin2.Value) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                         { 
															 | 
															
															 | 
															
																                         { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                             EV.PostInfoLog(Module, $"Lift Pin already on original position."); 
															 | 
															
															 | 
															
																                             EV.PostInfoLog(Module, $"Lift Pin already on original position."); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                             sw.Stop(); 
															 | 
															
															 | 
															
																                             sw.Stop(); 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -367,7 +369,7 @@ namespace VirgoRT.Devices 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             if ((_currentTarget == Position.position1 && _diP1.Value) || 
															 | 
															
															 | 
															
																             if ((_currentTarget == Position.position1 && _diP1.Value) || 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 (_currentTarget == Position.position2 && _diP2.Value) || 
															 | 
															
															 | 
															
																                 (_currentTarget == Position.position2 && _diP2.Value) || 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 (_currentTarget == Position.position3 && _diP3.Value) || 
															 | 
															
															 | 
															
																                 (_currentTarget == Position.position3 && _diP3.Value) || 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                (_currentTarget == Position.origin && _diOrigin.Value)) 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                (_currentTarget == Position.origin && (_diOrigin.Value && _diOrigin2.Value))) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             { 
															 | 
															
															 | 
															
																             { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 EV.PostInfoLog(Module, $"Lift Pin arrive {_currentTarget}"); 
															 | 
															
															 | 
															
																                 EV.PostInfoLog(Module, $"Lift Pin arrive {_currentTarget}"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 Reset(); 
															 | 
															
															 | 
															
																                 Reset(); 
															 |