Skip to content

Use busy records for ease of synchronous programming - #25

Merged
nmarks99 merged 3 commits into
masterfrom
feature/busy
Jul 24, 2026
Merged

Use busy records for ease of synchronous programming#25
nmarks99 merged 3 commits into
masterfrom
feature/busy

Conversation

@nmarks99

Copy link
Copy Markdown
Collaborator

This PR changes the bo records used to start asynchronous motion ($(P)Control:moveJ, $(P)Control:moveL, and $(P)RobotiqGripper:Open and $(P)RobotiqGripper:Close) to busy records. This was primarily done so that clients can easily execute robot motion synchronously. Some minor changes to the driver code was also required to support this

With caput from the command line, the following will now block until motion completes:

caput -w 10 -c urExample:Control:moveJ 1

Previously this would return immediately regardless, and clients needed to poll the $(P)Control:Moving PV to wait for the motion to complete.

Similarly with pyepics you can now do the following to block until motion is complete:

epics.caput("urExample:Control:moveJ", 1, wait=True)

In the future I plan to implement this same style of busy record logic with the waypoint motion PVs. Once this is completed, it is likely the built in path logic can be fully replaced by sseq records with "Wait" options. However, I believe most users will be more interested in simple scripting for robot motion versus building paths from combinations of sseq, calcout, etc. records at runtime.

nmarks99 added 3 commits July 24, 2026 13:50
By changing moveL and moveJ records from bo to busy,
and some slightly modifications to the driver, clients can
now do synchronous motion in a much easier way. For example
with the caput command line utilty, we can now do:
`caput -w 10 -c urExample:Control:moveJ 1` and it will block
until the motion completes. From pyepics, we could similarly do:
caput("urExample:Control:moveJ", 1, wait=True).
Same idea as we did for moveJ and moveL. Now clients can easily
move close/open the gripper and wait for motion to complete
@nmarks99
nmarks99 merged commit 558b98f into master Jul 24, 2026
5 checks passed
@nmarks99
nmarks99 deleted the feature/busy branch July 24, 2026 22:20
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.

1 participant