Skip to content

Conversation

@satiowadahc
Copy link
Contributor

I don't see another way of doing this, but currently I can't see any feedback in any UI that shows the current Single Block mode (Stepping) or not.

It seems to be a flag you send with command.AUTO(AUTO_STEP) and you can just remember in your UI you set the flag...? I prefer polling to know the real answer.

`motion paused` flag.

*stepping*:: '(returns boolean)' -
`motion stepping` flag.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I even added documentation for once :)

@rmu75
Copy link
Collaborator

rmu75 commented Sep 17, 2025

IMO the stepping flag should also be added to EMC_TRAJ_STAT::update here https://github.com/LinuxCNC/linuxcnc/blob/master/src/emc/nml_intf/emc.cc#L1688

@andypugh
Copy link
Collaborator

Not wanting to distract with trivialities, but "singlestep" would disambiguate from anything stepper-motor related.
(I initially assumed the latter when this PR appeared)

@satiowadahc
Copy link
Contributor Author

I was originally trying to add it in update. But was struggling to get it to work properly . I'd welcome pointers in the right direction.

I'm OK of changing the name. The amount of "status" variables that are different status objects made this way harder than expected.

@rmu75
Copy link
Collaborator

rmu75 commented Sep 18, 2025

Can you elaborate what didn't work?

I just tried this PR and added this line

index 0b4117b229..d1d6e3f68b 100644
--- a/src/emc/nml_intf/emc.cc
+++ b/src/emc/nml_intf/emc.cc
@@ -1702,6 +1702,7 @@ void EMC_TRAJ_STAT::update(CMS * cms)
     cms->update(queueFull);
     cms->update(id);
     cms->update(paused);
+    cms->update(stepping);
     cms->update(scale);
     cms->update(rapid_scale);
     EmcPose_update(cms, &position);

It compiles without issues, runtests completes without error Runtest: 272 tests run, 272 successful, 0 failed + 0 expected, 4 skipped, 0 shmem errors. Didn't really check if the flag is doing what it's intended to though.

@satiowadahc
Copy link
Contributor Author

The stepping variable wasn't updated.

@andypugh
Copy link
Collaborator

andypugh commented Nov 9, 2025

Having thought more on this, can the name of the flag be changed? "stepping" is ambiguous. "single-step" or a variant would be better.

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

Successfully merging this pull request may close these issues.

3 participants