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

Show terminal diagnostic data in EPICS #182

Open ZLLentz opened 1 year ago

ZLLentz commented 1 year ago

Current Behavior

You must manually dig into the CoE settings to get terminal diagnostic data

Expected Behavior

I should be able to check these in EPICS- maybe from dedicated PVs, or maybe as included in the error message.

Context / environment

There have been numerous cases where the undervoltage warning would have been useful to clue us into the fact that the motor power supply was unplugged. This happened recently in TMO.

Suggested Solution

The most useful information is at CoE index A010, which has some shared fields for different motor terminals but some differences between models too. You can get and read this generically given an Axis object with little difficulty, but you can't a priori know which fields are available unless you know the terminal model. It might be possible to inspect the terminal module, it might not be. There are additional helpful fields in the encoder terminals but these can vary wildly and I don't know how to get a reference to them automatically.