PDA

View Full Version : Help connecting servos to breakout board Mach3



Agathon
29-07-2017, 09:12 PM
I'm beginning to wish I hadn't started this...

I have Omron R88D-U servo drivers and a R88D-U motor to test it all with. I've connected the motor and the encoder. However, I can't get into the servo driver software as for some reason the OMNUC interface software and the Yaskawa software doesn't like my USB-RS232 port and won't connect with the servo drive.

Anyway, I'd like to try running the servo driver from my BOB using the current settings, but I can't get to the bottom of what I need to connect. It would seem logical that I only need four or five wires to give the driver an enable signal and step and direction pulse, but I'm buggered if I can see exactly what I need to do:grey:

Attached are the pin-outs from the driver interface plug.
2240722408

Agathon
30-07-2017, 01:12 AM
Having looked at this a bit more, am I right in thinking that 1 and 3 relate to step and direction on the BOB and that 2 and 4 will be ground? What about enable?

I realise the second page I attached was not relevant.

Boyan Silyavski
30-07-2017, 06:31 AM
Did you buy the proper Com cable as i suggested in the other thread? Dig in manual, at the section of initial startup there is said which type of COM cable you need.


Do not run servos using "current settings" . Its like driving blind, or trying to... Just follow the right steps.

Agathon
30-07-2017, 11:49 AM
Did you buy the proper Com cable as i suggested in the other thread? Dig in manual, at the section of initial startup there is said which type of COM cable you need.


Do not run servos using "current settings" . Its like driving blind, or trying to... Just follow the right steps.

Thanks for the reply Boyan. Do you mean the computer to driver programming cable (driver to computer) or the driver to BOB? The former is an RS232 DB9, I have the correct plug for the latter (control IO - cn1) - a manufacturers cable wouldn't be any better since I just need to connect the BOB to the correct four or five pins.

Unfortunately, I don't know the "right steps" and can't get my computer to talk to the driver! At the moment, I'm not worried about "flying blind" I just want to prove that the drivers and servo work.

EddyCurrent
30-07-2017, 03:53 PM
Anything here ? https://forum.linuxcnc.org/38-general-linuxcnc-questions/28170-yaskawa-servomotors

https://en.industryarena.com/forum/showthread.php?t=157229&

Have you searched for a generic answer to using servos with Mach3 ?

m_c
30-07-2017, 09:17 PM
You really need to know how the drives are set before you can test them.
However a quick look at those pinouts, and if you apply all the required power inputs, activating the RUN pin should at least get the servo to lock, however that depends on the related settings having not been changed from the default where activating the pin enables the servo.

Agathon
30-07-2017, 11:57 PM
Anything here ? https://forum.linuxcnc.org/38-general-linuxcnc-questions/28170-yaskawa-servomotors

https://en.industryarena.com/forum/showthread.php?t=157229&

Have you searched for a generic answer to using servos with Mach3 ?

Many thanks for that Eddy. The first link has already proved useful. I'm chipping away at the problem.

Agathon
31-07-2017, 12:02 AM
You really need to know how the drives are set before you can test them.
However a quick look at those pinouts, and if you apply all the required power inputs, activating the RUN pin should at least get the servo to lock, however that depends on the related settings having not been changed from the default where activating the pin enables the servo.

Thanks, I see what you mean, there are so many parameters that could have been changed. Having looked through the manual a little further I think I need to short pin 34 and 35 before the drive will do anything at all.

It's critical that I get the software interface to work - I think that there's something funny going on with the USB-RS232 converter I have, the Yaskawa software seems to think it's a RS-422 port.

I just need to keep buggering-on buggering-on until I get there.

Boyan Silyavski
31-07-2017, 05:19 AM
I think that there's something funny going on with the USB-RS232 converter I have, the Yaskawa software seems to think it's a RS-422 port.

I just need to keep buggering-on buggering-on until I get there.


you need to keep on eliminating reasons and i can tell you straight away that i would never use USB-RS232 converter for connecting to servos, or anything. . You need a normal. PC with a normal PCI port and an adapter there. Or even better, a PC with a com port that you could control from bios.


Standard RS-232C RS-422A

specifications
Communications
method
Asynchronous (ASYNC)
Baud rate 2,400 bps
Start bits 1 bit
Data 8 bits
Parity None
Stop bits 1 bit

That above is from your servo drive manual. If baud rate is not set at Com port same same, communication will NOT ever happen



And most of all check that manual https://www.fa.omron.com.cn/data_pdf/closed/mnu/i513-e1-02_r88d-u.pdf?id=68 for the proper connection to the drives from the PC side . Check your cabling if is right.


So in other words from page 1-7 seems you need Null Modem Cable https://www.decisivetactics.com/support/view?article=crossover-or-null-modem-vs-straight-through-serial-cable


22409

Agathon
31-07-2017, 10:29 AM
you need to keep on eliminating reasons and i can tell you straight away that i would never use USB-RS232 converter for connecting to servos, or anything. . You need a normal. PC with a normal PCI port and an adapter there. Or even better, a PC with a com port that you could control from bios.


Standard RS-232C RS-422A

specifications
Communications
method
Asynchronous (ASYNC)
Baud rate 2,400 bps
Start bits 1 bit
Data 8 bits
Parity None
Stop bits 1 bit

That above is from your servo drive manual. If baud rate is not set at Com port same same, communication will NOT ever happen



And most of all check that manual https://www.fa.omron.com.cn/data_pdf/closed/mnu/i513-e1-02_r88d-u.pdf?id=68 for the proper connection to the drives from the PC side . Check your cabling if is right.


So in other words from page 1-7 seems you need Null Modem Cable https://www.decisivetactics.com/support/view?article=crossover-or-null-modem-vs-straight-through-serial-cable


22409

Many thanks Boyan - that's really helpful. I'll check all the above. I do have a PC with a RS-232 port and have tried connecting with that, but I didn't check any of the settings. I'll check the cable too.

Clive S
31-07-2017, 11:03 AM
I do have a PC with a RS-232 port and have tried connecting with that, but I didn't check any of the settings. I'll check the cable too.you will have to make sure the baud rate is the same at both ends also start and stop bits are correct, the handshaking might be xon/xoff (ie software handshaking). You might also have to swap pins 2 and 3 over at one end this depends if the Pc is setup as DTE or DCE. one good thing about the com port is that it is hard to break

Agathon
31-07-2017, 11:10 AM
you will have to make sure the baud rate is the same at both ends also start and stop bits are correct, the handshaking might be xon/xoff (ie software handshaking). You might also have to swap pins 2 and 3 over at one end this depends if the Pc is setup as DTE or DCE. one good thing about the com port is that it is hard to break

Thanks Clive, I'll take a look at all the things Boyan mentioned. I'll check the PC DTE or DCE settings - I'll buy a cable that I can alter the connections on.

Agathon
31-07-2017, 12:52 PM
you need to keep on eliminating reasons and i can tell you straight away that i would never use USB-RS232 converter for connecting to servos, or anything. . You need a normal. PC with a normal PCI port and an adapter there. Or even better, a PC with a com port that you could control from bios.


Standard RS-232C RS-422A

specifications
Communications
method
Asynchronous (ASYNC)
Baud rate 2,400 bps
Start bits 1 bit
Data 8 bits
Parity None
Stop bits 1 bit

That above is from your servo drive manual. If baud rate is not set at Com port same same, communication will NOT ever happen



And most of all check that manual https://www.fa.omron.com.cn/data_pdf/closed/mnu/i513-e1-02_r88d-u.pdf?id=68 for the proper connection to the drives from the PC side . Check your cabling if is right.


So in other words from page 1-7 seems you need Null Modem Cable https://www.decisivetactics.com/support/view?article=crossover-or-null-modem-vs-straight-through-serial-cable


22409

Looking at that drawing and the info you've sent on null modem cables, it's not a straight RS232 cross-over as it's computer pin 2 to driver pin 2 and computer 3 to driver 4. I'll have to make a cable.

Will post and let you know how I get on - thanks again.

Agathon
31-07-2017, 07:33 PM
you need to keep on eliminating reasons and i can tell you straight away that i would never use USB-RS232 converter for connecting to servos, or anything. . You need a normal. PC with a normal PCI port and an adapter there. Or even better, a PC with a com port that you could control from bios.


Standard RS-232C RS-422A

specifications
Communications
method
Asynchronous (ASYNC)
Baud rate 2,400 bps
Start bits 1 bit
Data 8 bits
Parity None
Stop bits 1 bit

That above is from your servo drive manual. If baud rate is not set at Com port same same, communication will NOT ever happen



And most of all check that manual https://www.fa.omron.com.cn/data_pdf/closed/mnu/i513-e1-02_r88d-u.pdf?id=68 for the proper connection to the drives from the PC side . Check your cabling if is right.


So in other words from page 1-7 seems you need Null Modem Cable https://www.decisivetactics.com/support/view?article=crossover-or-null-modem-vs-straight-through-serial-cable


22409

OK, got the software to talk to the driver thanks to your diagram Boyan - many thanks. USB-RS232 working well - software thinks it's 422, but I'm not splitting hairs.

Do you have a source for the manual? - it's not the same as the two I already have and may contain more detail. The manuals I have don't show pin numbers for the CN3 port for instance.

Boyan Silyavski
31-07-2017, 09:17 PM
OK, got the software to talk to the driver thanks to your diagram Boyan - many thanks. USB-RS232 working well - software thinks it's 422, but I'm not splitting hairs.

Do you have a source for the manual? - it's not the same as the two I already have and may contain more detail. The manuals I have don't show pin numbers for the CN3 port for instance.

In your manual when you read it carefully here and there is mentioned about some sub manuals, like the one i linked to. Or just do a careful straight google search for the thing you have not clear. i have 2 manuals for my Samsung servos, and they are slightly different.

Agathon
01-08-2017, 01:39 AM
Many thanks for everyone's input. Managed to get the software talking to the driver and to run the motor. Software works very nicely. Loads of torque from tiny little motor - very impressive. I think my Leadshine stepper drivers may be up for sale shortly! Next step to configure the parameters and get Mach3 running them.

m_c
01-08-2017, 11:11 AM
As far as configuring Mach3 goes, as it's a step/dir servo, it's just the same as configuring a stepper. Set the correct step/distance figure, maximum speed, and fiddle with acceleration.

Agathon
07-08-2017, 05:27 PM
Well, I'm hitting the buffers again trying to get Mach3 to control the servo system.

Having got the Yaskawa software to power up the motor and drive it at various speeds it seems that fundamentally the drive and motor are sound. However, the drive does do something weird. Having set the parameters all back to factory settings I then set the Cn-01 bit 0 to 1, which switches the motor on at start up without any external commands. All good except the motor rotates at around 1-2rpm. Changing the direction parameter changes the direction of rotation. I can't see what command is causing the rotation. If Cn01 bit 0 is changed back to 0 and the motor jog test performed the motor remains locked in position until commanded to run forward or reverse. I did wonder if it was interference on the encoder cable (the temporary set up is using shielded but not twisted pair cable), but this doesn't fit with the jog test results. Both the drivers I have do the same thing.

I found the following instructions on another forum:


This is just for the SGD and SGDA type P Yaskawa Servos to get the very minimum wiring to give Pulse and Direction control. The only signals you have to have on 1CN are pins 1, 2, 3 & 4. To use this minimalist configuration, set parameter Cn-01 to 0000 0000 1010 1101 or AD hex. Set Cn-02 to all zeros, or 00 hex. This means the drive will power up in the on state and won't be looking for or caring about overtravel switches. To clear a fault, power down and back up.

Now tie 1CN pins 2 & 4 to common (0 Volts) of the printer port (PP) or breakout board (BOB) and pin 1 to the step output of the PP or BOB through (in series with) a 180 ohm 1/2 watt resistor. 1CN pin 3 ties through a 180 ohm resistor to the direction output.

Apart from the fact that the parameter instructions don't quite make sense, if I use either of the Cn-1 settings which switch the motor on at start up, a Mach3 command to rotate in the forward direction causes the motor to run at 2480 rpm (or thereabouts) and a reverse command causes the motor to stop, well, almost stop - it does the 1-2rpm thing instead.

One other interesting observation: if power to the breakout board is switched off Mach3 commands still do the same as above but at 1109 rpm and 1rpm

I have to say that I've never come across a more opaque manual - I've read and read and still can't fathom what parameters need to be changed to get sensible functioning.

Agathon
07-08-2017, 05:30 PM
Actually looking at that quotation again it does make sense, it's just not very clear that they are referring to the bit settings on all the zeros.

m_c
07-08-2017, 05:38 PM
The drives are definitely step/dir input, and not analogue?

The creeping sounds just like what an analogue drive would do if the servo loop wasn't active, and the residual voltage was causing drifting. It would also tie in with the moving at speed, or creeping, as the direction pin goes from near 0V to whatever voltage it puts out at high (3.3-5v?).

Agathon
07-08-2017, 05:59 PM
Actually looking at that quotation again it does make sense, it's just not very clear that they are referring to the bit settings on all the zeros.

Er, the settings are backwards, but perhaps the author was using different software. The result is still the same.

Agathon
07-08-2017, 06:14 PM
The drives are definitely step/dir input, and not analogue?

The creeping sounds just like what an analogue drive would do if the servo loop wasn't active, and the residual voltage was causing drifting. It would also tie in with the moving at speed, or creeping, as the direction pin goes from near 0V to whatever voltage it puts out at high (3.3-5v?).

To be honest I'm not sure. The manual seems to suggest they are step/dir compatible and, to my knowledge, no other forum posts dealing with these drives have mentioned it. The sheet from the manual that I posted seems to state that it will accept pulse and direction.

Agathon
07-08-2017, 06:15 PM
Sorry see attachment.

22483

Agathon
07-08-2017, 06:25 PM
This is what the manual says in the introduction:


Control Functions:
Any one of the following 4 control modes can be selected in the parameter settings.


S Position Control (Factory Setting)

Controls the position and speed of the Servomotor very precisely with pulse-train input signals. Any one of the following 3 pulse trains can be selected: forward/reverse pulses, feed pulses/ directional signals, or 90 degree differential phase (A/B phases) signals.

m_c
07-08-2017, 06:39 PM
I'm going to ask a simple question, you have compared the full model number on the drive to the manual?
It's not got any additional codes that could signify it's a slightly different model?

I've just searched for Omron R88D-U Analog, and it's thrown up a link to an analogue input version of the drive...

Agathon
07-08-2017, 07:22 PM
I'm going to ask a simple question, you have compared the full model number on the drive to the manual?
It's not got any additional codes that could signify it's a slightly different model?

I've just searched for Omron R88D-U Analog, and it's thrown up a link to an analogue input version of the drive...

Ouch - I think this has just turned into an expensive experiment. The model number is R88D-UA08V. The A is for analogue. Bollox.

m_c
07-08-2017, 09:22 PM
At least you know what the problem is now!

Agathon
08-08-2017, 12:05 AM
At least you know what the problem is now!

Well, it's not all negative. It's a steep learning curve, but I'm pretty sure the 200W servos will drive the Fehlmann table without too much trouble. There seem to be plenty of Omron/Yaskawa drivers about and I'll think hard about a use for the three analogue drivers I have - they'd make an excellent power feed for a small mill.

It is a lesson in there not being any free lunches and if something is a bargain price then there's a reason. I shall embark on the next purchase with the question of analogue and digital firmly planted in my consciousness!

Agathon
08-08-2017, 11:47 AM
I know I'm going to regret asking this as I'm sure it will be more complex and expensive than just shoving these drives back on fleabay, but...

A brief and desperate search leads me to believe that it is possible to control analogue servo drives for position by converting step and direction to analogue signals. Anyone have any knowledge/experience?

This chap appears to be doing the very thing:

https://youtu.be/kQV5dGQltpU

m_c
08-08-2017, 07:48 PM
I know I'm going to regret asking this as I'm sure it will be more complex and expensive than just shoving these drives back on fleabay, but...

A brief and desperate search leads me to believe that it is possible to control analogue servo drives for position by converting step and direction to analogue signals. Anyone have any knowledge/experience?

This chap appears to be doing the very thing:

https://youtu.be/kQV5dGQltpU

if you have a suitable spare galil lying around, then its a very valid option, but galil boards are not that cheap.
I've seen step/dir to +/-10v interfaces mentioned, but can't remember ever seeing one that's commercially available.

If you did want to run analogue servos, a CS-Lab Csmio/ip-a, Dynomotion Kflop+Kanalog, or whatever the Mesa analogue output board is, would be far better options.

Agathon
09-08-2017, 12:40 AM
if you have a suitable spare galil lying around, then its a very valid option, but galil boards are not that cheap.
I've seen step/dir to +/-10v interfaces mentioned, but can't remember ever seeing one that's commercially available.

If you did want to run analogue servos, a CS-Lab Csmio/ip-a, Dynomotion Kflop+Kanalog, or whatever the Mesa analogue output board is, would be far better options.

Looks like this will do it, but I'd have to build the rest of the circuit (probably too much for me) - http://www.uhu-servo.de/servo_en/index.htm

This looks like a ready made solution but with shipping etc it's probably cheaper to ditch the drives and start again - http://www.rutex.com/us/index.php?productID=126

Ger21
09-08-2017, 02:37 AM
I've seen step/dir to +/-10v interfaces mentioned, but can't remember ever seeing one that's commercially available.

http://032c30a.netsolhost.com/catalog/product_info.php/cPath/36/products_id/56

$90 each.

And here's an open source design:
http://www.cnczone.com/forums/open-source-controller-boards/74532-yapsc-10v-glue-step-dir-10v-servo.html

Ger21
09-08-2017, 02:40 AM
I didn't know Rutex was still in business. They were pretty popular 10-12 years ago, but haven't really heard of anyone using them since then.

CNC Drive is working on an analog controller for UCCNC, but it could be months away, if not longer. But I'd expect it to be the cheapest option, if and when it gets released.

Agathon
09-08-2017, 02:58 PM
http://032c30a.netsolhost.com/catalog/product_info.php/cPath/36/products_id/56

$90 each.

And here's an open source design:
http://www.cnczone.com/forums/open-source-controller-boards/74532-yapsc-10v-glue-step-dir-10v-servo.html


I didn't know Rutex was still in business. They were pretty popular 10-12 years ago, but haven't really heard of anyone using them since then.

CNC Drive is working on an analog controller for UCCNC, but it could be months away, if not longer. But I'd expect it to be the cheapest option, if and when it gets released.

Many thanks for the links Gerry. The Viper Servo board looks good and is reasonably priced. The problem is getting anything sent from the US seems to be so expensive - three boards 65 bucks. Cheaper to look for replacement drives.

I like the YASP thing a lot, but apart from that to the video none of the other links work.

It would be great if CNC Drive produce something soon - I'll write to them.

David

hanermo2
02-09-2017, 03:53 PM
Highly recommend csmip-ip-s, and maybe modern import step/dir servo drives instead.
Or use the drives you have in step/dir mode with the csmio-ip-s.
Very easy, fast, good, done.

I have seen lots of threads about analogue-> s/d conversions.
Past 14+ years.
And some few really clever people got them to work really well (Mark V. was one, 8+ years ago).
Via custom electronics they made (cheap, but I could not design them), lowpass / bandpass filters, tuning, etc.

Look;
You have a bob .. a converter .. a drive .. tuning .. motor.
Thats 4 pieces of kit in a row, and no easy way to detect noise, hum, non-linear response, accuracy etc. etc.

Alternatively, a csmio-ip-a would drive them directly.
And one of the smartest most capable guys I know uses it with great results. Real VMC, with auto toolchanger and analogue servos.
He also has an csmio-ip-s like mine, on a small lathe.

I am pretty sure the drives You have can work extremely well.
Could.

But I also think that You will suffer and struggle to get them to work, and the results are likely to be far from close to optimal - vs what they could do technically.
Usually, bobs have electronic problems of all sorts.
Limited speeds, responses, noise, non-linearity, functioning etc etc. and these mostly only appear at high speeds aka servos.

After trying 12+ combos for 10+ years, I ditched all that and imported new ac servos myself and cslabs controllers.
Right choice.

You can get new small 400W servos for 290€/axis, more or less, EU, all in.

Agathon
02-09-2017, 04:19 PM
Highly recommend csmip-ip-s, and maybe modern import step/dir servo drives instead.
Or use the drives you have in step/dir mode with the csmio-ip-s.
Very easy, fast, good, done.

I have seen lots of threads about analogue-> s/d conversions.
Past 14+ years.
And some few really clever people got them to work really well (Mark V. was one, 8+ years ago).
Via custom electronics they made (cheap, but I could not design them), lowpass / bandpass filters, tuning, etc.

Look;
You have a bob .. a converter .. a drive .. tuning .. motor.
Thats 4 pieces of kit in a row, and no easy way to detect noise, hum, non-linear response, accuracy etc. etc.

Alternatively, a csmio-ip-a would drive them directly.
And one of the smartest most capable guys I know uses it with great results. Real VMC, with auto toolchanger and analogue servos.
He also has an csmio-ip-s like mine, on a small lathe.

I am pretty sure the drives You have can work extremely well.
Could.

But I also think that You will suffer and struggle to get them to work, and the results are likely to be far from close to optimal - vs what they could do technically.
Usually, bobs have electronic problems of all sorts.
Limited speeds, responses, noise, non-linearity, functioning etc etc. and these mostly only appear at high speeds aka servos.

After trying 12+ combos for 10+ years, I ditched all that and imported new ac servos myself and cslabs controllers.
Right choice.

You can get new small 400W servos for 290€/axis, more or less, EU, all in.

Thanks for the reply. I've been busy with other stuff recently and haven't had much of a chance to do anything about this yet. However, I think I'm convinced by Clive's argument (made on a number of occasions) that I would be much better off using Linux CNC for my machine. At the moment I'm going to play with the stepper motor set-up and Mach3, but I'm going to get up to speed with LCNC ASAP and then invest in the appropriate Mesa boards to drive the servos.

Out of interest, can you give me a source for the 400W servos you mention?

David