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

Add per-mover state machine status to output of FB_XTS #81

Open
netbymatt opened this issue Dec 18, 2024 · 0 comments
Open

Add per-mover state machine status to output of FB_XTS #81

netbymatt opened this issue Dec 18, 2024 · 0 comments

Comments

@netbymatt
Copy link
Collaborator

In FB_XTS.TcPOU
Declaration is similar to:

VAR_OUTPUT
	MoverPositions	: ARRAY [1..NUM_MOVERS] OF REAL;
	MoverErrors		: ARRAY [1..NUM_MOVERS] OF BOOL;
	MoverErrorIDs	: ARRAY [1..NUM_MOVERS] OF UDINT;
	// ...
END_VAR

Code is similar to

// update global data
FOR i := 1 TO NUM_MOVERS DO
	MoverPositions[i] := LREAL_TO_REAL(Mover[i].TrackInfo.TrackPosition);
	MoverErrors[i] := Mover[i].Error;
	MoverErrorIDs[i] := Mover[i].ErrorID;
END_FOR
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

1 participant