pcdshub / lcls-twincat-motion

TwinCAT 3 Motion Control Utilities - PLC Motion Library for all PCDS Applications
https://pcdshub.github.io/lcls-twincat-motion
Other
35 stars 20 forks source link

Initialize DUT_MotionStage cmd values on init and reset #37

Open ZLLentz opened 4 years ago

ZLLentz commented 4 years ago

All of the command parameters on DUT_MotionStage are currently left at their existing values after a reset. This can be confusing and it can also allow other bugs to surface in a dangerous way e.g. if there is other code that is trying to force bExecute to TRUE and enabling another move to the same bad position.

Here are all the proposed parameter default/reset value combinations: nCommand := 3 (absolute move) nCmdData := 0 (no data) fPosition := current position fVelocity := minimum of configured manual slow velocity, configured max velocity