|
@@ -29,6 +29,12 @@ namespace VirgoRT.Devices
|
|
|
//private readonly DIAccessor _diCCWLimitSensorAlarm; //
|
|
|
private readonly DIAccessor _diOverSoftwareLimitAlarm; //
|
|
|
|
|
|
+ private readonly DIAccessor _diServo1BrakeON;
|
|
|
+ private readonly DIAccessor _diServo2BrakeON;
|
|
|
+ private readonly DIAccessor _diServo3BrakeON;
|
|
|
+ private readonly DIAccessor _diServo4BrakeON;
|
|
|
+ private readonly DIAccessor _diServoFSTP;
|
|
|
+
|
|
|
private readonly DOAccessor _doReset;
|
|
|
|
|
|
private readonly DOAccessor _doOrigin;//去原点
|
|
@@ -183,7 +189,11 @@ namespace VirgoRT.Devices
|
|
|
_diABSAlarm = ParseDiNode("diABSAlarm", node, ioModule);
|
|
|
_diORGAlarm = ParseDiNode("diORGAlarm", node, ioModule);
|
|
|
_diOverSoftwareLimitAlarm = ParseDiNode("diOverSoftwareLimitAlarm", node, ioModule);
|
|
|
-
|
|
|
+ _diServo1BrakeON = ParseDiNode("diServo1BrakeON", node, ioModule);
|
|
|
+ _diServo2BrakeON = ParseDiNode("diServo2BrakeON", node, ioModule);
|
|
|
+ _diServo3BrakeON = ParseDiNode("diServo3BrakeON", node, ioModule);
|
|
|
+ _diServo4BrakeON = ParseDiNode("diServo4BrakeON", node, ioModule);
|
|
|
+ _diServoFSTP = ParseDiNode("diServoFSTP", node, ioModule);
|
|
|
//_diServoAlarm = ParseDiNode("diServoAlarm", node, ioModule);
|
|
|
//_diCCWLimitSensorAlarm = ParseDiNode("diCCWLimitAlarm", node, ioModule);
|
|
|
|
|
@@ -292,8 +302,37 @@ namespace VirgoRT.Devices
|
|
|
public bool GoPosition(Position position)
|
|
|
{
|
|
|
Reset();
|
|
|
+ if (!_diServo1BrakeON.Value)
|
|
|
+ {
|
|
|
+ NoDuplicatedAlarm($"Lift Pin DI-{_diServo1BrakeON.Index} alarm");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if (!_diServo2BrakeON.Value)
|
|
|
+ {
|
|
|
+ NoDuplicatedAlarm($"Lift Pin DI-{_diServo2BrakeON.Index} alarm");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if (!_diServo3BrakeON.Value)
|
|
|
+ {
|
|
|
+ NoDuplicatedAlarm($"Lift Pin DI-{_diServo3BrakeON.Index} alarm");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if (!_diServo4BrakeON.Value)
|
|
|
+ {
|
|
|
+ NoDuplicatedAlarm($"Lift Pin DI-{_diServo4BrakeON.Index} alarm");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if (!_diServoFSTP.Value)
|
|
|
+ {
|
|
|
+ NoDuplicatedAlarm($"Lift Pin DI-{_diServoFSTP.Index} alarm");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
if (_diABSAlarm.Value)
|
|
|
+ {
|
|
|
+ NoDuplicatedAlarm($"Lift Pin DI-{_diABSAlarm.Index} alarm");
|
|
|
return false;
|
|
|
+ }
|
|
|
|
|
|
_currentTarget = position;
|
|
|
sw.Restart();
|