Author Topic: Motor tunning with CSMIO/IP-A (PID) Trouble with encoders  (Read 17262 times)

0 Members and 1 Guest are viewing this topic.

Offline Hood

  • Mach4 Alpha
  • Posts: 25,774
  • Carnoustie, Scotland
    • View Profile
Re: Motor tunning with CSMIO/IP-A (PID) Trouble with encoders
« Reply #10 on: April 12, 2016, 02:17:59 PM »
On glass scales there are normally slotted holes at either end that fixes them to the machine.
Hood

Offline slovenec

  • Active Member
  • Posts: 53
    • View Profile
Re: Motor tunning with CSMIO/IP-A (PID) Trouble with encoders
« Reply #11 on: April 16, 2016, 11:05:44 AM »
Yes that is true, but there is only one problem that the x scale is mounted between the x rails and table, its really hard to aces the scale.
Anyhow now i have anther question as i was ordering the linear scales the seller asked me where would i like to have a reference point for homing.
The reference signal in the middle of the measuring scale or a DCR (distance coded reference)  that should mean that the machine  trawls any ware for 20 mm
to get the reference signal.

 Hood can you tell me which is the best for the CSMIO- Controller?


Many tanks and best regards.

Offline Hood

  • Mach4 Alpha
  • Posts: 25,774
  • Carnoustie, Scotland
    • View Profile
Re: Motor tunning with CSMIO/IP-A (PID) Trouble with encoders
« Reply #12 on: April 16, 2016, 02:14:13 PM »
Probably best with one that has the Index every 20mm or so as it means you can do Index homing and you just need to have the Home Switch positioned close to an Index. If you get one in the centre then you will have to have the home switch close to the centre.
Hood

Offline slovenec

  • Active Member
  • Posts: 53
    • View Profile
Re: Motor tunning with CSMIO/IP-A (PID) Trouble with encoders
« Reply #13 on: April 25, 2016, 12:20:47 PM »
Hello all together. I need some help (again). This week i decided to take some brake of work and work a little on my retrofit. I mounted the new glass scale and started to tune the axis. The first thing that bothered me was
that the axis was moving when the csmio-ipa was in emergency stop. Then i figured out that if i set the DAC offset to 0,18 V the motor/axis stays stil. Is this wright ? Or am doing something wrong ? 
The next step was i had to figure out the steps per revolution so i gave in the pid tuning some small values and with help of the function axis calibration i got 1234.567901 per unit.
And the max speed was 3000 rpm.  The biggest problem is the function auto-tuning in the PID section. I can not get it to work. How long does it take to finis this ? i waited like 10 min and nothing happens ( see my screens on the link at the end of this thread)
Im out of ideas what can i do ? Also how do i know how many Pulses/Rev does my encoder have ? i looked at the manual of my linear scales and i can find the information.

The motors are DC.


https://www.dropbox.com/sh/5zyu75x5e756ku1/AADZO8KOkRyX_a6qm7OCSv-pa?dl=0

Offline Hood

  • Mach4 Alpha
  • Posts: 25,774
  • Carnoustie, Scotland
    • View Profile
Re: Motor tunning with CSMIO/IP-A (PID) Trouble with encoders
« Reply #14 on: April 25, 2016, 01:37:56 PM »
The Axes should never move when in E-Stop, if they are then it suggests you do not have an Enable signal controlled from Mach/CSMIO.

DAC offset is likely needed when CSMIO is in control and Mach out of E-Stop, to get the correct value you just press the DAC Offset button and it should work it out for you instantly.

Normally for steps per unit you would use the encoder counts per rev and divide by the distance travelled but as you have linear scales you will need to know the resolution of the scales.
If for example each graduation of the scale is 0.005mm then you would have 200 per mm, this however would likely need to be multiplied by 4 for quadrature, so 800 would be the value.
To know the pulses per revolution (encoder count) you would need to know the distance your axes travel for one revolution of the screw and then calculate with the graduations of the scale. if for example it was 10mm then your pulses per revolution would be 8000 (10 x 800)

AutoTuning should start instantly and not take too long, likely your steps per unit being wrong are the problem there.

Hood

Offline slovenec

  • Active Member
  • Posts: 53
    • View Profile
Re: Motor tunning with CSMIO/IP-A (PID) Trouble with encoders
« Reply #15 on: April 26, 2016, 03:32:49 AM »
Okay the resolution is 0.5┬Ám. I was searching over the internet and i do not understand how to calculate this.
How did you calculate this ?

Offline Hood

  • Mach4 Alpha
  • Posts: 25,774
  • Carnoustie, Scotland
    • View Profile
Re: Motor tunning with CSMIO/IP-A (PID) Trouble with encoders
« Reply #16 on: April 26, 2016, 03:39:12 AM »
0.5um  is 0.005mm so it would likely be as I mentioned above.
Hood

Offline slovenec

  • Active Member
  • Posts: 53
    • View Profile
Re: Motor tunning with CSMIO/IP-A (PID) Trouble with encoders
« Reply #17 on: April 26, 2016, 05:59:19 AM »
okay feel so stupid now  :-[. So if i mark at the face of the spindle and than jog  so long that the mark makes a  360 degrees turn and measure the length of traveling i will get the distance that i have to multiple with steps per unit.  is this right ?


Thanks Hood.


Offline slovenec

  • Active Member
  • Posts: 53
    • View Profile
Re: Motor tunning with CSMIO/IP-A (PID) Trouble with encoders
« Reply #18 on: April 26, 2016, 09:57:08 AM »
Okay i must be doing something wrong. I can not tune this. Here are my steps.
At first i set up the steps per : 800

Than i marked on the end of the spindle a line to se when does it turn 360 degrees. a the same time i was measuring how far does the machine trawl. (see pictures)
And i measured the distance 5.08 mm therefore the encoder count 5,08 x 800 is 4064. I stil can not complete autotunning :(


measurement setup : https://www.dropbox.com/sh/5zyu75x5e756ku1/AADZO8KOkRyX_a6qm7OCSv-pa?dl=0

Best regards

Offline Hood

  • Mach4 Alpha
  • Posts: 25,774
  • Carnoustie, Scotland
    • View Profile
Re: Motor tunning with CSMIO/IP-A (PID) Trouble with encoders
« Reply #19 on: April 26, 2016, 10:19:28 AM »
Try Steps per unit at 200 and Encoder at 1016.
Really though it should have worked with the numbers above, just moved 4x further.

In the Auto Tuning page, how many counts do you see for one rev of the ballscrew if you turn it manually?

Hood