Hello Guest it is March 28, 2024, 08:18:53 AM

Author Topic: 56U incorrect motions  (Read 4572 times)

0 Members and 1 Guest are viewing this topic.

56U incorrect motions
« on: March 22, 2015, 06:13:16 PM »
I've got a 56U connected as an external 4 axis controlller using the circuit in the pokeys manual feeding into a G540.  when I give it a command on the MDI line to go positive on any of the 3 axis, it goes the correct distance.  If I give it the same command but make it negative, it only goes half the distance.  I'm running mach Version R3.043.067 and the pokeys plug in 1.0.0.1.  I have mach set for 45000Hz and the max step for any axis is 12000. I am using Windows 7 64bit on an HP pavilion G series laptop if that matters any. I have double and triple checked my wiring to make sure it is correct.  Has anyone seen this before?  Thanks in advance.
Re: 56U incorrect motions
« Reply #1 on: March 23, 2015, 12:03:45 AM »
So here's a brief update...  I tried a different computer and was getting the same issues.  I then disconnected my G540 from the external 4 axis circuit and connected some Chinese drives.  They moved exactly the same distance in both plus and minus directions.  I think the issue is the step and direction minimum pulse widths needing to be 2us for the gecko and the pokey external controller cannot supply that consistently.  Anyone have any thoughts on this?

Offline NeoTO

*
  •  504 504
    • View Profile
    • PoLabs
Re: 56U incorrect motions
« Reply #2 on: March 23, 2015, 01:04:43 AM »
Do you have any circuit between the PoKeys and your stepper drivers? If you have a differential (- and + signals) input at your driver, check that you have the correct polarity.
What firmware version do you have installed on your PoKeys device?
www.poscope.com home of PoKeys USB HID, IO, USB, Ethernet controler and PoScope USB PC oscilloscope
Re: 56U incorrect motions
« Reply #3 on: March 23, 2015, 11:30:04 AM »
I built the circuit that is in the back of the pokeys motion controller pdf.  It works great with my cheaper drives that have the differential inputs but doesn't work with the Gecko G540.  Unfortunately I'm at work so I can't check the firmware version but last night I downloaded and updated all the pokeys software, including the firmware, just to make sure.  My next step is to connect it to another G540 I have available to me to see if it is just my G540.

Offline NeoTO

*
  •  504 504
    • View Profile
    • PoLabs
Re: 56U incorrect motions
« Reply #4 on: March 23, 2015, 02:19:47 PM »
The PoKeys device outputs fixed pulses of 20 us when internal motion generator is used and variable length pulses when external motion controller is used - with the pulse width equal to 1/(2*f), where f is frequency of the requested pulses. At 125 kHz (maximum frequency supported) the pulses are 4 us wide, while at lower frequencies, the pulses are wider (longer).

Make sure that you connect STEP and DIR pulses of correct polarity.
« Last Edit: March 23, 2015, 02:24:44 PM by NeoTO »
www.poscope.com home of PoKeys USB HID, IO, USB, Ethernet controler and PoScope USB PC oscilloscope
Re: 56U incorrect motions
« Reply #5 on: March 24, 2015, 11:26:08 PM »
I was reading up on the G540 and it has to have the direction pin set 200ns before the step rising edge and hold for 200ns after the rising edge. I haven't got it on an oscilloscope yet but I think the 74hct595 sets the step and direction relatively at the same time plus or minus a few nanoseconds. This is why it is giving me half the distance moving one direction and full distance moving in the other.  I'd like to hear from anyone else that has tried to connect to a G540 using the external motion controller to see if they have had any luck.  Again, thanks in advance.

Offline NeoTO

*
  •  504 504
    • View Profile
    • PoLabs
Re: 56U incorrect motions
« Reply #6 on: March 25, 2015, 04:08:55 PM »
As I noted previously, check that you are using the correct step and dir signal polarity.
PoKeys generates motion in timeslots as it is also done by Mach3. Each timeslot (1 ms long) begins with DIR signal being set, then the step pulses follow in such a way that they are 'right-aligned'. To explain this: if one pulse is to be generated in the timeslot:
a) PoKeys internal pulse generator: 20 us before the timeslot end (980 us after setting the DIR signal), the step pulse will start and will be reset with the next timeslot
b) External pulse generator: step pulse will start in the middle of the timeslot and end with the next timeslot
Similarly, if 2 pulses are to be generated:
a) first pulse will be generated approx. in the middle of the timeslot and one at the end of the timeslot
b) first pulse will be generated at 25-50% and the second at 75-100% of the timeslot
And so on... As you can see, there is plenty of time (4us at the maximum speed) between DIR change and STEP pulse start - unless the STEP pulse polarity is inverted. In this case, the driver will interpret the pulse inverted and what should be the end of the pulse will be interpreted as the start of it. Since STEP and DIR outputs are refreshed at the same time in case of external pulse generators, there is no delay between STEP pulse being reset and DIR signal being set or cleared.
www.poscope.com home of PoKeys USB HID, IO, USB, Ethernet controler and PoScope USB PC oscilloscope
Re: 56U incorrect motions
« Reply #7 on: March 26, 2015, 09:00:33 AM »
So how can I change the step and direction polarity to test?  The Gecko G540 is a parallel cable drive that does not allow for this.  Is there a spot in the plugin that I can do this that I missed?  Will I need to build an invertor circuit?

Offline NeoTO

*
  •  504 504
    • View Profile
    • PoLabs
Re: 56U incorrect motions
« Reply #8 on: March 26, 2015, 09:45:32 AM »
Did you put any opto-couplers between the pulse generator (from our manual) and the Gecko drive?
It all sounds like a hardware fault of some kind.
www.poscope.com home of PoKeys USB HID, IO, USB, Ethernet controler and PoScope USB PC oscilloscope
Re: 56U incorrect motions
« Reply #9 on: March 27, 2015, 08:44:48 AM »
That I did not. I was under the impression that the g540 had opto couplers built into it. I'll have to verify this. I'll get some on order to test.