andyf Posted March 7, 2017 Share Posted March 7, 2017 I would like to capture position of Motor[1] running on Gate3[0].Chan[0] in hardware upon the presence of an index pulse on Gate3[0].Chan[1]. It seems the position capture settings on the channel only support doing this with flags (CaptFlagChan and CaptFlagSel). Is it possible to do what I want by setting Motor[1].CaptureMode=0 and changing Motor[1].pCaptFlag to point to Gate3[0].Chan[1].Status.a ? Link to comment Share on other sites More sharing options...
Richard Naddaf Posted March 8, 2017 Share Posted March 8, 2017 Yes, you can. You need to redirect Motor[].pEncCtrl, and Motor[].pCaptFlag Link to comment Share on other sites More sharing options...
andyf Posted March 8, 2017 Author Share Posted March 8, 2017 Thanks Richard. After reading more yesterday about the Motor[x] setup elements, I convinced myself those are only for the PMAC software servo to know where to read from hardware registers. But what I need is to configure the encoder gate hardware to latch position on chan[0] when index goes high on chan[1], and put the latched value in the h/w register chan[0].HomeCapt.a. I don't see a way to do this with the Gate3[].Chan[] setup elements. Link to comment Share on other sites More sharing options...
steve.milici Posted March 8, 2017 Share Posted March 8, 2017 The index is fixed to the channel. You could, however, wire the index for channel 1 into a flag for channel 0 (or for that matter to its index) but make sure you make the appropriate hardware settings for 5v flags. Link to comment Share on other sites More sharing options...
andyf Posted March 8, 2017 Author Share Posted March 8, 2017 Thanks Steve. Regarding the flag inputs, I see the manual calls for 5V-24V. Do you think these might work at TTL level, such as 3.3V? Link to comment Share on other sites More sharing options...
andyf Posted March 14, 2017 Author Share Posted March 14, 2017 Just to close this out, I did receive an answer directly via email from tech support as follows: "Not at 3.3V but it would depend on the device. Some TTL drivers will output 5V with a 5V pullup resistor." Link to comment Share on other sites More sharing options...
Recommended Posts