Skip to main content
Submitted by kcoul on Mon, 05/29/2017 - 12:02

I'm trying to find a way to have my RIO operate in lockstep with a DMC sequence of LI instructions.
Currently my software is polling the DMC stepper to determine when to execute the RIO SB/CB commands, but I'd like to do better if I can.

Is there any way I can put the DMC/RIO into a Master/Slave configuration, and buffer a single set of mixed instructions on the DMC, forwarding the CB and SB instructions from the DMC to the RIO at exactly the right moment (when the previous LI command in the interleaved sequence has just completed?)

My understanding is that DMC buffered sequences can only contain motion instructions, but at the same time I am sure that coordinating extremely precise timing of DMC and RIO instructions is a common problem, so I am wondering what is the best practice in such instances.

If there is any lag in my DMC stepper polling loop, the RIO commands get issued a bit too late.

Comments 2

KushalP on 05/30/2017 - 17:16

Hi kcoul,

The segment buffers for the Contour, Linear Interpolation, and PVT mode can hold the data for each respective mode. You cannot place other DMC commands as part of the segment buffers, only segment data. You could have a dedicated thread on the DMC looping to see where in the LI sequence the motor is at. Based on the LI position you could issue SB/CB commands from the DMC thread to the RIO. Are you trying to just coordinate the SB/CB commands directly to the position of a stepper motor?

kcoul on 06/05/2017 - 14:00

Yes, that is exactly right. I am continuously filling up the segment buffers with LI commands and want to get the timing right on these SB/CB commands to coincide with where the LI commands are at in their sequence. My intention is to have micron-level precision as if I do the same queries with my host software, I am worried there is inevitably going to be some latency. So what you are advising sounds appropriate for me.

If there is any particular documentation or similar regarding spinning up a thread on the DMC to be used in this way to control the RIO you can point me at, it'd be much appreciated.