hi Tom,
I'm Beppe, from Italy. My lathe is equipped with an Omron R88 driver. It controls it via +-10V supplied by the KFLOP analog-to-digital converter.
A few days ago, the driver broke, and I need to replace it with a new one. I already have a VFD driver that requires 0-10V as the speed reference and a CW/CCW signal for the direction. I haven't used C in a long time, and I'm a bit confused about how to edit C programs.
Actually, when I press "Cycle Start," I only manage one bit to enable the spindle driver, and the spindle direction is set via the M3/M4 G-code, +-10V from the analog-to-digital converter. But with the new driver, the speed must be referenced between 0V and 10V, and the CW/CCW signal must be configured...
How can I do this?
Thanks for ur patience
Beppe
how to drive a VFD with 0-10V/CW/CCW signal
Moderators: TomKerekes, dynomotion
Re: how to drive a VFD with 0-10V/CW/CCW signal
Hi Tom,
while waiting your comments I took a look at my personal C programs and I found an header file with this line:
#define USE_POS_NEG_VOLTAGE 1 // 0 = output Magnitude, 1 = output positive and negative speed
is this variable that arrange the DAC output between +-10V and 0-10V?
Beppe
while waiting your comments I took a look at my personal C programs and I found an header file with this line:
#define USE_POS_NEG_VOLTAGE 1 // 0 = output Magnitude, 1 = output positive and negative speed
is this variable that arrange the DAC output between +-10V and 0-10V?
Beppe
- TomKerekes
- Posts: 2868
- Joined: Mon Dec 04, 2017 1:49 am
Re: how to drive a VFD with 0-10V/CW/CCW signal
Hi Beppe,
Yes, changing to 0 should always output a 0-10V magnitude for both directions.
You will also need to set the:
#define SPINDLECW_BIT 154 // bit to activate to cause CW rotation
#define SPINDLECCW_BIT 155 // bit to activate to cause CCW rotation
bits appropriately.
Yes, changing to 0 should always output a 0-10V magnitude for both directions.
You will also need to set the:
#define SPINDLECW_BIT 154 // bit to activate to cause CW rotation
#define SPINDLECCW_BIT 155 // bit to activate to cause CCW rotation
bits appropriately.
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: how to drive a VFD with 0-10V/CW/CCW signal
hi Tom,
Sorry for the double post, you usually reply as soon as possible and I thought you were on vacation.
Said that, I still have a doubt:
Is "USE_POS_NEG_VOLTAGE" a global variable that affects all DACs or can I just tie it to the spindle axle? (I still have X, Y and Turret driven by +-10V)
If so, is converting the PWM output to V the only way to drive the VFD?
Beppe
Sorry for the double post, you usually reply as soon as possible and I thought you were on vacation.
Said that, I still have a doubt:
Is "USE_POS_NEG_VOLTAGE" a global variable that affects all DACs or can I just tie it to the spindle axle? (I still have X, Y and Turret driven by +-10V)
If so, is converting the PWM output to V the only way to drive the VFD?
Beppe
- TomKerekes
- Posts: 2868
- Joined: Mon Dec 04, 2017 1:49 am
Re: how to drive a VFD with 0-10V/CW/CCW signal
Hi Beppe,
USE_POS_NEG_VOLTAGE is a define which is used within your Spindle programs such as the CCW example below. So it only applies to the Spindle Axis.
USE_POS_NEG_VOLTAGE is a define which is used within your Spindle programs such as the CCW example below. So it only applies to the Spindle Axis.
Code: Select all
LastState = -1;
if (*css_mode != 2)
{
// spindle is already on, so ramp to new speed
if (USE_POS_NEG_VOLTAGE)
Jog(SPINDLEAXIS,speed * FACTOR * LastState);
else
Jog(SPINDLEAXIS,speed * FACTOR);
printf("Jogging Spindle %f counts/sec\n",speed * FACTOR);
}
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.