Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Encoder Conversion Table and Endat problems
Hi all
I am turning on in these days a new system with this setup:
- power brick LV,
- Endat 2.2 encoder multiturn: 23 bit/revolution + 12 bit absolute rev, for a total of 35 data bits

The configuration for the encoder should be like:
- # bit used: 23
- result unit per LSB: 9.5367e-004 (8000 um screw / 2^23 bit)
- source address: PowerBrick[0].Chan[0].SerialEncDataA.a

I have some problems on the Encoder Conversion Table:
1) If I use the window under "Configure -> Encoder conversion table" and enter the variables as per previous point, I constantly get the error "ECT Setup: Download entry 1 failed. Check your parameters and try again:7/22/2014 :10:32 AM" when downloading the configuration. However, despite the error, the configuration is downloaded because I can see the position change of the correct amount when I turn the encoder by hand. Moreover, if I look at the same variables in the window under "Configure -> Setup Variables", these are changed according to what I set on the other window. What is the origin of this error?

2) When I issue the SAVE command, the encoder conversion table is not saved (other variables are properly saved): at the reboot, I get the default address (PowerBrick[0].Chan[0].ServoCapt.a), method and Scale Factor set on the ECT. Is that because of the error on the previous point?

(I have a problem also on the Absolute value reading, but I will put this in a separate thread).


The first issue sounds like an IDE bug.

The second issue is unrelated. You need to add any modifications from default into files that are part of your project system, such as in "global definitions.pmh" under PMAC Script Language and Global Includes. You can create an "encoder conversion table.pmh" file in this folder and add any changes made to your EncTable[n]. structures.

To see any changes made from default settings, you can right-click on the Configuration Folder and click on Generate Configuration File. Name it whatever you want, and then the IDE will list everything that has been changed. You can copy what you want out of there into your various other files.

Only that which has been added to the project system and downloaded to PPMAC can be retained through a SAVE.
I think the settings you want for this using Charles' strategy are as follows:

EncTable[n].type=1 // Single-register read
EncTable[n].index1=9 // Shift left 9 bits for proper rollover
EncTable[n].index2=0 // No shift right required
EncTable[n].ScaleFactor=1/512 // 1/2^9 for output in encoder LSBs

Other entry settings are factory default.
Hi Charles and Curt

(07-22-2014, 04:41 PM)CharlesP Wrote: The first issue sounds like an IDE bug.
Only that which has been added to the project system and downloaded to PPMAC can be retained through a SAVE.

ok, understood: when I downloaded at first the ECT there was no project active on the IDE. Now that there a project, everything is working fine.

Sorry for the newbie question, I didn't get that a project loaded was mandatory.


Forum Jump:

Users browsing this thread: 1 Guest(s)