Skip to content

Create PandAEncoderSync.template #149

@coretl

Description

@coretl

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)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions