LabVIEW-DCAF / MotionModule

The DCAF Softmotion module is aimed towards simplifying the experience of creating embedded motion systems.
Apache License 2.0
2 stars 1 forks source link

Status read in Op Enable mode greatly increases CPU usage per motion module running #44

Closed aggieslaughter closed 6 years ago

aggieslaughter commented 6 years ago

Would be nice to not have the overhead of doing a status read on the drive every iteration. Could we use one of the reserved bits to flag if we want to do the read or not?

SimonRPSM commented 6 years ago

Good idea.

I've added the request to the SDD. The Op Enable methods will check if bit 11 is enabled - if so, they will skip reading the position. This can be useful if the system is overloaded and running late.

Because of this, there will be a new mode - the first Reserved Mode I am using as a Single Axis Read which will return the info for, well, a single axis read.

Notice that swapping modes should have no effect on the latching mechanism. Namely, that going from low to high on bit 4 does not need to be within the same mode (you can be doing a Position Profile move and have the read bit high, go to the Read method with a low Start bit, and change to Position Profile Move and toggle the start bit simultaneously).

SimonRPSM commented 6 years ago

Thinking about things a little bit differently - if we have a Read Single Axis method, then we can have that specific method read the motion I/o. Then I can modify the Read method to give only Coordinate System information during the "normal" operation. This should be a large performance improvement - the main drawback being that to get "all" the info, we would need to have a separate call.

SimonRPSM commented 6 years ago

I went further and now there is a Read Fast and a Read Full method. The Read Fast will return simply the system velocity and an array (or a single value) for the Results. The Read Full will return data very similar to the previous Read.

This also means that there are now 2 Result Utilities - one for the Read Fast and one for the Read slow.

Currently the Read Full does not have an axis index input, but that can be added in the future.