PDA

View Full Version : CSMIO/IP-M and PM752 Drivers



Washout
27-10-2019, 08:15 PM
Hi all,

I'm getting close to having a functioning CSMIO/IP-M controller working from Mach4 retro-fitted onto my CNC router, but have hit a bit of a blocker.

I have 3 axis wired up using PM752 drivers (yes I know they are getting long in the tooth now and I should probably upgrade to digital versions ;) ) and as directed by the Datasheet for the drivers, I have 2K resistors wired into the circuits for the DIR- and PUL-....so that seems to be correct.

I have the high voltage side also wired up from the transformer and to the steppers using the same wiring I had on the previous controller, so all should be good there also. The drivers have their green LEDs lit indicating all is good on that front.

The difference is that I can't see if or how I would wire up the Enable signals from the CSMIO/IP-M and I seem to recall these are not always used, so have left them not wired and essentially open/unconnected, which also seems to agree with the datasheet. Quote "Enable signal: This signal is used for enabling/disabling the driver. High level (NPN control signal, PNP and Differential control signals are on the contrary, namely Low level for enabling.) for enabling the driver and low level for disabling the driver. Usually left UNCONNECTED (ENABLED)".

I've also got the axis mapping and the same tuning parameters I had in Mach3 plugged into Mach4 (including steps per unit to match the microsteps on the drivers. I've also got the latest firmware uploaded to the controller and the e-stop and probe inputs are functioning correctly.

However. I cannot get the machine to move using the MDI commands, even though the DROs in Mach4 look like they are i.e. they count up and down according to the MDI commands. I do notice however that the indicator lights next to each axis DROs are red and would have thought they should be green?

Any ideas would be most gratefully accepted, as I'm sure its something fairly simple like "you fool, the driver will never function with the Enable wired up and they should go on pins x and y on the CSMIO/IP-M", or I have completely misread the CS-Labs manual and haven't got the Dir/Pul circuits wired up correctly (currently there's a wire going from Dir+ to PM752 and then another to R(2K) to Dir- and another going from Pul+ to PM752 and another going to R(2K) to Pul-).

I've also attached the PM752 datasheet for info.

JAZZCNC
27-10-2019, 08:28 PM
You don't need the 2K resisitors as the Motor outputs on the IP/M are 5V not 24v. Only the inputs and outputs are 24V.

Edit: The enable on the drive can be left unused and it will work fine.

Washout
27-10-2019, 08:33 PM
Ah thanks Dean as always - I'll strip those off tomorrow and that should hopefully do the trick (fingers crossed)

Neale
28-10-2019, 05:23 PM
Very convenient that the CSMIO is 5V output! Have you also used differential wiring to the 752s? It's not shown in the 752 manual, but it just means taking the two CSMIO * and - terminals to the two corresponding terminals on the 752 for the step and directions signals. You end up with 4 wires rather than 3, and ideally twist the two wires in each pair together. You might end up doing as I did and getting one pair on one driver the wrong way round (+ and - interchanged) but it's not a big deal to fix!

I think the CD Labs website has a specific document on differential connections.

Washout
28-10-2019, 05:49 PM
Hi Neale (and Dean)

All is good - stripped the resistors off of the wires (I was using 4 already) and other than the motors being reversed I have movement....yay (fixed the reversal in Mach4 motor setup). In fact I'd say the machine seems smoother than before, but that could just be placebo..

Thanks again for your help :-)

Now to get the VFD/Spindle wired, which I think is shown on Dean's diagram on the other thread (ACM and VI to the analogue 10V output) and then work out the VFD settings to change to go from RS485 to external control.

JAZZCNC
28-10-2019, 06:41 PM
. In fact I'd say the machine seems smoother than before, but that could just be placebo..

No It's not placebo affect.! . . That's the difference between a quality controller and a cheaper controller, esp if combined with decent Digital drives. Don't be surprised if able tune motors higher.


.Now to get the VFD/Spindle wired, which I think is shown on Dean's diagram on the other thread (ACM and VI to the analog 10V output) and then work out the VFD settings to change to go from RS485 to external control.

If it's a Huanyang VFD then the parameters for External control are.!

PD 01 = 1 (External Frequency) - - - - - IP/M Analog connections Pin1 = VI Pin2 = ACM
PD 02 = 1 (External Start/Stop) - - - - - -IP/M Relay OUTPUTS Pin 12 = FOR Pin 25 = DCM ( In Mach3 Set OUTPUT #1 = port 10 Pin 4 not sure if same in Mach4 don't use it.)

There are other parameters to set for things like diplaying correct RPM etc but can't remember them off top my head but have them wrote down at work so if get stuck just shout.

JAZZCNC
28-10-2019, 06:54 PM
You might end up doing as I did and getting one pair on one driver the wrong way round (+ and - interchanged) but it's not a big deal to fix!

Washout just be aware that it's common for the controller's Pulse edge to be on the wrong side to what drives are set. So before continuing to use the machine just do a check of all axis.
To test write few 100 lines of short back n forward G0 moves which end at Zero IE:
G0 X5
G0 X0
Etc
Etc
G0 X5
G0 X0
If all is correct then will be back at Zero, if not then just toggle the Dir LowActive in Motor Outputs

Washout
28-10-2019, 10:04 PM
Thanks and thanks again - the VFD wiring will save me some time and head scratching.

I've done a few moves in the MDI in mach4 (I like how in mach4 you can enter multiple lines in MDI and then hit the cycle button to run them), much like you suggested i.e. x50 x0 and all seems to be good, but will do some longer tests with repeats in gcode.

Now I've got movement I'll be buying the mach4 licence and then I can run some decent test jobs (unlicensed is limited to 20mins iirc).

Washout
27-01-2020, 12:04 AM
Hopefully you read this JazzCNC, as I think I have fallen foul of the "Pulse edge being on the wrong side to what the drives are set to" issue you described above.

I did run a test as suggested above and all looked good and I've even run a couple of jobs (nothing too stressful), but today I decided to use the machine in earnest and ran a job which was a multi-level adaptive clearing toolpath (just facing off a chunk of hardwood), with lots of curved cuts.

The first level looked OK i.e. nice spiral ramp down to depth then expand out and curved passes for the length of the stock. The next level down again spiralled down and ran fine, but I then notice that level is offset from by -3.8mm in X and -1.8mm in Y, like its losing steps or zero. I have verified I have an error by running a much longer X -230 X -130 rinse and repeat toolpath over a steel rule for about 10 minutes @4000mm/min and lo and behold I have a "slip" in the minus on the X axis of about 5mm (more if I run it longer).

Is that consistent with the Pulse Edge issue?

(I'll try and track down the Dir LowActive in Motor Outputs in MACH4 and give it a try in any case, as nothing's changed mechanically i.e. no binding on axis etc. so it must be either electronic or software).

JAZZCNC
27-01-2020, 12:17 AM
Is that consistent with the Pulse Edge issue?

(I'll try and track down the Dir LowActive in Motor Outputs in MACH4 and give it a try in any case, as nothing's changed mechanically i.e. no binding on axis etc. so it must be either electronic or software).

Yes, that's exactly what happens. I can't help with Mach4 however as I don't use it.

Washout
27-01-2020, 12:21 AM
Thanks and cool, at least I know what I'm trying to cure now :-)

Some of MACH4 is very similar to MACH3 (I think I recognise some of Ger21's work in the probing/touch menus for example). So if its in there I can probably find the setting.

I'll report back after a session tomorrow evening hopefully.

Washout
27-01-2020, 12:24 AM
Whilst I remember the spindle wiring worked perfectly. Here's a quick demo:


https://youtu.be/f-ZLbaJalf0

Neale
27-01-2020, 09:54 AM
If it's this pulse edge problem - certainly sounds like it! - then you can either swap over the "step" connections at one end (IP/M or driver) or change the "active high/low" setting for the step pulses in Mach4. I'm assuming that it has a setting for that, just like Mach3. I had this problem on my Z axis which is why it didn't show up for a while - you see the problem when there are lots of direction changes on that axis and for mainly profile cutting, there aren't many on Z.

JAZZCNC
27-01-2020, 06:52 PM
If it's this pulse edge problem - certainly sounds like it! - then you can either swap over the "step" connections at one end (IP/M or driver) or change the "active high/low" setting for the step pulses in Mach4.

Just as an also to this for others having this problem, some drives let you change the step edge using a dip switch.

JAZZCNC
27-01-2020, 06:55 PM
Whilst I remember the spindle wiring worked perfectly. Here's a quick demo:

Something doesn't sound right there.? Or is it just bad sound.?

Washout
27-01-2020, 08:19 PM
Something doesn't sound right there.? Or is it just bad sound.?

Not sure - the sound is generally bad on the camera and its also mounted directly to the spindle/bearing mount. The spindle is fairly new and does make a bit more sound than the one I had previously, but it doesn't get hot or anything, so I assume its OK (pulls about 1.8 to 2.1 amps under load). The hole is also drilling through the stock into the sacrificial bed for indexing purposes and the drill will be catching on one peck at lest on the double sided tape under there (plus some other detritus in previous cut throughs).

Just about to head down to the workshop to try the pulse edge thing, but I also notice in my drive manual/datasheet that there are 4 jumper settings to choose from:

27218

I'm assuming that "a" is default, so I probably need "b" (or vice versa depending on what I find in there and assuming I don't set it in MACH4)?

JAZZCNC
27-01-2020, 08:51 PM
I'm assuming that "a" is default, so I probably need "b" (or vice versa depending on what I find in there and assuming I don't set it in MACH4)?

Yes that's the drive setting for switching leading edge but just do it in mach4 it's easier.

Regards the noise then I wasn't meaning the sound of the spindle, it sounded clunky in its movement as if a coupler or pulley something was loose, possibly dodgy bearing. I'd be checking out the Z axis as well. You would get the same problem if something was slipping.

Washout
27-01-2020, 10:07 PM
Latest report:

I couldn't find the setting in MACH4 for the Dir Active Low (not in Output Signals, nor Axis Mapping, Motor Tuning tabs in Config, nor in the CS-LABS plug-in which is where I kind of expected to be hiding if its in there). I wonder if the CS-LABs guys need to write it into their plug-in for MACH4? Also CS-LABS have released a new version, but I figured I had enough variables to contend with in one night :)

Anyway, having lessened the ghetto factor recently on my control cabinet, whipping the drives out on their DIN mounts and putting a jumper on J3, seems to have worked a treat and the same toolpath that was resulting in a 5mm unwanted offset is now spot on, so thanks again chaps for the advice.

One thing that is still very ghetto on my machine is the belt tensioning "axle" and sprocket arrangement, which was hastily put on the machine 7 years ago when I put the 2nd ballscrew on the X axis. That's probably the source of the slack alice coupler/pulley sound - something I should have done something about really by now :shame: The Z Axis I'll investigate...