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 19 forks source link

Add raw encoder value to DUT_MotionStage #41

Open ZLLentz opened 4 years ago

ZLLentz commented 4 years ago

Can be useful for debugging and commissioning. Currently this is only captured in the renishaw encoder struct.

Should also include the inverted encoder value to uninvert the inverted absolute encoder values. There should be a displayed value that correctly picks between using the raw and the inverted raw encoder value.

Suggested names: LINT AT %I* -> DUT_MotionStage.nEncoderCountRaw (link to encoder count) DINT -> DUT_MotionStage.nEncoderCount (inverted of the previous if it is above the range for DINT)

Pragma the DINT for EPICS viewing Note that the epics driver here does not support LINT yet

klauer commented 4 years ago

You might have to split it up into lower/upper 32-bit ints, which gets very confusing on the [EPICS] client end for signed values...

ZLLentz commented 4 years ago

64 bits is overkill for all of our Renishaw encoders. These actually max at 32 bits anyway, so I'm going to do the lazy thing. The 64-bit LINT comes from Beckhoff's required link type.

slacAWallace commented 4 years ago

I agree, 64bit is not needed for our purposes.