Closed jsheppard95 closed 4 years ago
(Closing/re-opening to kick travis + get a code summary)
Looking back, the linter error was caught by CI, but it didn't fail the build: https://travis-ci.com/pcdshub/lcls-twincat-optics/jobs/287061871 (known issue https://github.com/pcdshub/pcds-ci-helpers/issues/7). I'll get on that to try and save this from happening again...
Anyone against merging this? I haven't noticed any major issues from working with the real hardware.
Most important thing is that it works on your end. I haven't managed to find time for a full review, sadly, but am very curious to see your results with the piezo.
PR to begin discussion/obtain feedback on Pitch Control function block necessary for stepper/piezo combination
Summary of Changes
Function block is a modification of: https://github.com/jsheppard95/HOMS_FEE/blob/master/HOMS_FEE/HOMS_FEE_PLC/Common/POUs/HOMS_FBs/FB_PitchControl.TcPOU that now uses
DUT_MotionStage
,FB_MotionRequest
, andFB_MotionStage
Currently focusing on basic pitch control state machine, i.e waiting for position requests, properly executing stepper motion to requested position, and then transferring to piezo control function block : https://github.com/jsheppard95/lcls-twincat-optics/blob/piezo-control/lcls-twincat-optics/lcls_twincat_optics_plc/POUs/FB_PiezoControl.TcPOU
Current logic simply waits for changes to
stMotionStage.fPosition
and traverses the state machine.Current Usage
Test project defined in
Main
, this would eventually go into https://github.com/jsheppard95/MR1L0-MR2L0/tree/piezo-control which would instantiate the structureHOMS_PitchMechanism
and function blockFB_PitchControl
along with run the serial communication tasks.Currently using simulated axis to test the coarse motion and transfer to
PCM_FineMove
but beyond this it is difficult to test without connecting to real hardware.Current Issues
TODO