[Feature request] Ability to modify output in generic serial command of motion module.
Is your feature request related to a problem? Please describe. I use Odrives to drive a 6DOF platform. The Odrives expect an input in turns. Simhub outputs from motion module in mm with placeholders such as 'Axis1'. In serial output it is not possible to use a calculated value from 'Axis1' either directly or indirectly. 'Axis1' does not appear as a computed parameter and in any case, the computed parameters do not parse to serial correctly like they do in Custom serial devices..
Describe the solution you'd like I want to multiply 'Axis1' by -0,2 and send that value by serial instead of <Axis1>
Describe alternatives you've considered Direct manipulation
Additional context Add any other context or screenshots about the feature request here.
Hi ! The output is not in millimeter but in "%" scaled to the resolution being set, For performance reason since it's meant to be able to run up to 500hz (where generic serial is running at 60) there is no "uncontrolled" formulas being available indeed.
What is the expected output exactly ? binary, text, hex text ? There are some hidden options, But I'm not sure they match. It's not only about doing computations, but also outputting the right format.
Thank you for the reply.
The Odrive expects inputs in motor turns.
In my implementation I have a 5mm ball screw with -420mm of travel (-82 turns). So from % I would have to use a formula = -41 * (1+’Axis1’) to go from 0 to -82.
The format for the position is required in ascii text.
https://docs.odriverobotics.com/v/0.5.6/ascii-protocol.html
So output might be:
p 0 -23.5641 <13>
An earlier but still relevant firmware uses encoder counts rather than turns. In which case output, with for example 8192 cpr, would be
P 0 -193037 <13>
FlyPT Mover handles ascii numbers with <<.>>>> https://www.xsimulator.net/community/threads/flypt-mover-3-7-0-9.19016/page-21
Thanks again.