Help! PWM 0-10V.
Moderators: TomKerekes, dynomotion
Help! PWM 0-10V.
Hello! I'm collecting the machine. I will connect the encoders, so I decided to buy KFLOP. The axles are controlled by step/dir. Spindle with analog control. I bought a PWM conversion board in 0-10V. (a photo). If I still understand in the electrician and can disconnect the wiring, then in programming, a full zero. I ask for help on correct adjustment of spindle control!
The maximum spindle speed is 5647 rpm.
P.S. Sorry for my English.
The maximum spindle speed is 5647 rpm.
P.S. Sorry for my English.
- TomKerekes
- Posts: 2677
- Joined: Mon Dec 04, 2017 1:49 am
Re: Help! PWM 0-10V.
Hi Lafayette,
You would need the specification for the PWM to Analog converter board. Also the specification for whatever you will be using to drive the Spindle motor.
You would need the specification for the PWM to Analog converter board. Also the specification for whatever you will be using to drive the Spindle motor.
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: Help! PWM 0-10V.
I want to use to adjust the spindle speed
JP6 IO26 Gen Purpose PWM0 out
I want to use to turn the spindle on and off.
JP6 IO27 Gen Purpose LVTTL I/O 3.3V
Specification of the converter:
input3.3V Level0-100% PWM Signal, output0-10V Voltage
PWM Signal receiving frequency range:suggested 1KHZ-3KHZ
The resolution of this module is 0.1V
1, DIN+: PWM signal input is. (common cathode method. Here the PWM signal, a total connection)
2, DIN-: PWM signal input. (common cathode method. Here the signal terminal GND, anode connection, PWM signal) here.
3, 12-30V: power input positive end.
4, GND: power ground.
5,GND :Signal ground. The GND port is connected with the power supply ground wire.
6AO:Analog voltage0-10V Output port.
JP6 IO26 Gen Purpose PWM0 out
I want to use to turn the spindle on and off.
JP6 IO27 Gen Purpose LVTTL I/O 3.3V
Specification of the converter:
input3.3V Level0-100% PWM Signal, output0-10V Voltage
PWM Signal receiving frequency range:suggested 1KHZ-3KHZ
The resolution of this module is 0.1V
1, DIN+: PWM signal input is. (common cathode method. Here the PWM signal, a total connection)
2, DIN-: PWM signal input. (common cathode method. Here the signal terminal GND, anode connection, PWM signal) here.
3, 12-30V: power input positive end.
4, GND: power ground.
5,GND :Signal ground. The GND port is connected with the power supply ground wire.
6AO:Analog voltage0-10V Output port.
- TomKerekes
- Posts: 2677
- Joined: Mon Dec 04, 2017 1:49 am
Re: Help! PWM 0-10V.
Hi Lafayette,
The first Step would be to wire up the KFLOP PWM signal to the DIN+ and a KFLOP GND to DIN-
Then you might use the PWM1KHz.c Example to output a 50% PWM signal which should create a 5V analog signal as a test.
You haven't described any way to turn off your Spindle. So I don't see how you could expect IO27 to turn the Spindle on and off.
Regards
The first Step would be to wire up the KFLOP PWM signal to the DIN+ and a KFLOP GND to DIN-
Then you might use the PWM1KHz.c Example to output a 50% PWM signal which should create a 5V analog signal as a test.
Code: Select all
#include "KMotionDef.h"
main()
{
SetBitDirection(26,1); // define bit as an output
FPGA(IO_PWMS_PRESCALE) = 65; // divide clock by 65 (1 KHz)
FPGA(IO_PWMS) = 128; // square wave
FPGA(IO_PWMS+1) = 1; // Enable
}
Regards
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: Help! PWM 0-10V.
I will turn on and off through the standard M code.
IO27 will be connected to the optocoupler, and it will command the servo amplifier S-ON/S-OFF
I do not understand why I need an analog output 5V. when it needs 0-10V.
And how you can change the spindle speed.
IO27 will be connected to the optocoupler, and it will command the servo amplifier S-ON/S-OFF
I do not understand why I need an analog output 5V. when it needs 0-10V.
And how you can change the spindle speed.
- TomKerekes
- Posts: 2677
- Joined: Mon Dec 04, 2017 1:49 am
Re: Help! PWM 0-10V.
Hi Lafayette
I don't think you told us about any optocoupler or what interface the amplifier has. Assuming IO27 can be interfaced somehow to turn the Spindle on and off then you probably don't need a C Program for M3 and M5. Just configure those to operate IO27.IO27 will be connected to the optocoupler, and it will command the servo amplifier S-ON/S-OFF
That was intended to only be a simple test to output 50% to see if the hardware is connected properly and is working. You can change the value of 128 to other values to test other voltages.I do not understand why I need an analog output 5V. when it needs 0-10V.
Later you can use a C Program similar to the the one used for KStep's on board PWM to analog converter for the S Action. See the example Spindle_S_Kstep.c. Note the CorrectAnalog() function will probably need to be modified for the nonlinearities of your converter which is likely different than KStep's. If low speed control is not critical no changes may be needed. See:the Analog Output Section Here.And how you can change the spindle speed.
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: Help! PWM 0-10V.
I have a servo amplifier AEROTECH BA20-160.
I want that from one pin 26 the authorization of the servo amplifier should be given, and from the other 27 the speed change through.
The maximum speed is 5647.
I'm interested in stability at low speed.
I want that from one pin 26 the authorization of the servo amplifier should be given, and from the other 27 the speed change through.
The maximum speed is 5647.
I'm interested in stability at low speed.
Re: Help! PWM 0-10V.
The optocoupler will only work to enable the servo amplifier.
- TomKerekes
- Posts: 2677
- Joined: Mon Dec 04, 2017 1:49 am
Re: Help! PWM 0-10V.
Please reference the manual for your device and the page/connector/specification. I don't see any opto coupler inputs. I see a TTL Shutdown input.I have a servo amplifier AEROTECH BA20-160.
I think you stated the opposite before.I want that from one pin 26 the authorization of the servo amplifier should be given, and from the other 27 the speed change through.
What optocoupler?The optocoupler will only work to enable the servo amplifier.
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.