|
APIs, concepts, guides, and more
|
Utilize Streaming Motion Sync Outputs to precisely synchronize digital outputs with specific motion points during streaming movements, such as PT, PVT, or PVAJT, enhancing coordination and control in automated processes.
Streaming motion Sync Outputs allow you to change the state of a digital output(s) at a precise moment in Axis or MultiAxis streaming motion (PT, PVT, or PVAJT).
Streaming motion Sync Outputs make it easy to change any Digital Output state based on a specified point index (or ElementID), commonly used where precise coordination of motion and Digital Output states are required. For example, triggering a strobe at precise positions.
If I make a MovePT() call that contains 5 different motion points. By using StreamingOutputAdd() I can set a specified digital output true/high during the 4th motion point.
Therefore, if our motion points look like:
| 1st | 2nd | 3rd | 4th | 5th | ← motion points | |
|---|---|---|---|---|---|---|
| Position[5] = | {1, | 2, | 4, | 10, | 14} | ← in user counts |
| Times[5] = | {1, | 1, | 1, | 2, | 2} | ← in seconds |
When it gets to position 10 (or the 4th motion point) the specified output will change its state.
Motion points are zero-indexed. Therefore, if you wish to add a sync output on the 1st motion point you should refer to it as "ElementID 0". Moreover, if you wish to add a sync output on the 2nd motion point you should refer to it as "ElementID 1".
Enables or disables streaming outputs for upcoming MovePT/MovePVT calls.
You must call this method before each MovePT/MovePVT call:
Adds a streaming output to fire at a specific motion point index.
This method applies bitmasks to a controller memory address (or sets an IOPoint state) when the motion reaches the specified point index (ElementID).
Clears the streaming output list.
Call this method after each MovePT/MovePVT call returns to prepare for the next call. You can safely call this as soon as the move method returns.
For most Streaming Motion, you can use ElementID to determine where you are within a point set. ElementID 5 = Point 5. Element ID will match the point you provided. Streaming Motion using RSIMotionTypeBESSEL, RSIMotionTypeBSPLINE, and RSIMotionTypeBSPLINE2 involved carrying forward 1 point (Bessel, Bspline2) or 2 points (Bspline). It needs to do this for motion calculations.
Consider a Bspline streaming 100 points per chunk. Two would be carried forward each call. 98 would be associated with the first motion ID. 100 for each of the middle ones. 102 would be associated will the final group. For any middle or final chunk, if you wanted output to happen on the Nth element that you provided, you would add 1 (Bessel and Bspline2) or 2 (Bspline only) respectively to the Output Index. If you wanted an Output to take place on the 99th (Bspline only) or 100th logical user points, you would save it for the next chunk and put it at point 0 or 1.
Streaming outputs accumulate in an internal list across MovePT/MovePVT calls. They are NOT automatically consumed or cleared when MovePT/MovePVT returns. This means if you add an output for one MovePT/MovePVT call and don't clear it, that output record remains in the list and can interfere with subsequent MovePT/MovePVT calls.
For each MovePT/MovePVT call in streaming motion:
When you call StreamingOutputEnableSet(true), all motion sync outputs that you add will get added to the frames which are created by MovePT (only MovePTs that have been called after calling StreamingOutputEnableSet(true)). It does not interfere with motions that have already been queued, loaded, or running.
After you call your move method (MovePT(), etc.), the StreamingOutputs will be copied inside the library and then automatically streamed/buffered to the RMP as frames with motion. You are allowed to clear or disable StreamingOutputs as soon as the move method returns.