You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Quick question. In fake_motor_record.py there is the following hook for when a value is written, which I can use to kick off an actual motor movement:
asyncdefvalue_write_hook(fields, value):
nonlocalhave_new_position# This happens when a user puts to `motor.VAL`print("New position requested!", value)
have_new_position=True
Bit of background: I wrote a python class for communicating with Trinamics boards, with low- and high-level motion commands, and now want to expose the axis parameters through a fake-motor EPICS class. Repo is here: https://github.com/BAMresearch/Trinamic_TMCM6214_TMCL_IOC
The text was updated successfully, but these errors were encountered:
The IOC is starting to perform quite well, ready for testing with our machine's SPEC interface next week. It reads the configuration from a YAML file, homes on initialisation, and then it's ready.
Moves implement backlash too, and internally pint is used for unit handling. Using the hook, there is no delay to the start of the move, and you can also send a new position while it's still moving. most of it is asynchronous.
There's a few small things still to be done (mostly to take action when an EPICS parameter is adjusted for velocity/acceleration, homing action and zeroing), but it's not bad.
I'm just curious as to why the instance doesn't report actual position except for such properties as the RRBV, the bare instance reports only the preset .VAL positions. So if you're tracking this parameter, it seems like it instantly moved from initial to final position. The fake_motor_record example updated the .VAL field during its fake move, but this doesn't work as it then thinks it's continually getting new target positions.
Hey everyone,
Quick question. In fake_motor_record.py there is the following hook for when a value is written, which I can use to kick off an actual motor movement:
Is there a similar hook available for a homing request? (HOMF or HOMR, if I understand this correctly https://epics.anl.gov/bcda/synApps/motor/motorRecord.html ).
Bit of background: I wrote a python class for communicating with Trinamics boards, with low- and high-level motion commands, and now want to expose the axis parameters through a fake-motor EPICS class. Repo is here: https://github.com/BAMresearch/Trinamic_TMCM6214_TMCL_IOC
The text was updated successfully, but these errors were encountered: