'Define some fixed values #DEFINE ShutterOpenPos 0 #DEFINE ShutterOpenPre 5 #DEFINE ShutterClosedPre 1100 #DEFINE ShutterClosedPos 1205 #DEFINE ShutterHomePos 608 'Define the variables that will hold the commanded positions #DEFINE ActuatorCmd P1 'Define the angles and positions #DEFINE ActuatorCurrentPos P12288 #DEFINE ActuatorTargetPos P12289 #DEFINE ActuatorActualPos P12290 #DEFINE ActuatorPrimSetPt P12294 #DEFINE ActuatorSecSetPt P12295 #DEFINE ActuatorJogOffset P12297 #DEFINE ActuatorPPU P12375 'Define the flag bits we'll use #DEFINE bActuatorMove 128 #DEFINE bShutterHomed 129 #DEFINE bDriveMotionProgram 130 #DEFINE bOpenCmd 131 #DEFINE bMoveComplete 132 'Some bit definitions to help make the code more readable #DEFINE bAxisZeroInMotion 516 #DEFINE bKillAllMovesZero 522 #DEFINE bAxisZeroJogActive 792 #DEFINE bJogLockout 799 #DEFINE bProgZeroRunning 1024 #DEFINE bProgOneRunning 1056 #DEFINE bProgTwoRunning 1088 #DEFINE bEnableAxisZero 8465 #DEFINE bKillAxisZero 8467 #DEFINE bEnablePosErrResp 8469 #DEFINE bDisableDriveOnKill 8471 #DEFINE bMaxPosErrExceeded 8479 #DEFINE bFoundHome 16134 #DEFINE bHomeFail 16135 #DEFINE bHomeBackupEnable 16152 #DEFINE bHomeNegEdge 16153 #DEFINE bHomeNegDir 16154 #DEFINE bPosLimitClear 0 #DEFINE bNegLimitClear 1 #DEFINE bEStopClear 3 #DEFINE bClosedIndicator 4