Machsupport Forum
Third party software and hardware support forums. => CS-Lab => Topic started by: rufan on June 05, 2014, 03:11:52 PM
-
In the past when I have no ENC installed I had a index wired to an input.
I used this Index signal to align my VFD spindle motor.
But now I have the ENC installed, and don't know how to get the Index working.
Is there a way in the software to link "encoder 1 - IN I+" to the Index signal.
Thanks,
-
How did you do it previously?
Hood
-
Previously I had a sensor mounted on the spindle. That gives me an index signal.
I wrote a script to turn the spindle at slow speed until index signal is high and then apply a break and stop motor.
Now I have mounted an incremental encoder witch signals going to the ENC module.
I was assuming that the index in Mach3 was still working with the ENC module, linked internally by software.
-
You may be able to do similar with the encoder position or angle reading via VB, see here
http://www.cs-lab.eu/en/index.php?m=article&show&aid=128&uinfo=Digital_and_analog_IOs__configuration__its_easy#ENC
Hood
-
This is just what I was looking for.
I have made a test macro to align my VFD spindle.
But the loop function is too slow to detect if angle is at 0 degree.
Is there any other way to achieve this.
Test Macro:
SetSpinSpeed(100) 'Set Spindle Speed
ActivateSignal(OUTPUT6) 'Spindle Enable
Angle=GetInput(84) 'Get Spindle Angle from ENC
If Angle > 0 then
DoSpinCW() 'Turn Spindle CW
Do 'Enter Loop
Angle=GetInput(84) 'Get Spindle Angle from ENC
If Angle = 0 then
DoSpinStop()
Exit Do
End if
Loop
End If
-
Maybe try using a range for the angle rather than just zero, you can then likely fine tune the range to get the desired stopping position.
Hood
-
Hood
I also done what you said, I give it a margin of 20 degree, but it takes a couple of turns before stopping.
And does not stop always on the same spot.
I have some other options to control the driver.
It is actually not a VFD but a DC driver (Lenze 4900) controlling a DC motor.
Now I control it with 0-10V and direction.
- Driver can accept -10 to +10V or A + B complementary waveform.
So it will be possible to control it with STEP/DIR.
I was looking for the YAPSC:10 but can't find it to buy.
And converting STEP/DIR to A + B complementary waveform seems to be hard because A & B must be 90d shifted.