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

Include terminal CoE STM Diag errors in the error message #153

Open ZLLentz opened 2 years ago

ZLLentz commented 2 years ago

Often you get a message like "Drive hardware not ready to operate"

But this can mask a more specific error from the CoE. This might be terminal-type specific. Here's the description of the errors for an EL7041:

image

ZLLentz commented 2 years ago

I'm not 100% sure how to implement this correctly in general, but bubbling this information up to EPICS would be extremely useful. Seeing "Under voltage" or "no control power" or "short circuit A" is much more useful than "drive hardware not ready to operate"

ZLLentz commented 2 years ago

EL7047 has a different set of errors (with some overlap). Notably it adds some open load warnings so you can check if the motor is disconnected from the drive. image

ZLLentz commented 2 years ago

For the EL7041-1000, we see a similar pattern of slight differences but overlap on the same memory addresses: image

ZLLentz commented 2 years ago

The EL7342 is similar, but it has 2 channels and it uses A020 for ch1 STM, A030 for ch2 STM, A040 for ch1 POS, A050 for ch2 POS, making it not line up quite right with the stepper terminals above.

ZLLentz commented 2 years ago

Those are the 4 main flavors of terminals we have deployed so I'm stopping my investigation here for now

ZLLentz commented 2 years ago

Current thought is: