DiamondLightSource / DiamondLightSource/pmac

Create `PandAEncoderSync.template`

Open
#149 0 comments 0 reactions 1 assignee Claimed by @LuisFSegalla View on GitHub
Dominant language
C++
Stars
31
Forks
25
PR merge metrics
No merged PRs in 30d

Description

We want a template that:
- Synchronizes a motor resolution (with additional scale factor to reflect what happens in the encoder conversion table), offset and units with a field in a PandA
- After homing, takes the value of the motor and sets the block value to it

Take the code from https://github.com/PandABlocks/ADPandABlocks/blob/d23b52c1e1135587d6cc6a8bfc08f2ed57230484/ADPandABlocksApp/Db/ADPandABlocksMotorSync.template#L17-L63 and paste it into a new `PandAEncoderSync.template` with the following changes:
- Use `$(MOTOR)` as the base prefix instead of `$(P)$(R)`
- Use `$(PANDA):$(BLOCK)` as the output link prefix instead of `$(P)$(R)INENC$(ENC_IND)`

This means we can use it for both PandABrick (e.g. `BLOCK=ABSENC1`) and PandABox (e.g. `BLOCK=INENC1`)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.