Closed ZLLentz closed 4 years ago
I've gotten a bit stuck. I'm going to type out my confusion before calling it quits for the day.
The main issues I'm having are:
I'm held up by the concept of the FB_LinearDeviceStateTable
.
There are a lot of magic numbers to juggle, and I'm not sure what each number means and whether any of them are correlated. Do I request these numbers from the Arbiter? Do I make them up? Is it bad if they collide with each other? Do I let the PLC project handle them instead of doing in the Library? Here is a list of magic numbers that the PMPS API expects:
FB_FastFault.i_TypeCode
(example number is the cryptic 16#9010
)BeamParameterTransitionManager.i_TransitionAssertionID
(defaults to 0)BeamParameterTransitionManager.i_nRequestedAssertionID
(defaults to 0)FB_LinearDeviceStateTable.key
Some things aren't documented:
ST_BeamParams.neVRange
(clearly a bitmask, but what do the bits mean?)It's not clear exactly which FBs and DUTs in the PMPS lib are meant for external use. My guess is that I need to manipulate these in the library:
ST_BeamParams
ST_Device
FB_FastFault
BeamParameterTransitionManager
FB_LinearGovernor
@slacAWallace I have a lot of questions queued up about how to PMPS before I finish this PR
How do I correlate physical position states with sets of valid beam states? E.g., when the user asks to move to YAG, how I do find the YAG states in the hash table and how do I pick which of them is correct?
This will become a thing for SC, for now there will be only one combination of state and beam parameter set. In the SC case we'll need some higher-level automation to select the optimal combo of target state and beam parameter set.
Fast fault typecode is left to us to build. We should discuss it. I have it purely for UI/UX. Request IDs need to be unique within an arbiter. Originally they were going to be unique globally in the PMPS so we could use a diagnostic to aggregate all preemptive requests from all arbiter instances and understand exactly who was requesting what. For this round they just need to be locally unique. I'll need to revisit the linear device key. It's been a while since I worked on that.
I will document the eV bitmask better. There is a constant in PMPS_GVL which defines these ranges, and I'll make it clearer how and that they're associated.
This indicates to me the library would be more user-friendly if I spent a little time organizing it. ST_Device and FB_LinearGovernor are examples. If FB_LinearGovernor looks useful to you, then with a bit of work it could be more permanent.
Thanks Alex, your clarifications help a lot. I will do the following:
ST_BeamParameters
to every DUT_PositionState
struct.FB_LinearGovernor
as a starting point for ideas for the state governor to be built out here, since I'm not using the hash table and this FB expects it. My gov will fulfill the same purpose but will be expecting this library's native data types.I have finished the implementation phase here and have written a change log. I will proceed to testing and fixing issues offline.
I'm fairly convinced that this is complete. I will try implementing it for the various common components next, then clean this messy PR up a bit and move in for the tag. With some luck this could be deployed in time for this PAMM, but even if not this is work that had to get finished.
This is hitting the threshold of "please tag me so we don't run with v0.0.0 come back later to fix issues and re-tag"
The goal of this PR is to define some motion-PMPS tie-ins that I don't want to write multiple times for each common component. The plan is to include:
This is not complete nor is it ready for a full review, but it will require a review from @slacAWallace when it is done. This PR will close #78 and go a bit further.
Change log (OUTDATED):