YaskawaEurope / mlx-examples

This repository contains the sources of the MotoLogix code examples. The rendered pages can be seen on the Yaskawa Motologix website.
https://motologix.yaskawa.eu.com/examples
MIT License
3 stars 0 forks source link

feature/31 implement start conditions for PosTable entry (step 2) #37

Open yeu-degroot opened 3 months ago

yeu-degroot commented 3 months ago

This implements step 2 of #31.

In step 1, the start condition mechanism always scheduled a standstill (and transition in the waiting state), even if conditions were already satisfied. For many use cases, that is ugly as conditions are often satisfied in time but the robot motion will still have a short standstill.

This step 2 adds the functionality to prevent such short standstills. It will continuously monitor the conditions of the entry which would be next in line to send.

If those conditions change to positive (not ok -> ok), the QA will be recalculated, causing the next motion to be sent. A later change back to negative (ok -> not ok) has no effect.

For an entry with start conditions, if the corresponding condition changes back to negative (ok -> not ok) while the LoadIndex is greater than the entry index, it does not result in a stop. Already queued motions cannot be removed by PosTable.

Code changes

Update McePosTable function

Update McePosTableRecalcQA and McePosTableRemainingEntries

Update McePosTableUpdateIndex function

Update McePosTableUpdateLoadIndex function