Delta Tau Forums
Format for bipolar absolute sensor read at reset - Printable Version

+- Delta Tau Forums (
+-- Forum: Delta Tau Data Systems (
+--- Forum: Power PMAC (
+--- Thread: Format for bipolar absolute sensor read at reset (/showthread.php?tid=2701)

Format for bipolar absolute sensor read at reset - zros - 06-07-2018

I have a linear motor with an analog LVDT sensor that provides an absolute (bi-polar, +/- 10 volt) value of the motor position. I am setting this up so that on power-on, we read the position via an ACC28E (16 bit ADC).

The issue is that the returned value does not compensate for the 32768 count offset that the ACC28 provides on a raw read of bi-polar data. (the ADC conversion is: counts out = (2^16 counts/20 volts)*volts_in + 32768 cts).

So I have set the motor[x].homeoffset to account for this bias (effectively 10 volts * LVDT sensitivity). Unfortunately, this does not affect the motor[x].pos value or the motor[x].actpos values, only the reported position (e.g. #xp).

In my case, the LVDT_sensitivity is 70 um/volt. So I placed motor[x].homeoffset = 700 and reset. Based on the relative position of the LVDT to the motor and with no power to the motor, this results in a motor[x].pos = 258, motor[x].actpos = 258, #xp reports -442. -442 corresponds to the true position of the motor while pos and actpos do not.

Maybe I'm missing something, but the servo loop following error is based on the difference between the desired position and the actual position, both of which do not represent the true position of the motor. I would like to avoid dealing with this as an offset in either the motor[x].CompPos or motor[x].MasterPos registers. My aversion is for in the future when someone else tries to understand why we have a 'magic' number in one of the these registers.

What is the best way to incorporate the effects of the 10 volt offset in my motor position? I've thought about cascading ECT entries to make the offset, but I'm not sure if that would be a preferred method or if there is some other superior solution.

Set up:
motor[x].PowerOnMode = 4
motor[x].pAbsPos = ACC28E[1].ADCuDAta[0].a
motor[x].absPosFormat = $1010 // read bits 16-31 of 32 bit register as unsigned binary, I also tried reading a signed binary, but I saw no difference as I believe this setting is only determining if the MSb is a sign bit or not and my motor motion never exceeded what was required to flip the MSb.

Thanks for any suggestions.

RE: Format for bipolar absolute sensor read at reset - Gregs - 06-18-2018

I believe you could achieve what you want by setting Motor[x].PosReportMode=1 and setting Motor[x].HomeOffset for the right reference setting.