Combining Quadrature Outputs

Go To Last Post
8 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello all,

I have two glass scales with quadrature outputs that are mechanically opposed on a milling machine. One is on the quill and the other is on the knee. Moving the quill down is mechanically the same as moving the knee up and vice versa.

What I would like to do is to "sum" their outputs such that if I moved the quill down by 0.1" and left the knee alone, the DRO position reading would be reduced by 0.1". However if I moved the quill down by 0.1" AND the knee down by 0.1", the DRO position would remain unchanged. Conversely, if I moved the quill down by 0.1" and the knee up by 0.1" the DRO position would be reduced by 0.2".

Both scales are from the same manufacturer and have single ended quadrature outputs. Can I accomplish what I want by simply connect the respective phases together in parallel and feeding the combined signal to the DRO? When I say "respective" phases I realize that could be A-A and B-B or A-B and B-A depending on the scale orientation. Will I need some sort of buffer circuit to combine the scale outputs, or do I have to dump in a microprocessor to create a position counter for each scale and combine the positions and then generate a new combined quadrature output?

Thanks,

Tom

Cheers,

Tom

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Is this on a CNC machineor a stand alone DRO?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Tom,

I cannot help you but wanted to say "Welcome back. It has been a long time!"

I guess you have settled back now after your term in China.

Cheers,

Ross

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

tblough wrote:
Will I need some sort of buffer circuit to combine the scale outputs, or do I have to dump in a microprocessor to create a position counter for each scale and combine the positions and then generate a new combined quadrature output?

The micro approach will be the most reliable.

Otherwise, you are not certain of the rest-phase of each source, and a source change-over can give extra counts/creep.

Any source MUX would also struggle to tolerate any edge chatter on the inactive channel, unless you force the hand-over with another signal - even there, you risk missing movements that may happen on the unwatched channel.

What peak edge rate to the channels have ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@Ignoramus - it is a CNC machine but motor position and velocity feedback is from separate encoders on the servo motors. These two scales are used solely for operator feedback.

@Ross - glad to be remembered! The wife and I ended back up the New England area of the US after my stint in China. It was a memorable 4 years, but I'm glad to be back home.

@Who-me - I'm not sure what the actual edge rates are. The scales are 1µ resolution so I'm assuming 25400 edges/in and a max velocity of 200 in/min. That should give an edge rate of about 85KHz.

Right now I'm thinking one of the ATTinys with 6 I/O (2 A/B single ended channels in, one A/B channel out). I'll just run the index pulse from the first channel through since I don't think they are used anyway in the DRO portion.

I don't really need to create position counters as I originally thought. All I really need to do is step/direction for each encoder, sum them, and send the appropriate 2-bit grey code out.

Does that seem reasonable?

Cheers,

Tom

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

tblough wrote:

@Who-me - I'm not sure what the actual edge rates are. The scales are 1µ resolution so I'm assuming 25400 edges/in and a max velocity of 200 in/min. That should give an edge rate of about 85KHz.

Right now I'm thinking one of the ATTinys with 6 I/O (2 A/B single ended channels in, one A/B channel out). I'll just run the index pulse from the first channel through since I don't think they are used anyway in the DRO portion.

I don't really need to create position counters as I originally thought. All I really need to do is step/direction for each encoder, sum them, and send the appropriate 2-bit grey code out.

Does that seem reasonable?

Sounds reasonable, but maybe tight.
You need two state-followers, which merge to give possible outcomes of -2,-1,0,+1,+2 and the output needs to (rarely) do a +2 with 85KHz edge rate, so needs (say) ~5us state time.

That's not a lot of opcodes, even using jump tables for speed.
Maybe a XMega E5, which may even have peripheral help.

An alternative would be a SPLD/CPLD, which would easily handle the ~200Khz (eg ATF1502ASL)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Tom

Seeing as how it is a part of a CNC machine often the machines may offer opportunities to do certain thiings such as You require.

I am runing a LinuxCNC based machine of own fabrication. With LinuxCNC it is possible to define ( within hardware abstraction layer ) additional axes and associated hardware ( read quadrature decoders, adders multipliers etc).
LinuxCNC would then allow You to hook up the additional encoder and perform the sort of arithmetic You are looking to do within the software.
May be Your existing software has something like this functionality.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Who-me wrote:
tblough wrote:

Does that seem reasonable?

Sounds reasonable, but maybe tight.
You need two state-followers, which merge to give possible outcomes of -2,-1,0,+1,+2 and the output needs to (rarely) do a +2 with 85KHz edge rate, so needs (say) ~5us state time.

That's not a lot of opcodes, even using jump tables for speed.
Maybe a XMega E5, which may even have peripheral help.

An alternative would be a SPLD/CPLD, which would easily handle the ~200Khz (eg ATF1502ASL)

I took a quick look at this, as it's an interesting problem.

1) An ATF1502ASL easily manages a Quad-Combine.
It clocks at > 2x the expected peak channel edge rate, and the downstream counters need to cope with CLK rate used.

2) A micro can do this with one Quad table, of 256 entries (4+4 bits) and that table calls one of 5 small toggle-gen-quad output functions that give -2,-1,0,+1,+2.
0 is the most common, and +/-2 are very rare.