Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mover Return Type from Base Not Uniformly 'ApplicationMover' #91

Open
ctrostel90 opened this issue Jan 15, 2025 · 1 comment
Open

Mover Return Type from Base Not Uniformly 'ApplicationMover' #91

ctrostel90 opened this issue Jan 15, 2025 · 1 comment

Comments

@ctrostel90
Copy link

On the Mediator feature branch, the ApplicationMover object was added to aide in separating out the base code from user modified/extended application code. With this, the return types inside the Base classes return 'ApplicationMover' and not 'Mover'

image

However, there are a few places that are not returning ApplicationMover and instead are returning Mover. Not an exhaustive list just yet however the spots I've found thus far:

iMoverList.GetMoverByLocation
MoverList.GetMoverByLocation
PositionTrigger.CurrentMover

@netbymatt
Copy link
Collaborator

This is the expected behavior. We had to design the updated interface to be separate from application code which allows for much easier updating of code in the "XTS (Do Not Edit)" folder on existing projects. Because of this we've made the choice to have all base functions return a standard mover. An application mover can be accessed by using the mover index. Please reference this code and specifically line 229 for station 0 in the MAIN.StationLogic Routine.

// Station 0 Logic
IF XTS.Station[0].MoverInPosition THEN
StationTimer[0](IN := TRUE, PT := T#1000MS);
IF StationTimer[0].Q THEN
XTS.Mover[XTS.Station[0].CurrentMover.MoverIndex].MoveToStationByRampTime(
DestinationStation:= XTS.Station[1],
Velocity:= 500,
RampTime:= 1.5,
Stiffness:= 0.5,
Gap:= 85);
END_IF
ELSE
StationTimer[0](IN := FALSE);
END_IF

This method will be documented when the branch is published to main as v2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants