pcdshub / lcls-twincat-general

A PLC code toolkit for LCLS TwinCAT PLC projects
https://pcdshub.github.io/lcls-twincat-general/
Other
16 stars 20 forks source link

Page Fault with Improper Use of FB_EPS #87

Open ZLLentz opened 9 months ago

ZLLentz commented 9 months ago

Current Behavior

If you call fbEPS.setBit() or fbEPS.setDescription() prior to calling fbEPS() with some instance of DUT_EPS, it results in a page fault. This is because setBit and setDescription refer to the eps object that was passed in, and without passing one prior this is a null reference. Beckhoff sort of tries to warn us about this via a cryptic compiler warning, but this is otherwise not warned about in the documentation or in the docstrings.

Expected Behavior

We should have some combination of the following:

Context / environment

@NSLentz ran into this while testing out the EPS features.