PWM gen
05 Dec 2018 10:32 - 05 Dec 2018 10:33 #121857
by Clive S
I am still a novice this, but looking at the hal file you seem to have these two addf pwmgen.update servo-thread and
addf pwmgen.make-pulses base-thread
Do these need to go between the read and write at the top with the others?
Hi everybody
I'm trying to create a PWM. i try to do this on a 7i66 output.
Is this possible?
I encluded my hal en ini file. In the end i want to use this pwm to control a Spindle.
With kind regards
I am still a novice this, but looking at the hal file you seem to have these two addf pwmgen.update servo-thread and
addf pwmgen.make-pulses base-thread
Do these need to go between the read and write at the top with the others?
Last edit: 05 Dec 2018 10:33 by Clive S.
Please Log in or Create an account to join the conversation.
05 Dec 2018 13:47 #121870
by PCW
If you are using a 7I66 output you will be limited to the servo thread as the PWM base frequency. This means that to get 1% resolution assumimg a 1 KHz servo thread, you would be limited to 10Hz.
To make filtering easier its probably better to chose PDM rather than PWM
Assuming 1 KHz servo thread, 50% duty cycle PWM at 10 HZ would be 50 ms on 50 ms off, 50% duty cycle PDM would be 1 ms on 1 ms off...
PDM is selected by setting the software pwmgen components frequency to 0
To make filtering easier its probably better to chose PDM rather than PWM
Assuming 1 KHz servo thread, 50% duty cycle PWM at 10 HZ would be 50 ms on 50 ms off, 50% duty cycle PDM would be 1 ms on 1 ms off...
PDM is selected by setting the software pwmgen components frequency to 0
Please Log in or Create an account to join the conversation.
05 Dec 2018 14:12 - 05 Dec 2018 14:13 #121872
by Sytreca
Last edit: 05 Dec 2018 14:13 by Sytreca.
Please Log in or Create an account to join the conversation.
05 Dec 2018 14:36 #121875
by andypugh
Both PWM and PDM can be converted to analog voltage by the same low-pass (resistor + capacitor) converter.
(The VFD might well be happy to operate on PWM / PDM without a filter)
Is there any possibility of controlling the VFD with Modbus?
Is it still possible to create a analog signal (0-10V) with this PDM signal?
Because my VFD only accepts 0-10V or 4-20mA.
Or do i need to look for another solution?
Both PWM and PDM can be converted to analog voltage by the same low-pass (resistor + capacitor) converter.
(The VFD might well be happy to operate on PWM / PDM without a filter)
Is there any possibility of controlling the VFD with Modbus?
Please Log in or Create an account to join the conversation.
05 Dec 2018 14:52 - 05 Dec 2018 14:55 #121880
by Sytreca
Last edit: 05 Dec 2018 14:55 by Sytreca.
Please Log in or Create an account to join the conversation.
05 Dec 2018 14:55 #121881
by andypugh
Which VFD model? There are some pre-existing HAL components
linuxcnc.org/docs/devel/html/man/man1/gs2.1.html
linuxcnc.org/docs/devel/html/man/man1/hy_gt_vfd.1.html
linuxcnc.org/docs/devel/html/man/man1/hy_vfd.1.html
linuxcnc.org/docs/devel/html/man/man1/mitsub_vfd.1.html
linuxcnc.org/docs/devel/html/man/man1/vfdb_vfd.1.html
linuxcnc.org/docs/devel/html/man/man1/vfs11_vfd.1.html
linuxcnc.org/docs/devel/html/man/man1/gs2.1.html
linuxcnc.org/docs/devel/html/man/man1/hy_gt_vfd.1.html
linuxcnc.org/docs/devel/html/man/man1/hy_vfd.1.html
linuxcnc.org/docs/devel/html/man/man1/mitsub_vfd.1.html
linuxcnc.org/docs/devel/html/man/man1/vfdb_vfd.1.html
linuxcnc.org/docs/devel/html/man/man1/vfs11_vfd.1.html
Please Log in or Create an account to join the conversation.
05 Dec 2018 14:59 #121882
by andypugh
You can probably arrange to have a high-frequency (up to MHz) PWM generated on one of the 5i23 pins.
Alternatively the 7i83 would do what you want, but seems overkill for an individual analogue output: store.mesanet.com/index.php?route=produc...83_88&product_id=122
It's a pity there isn't a single-channel smart-serial version of the Spinx1
store.mesanet.com/index.php?route=produc...t_id=205&search=spin
Alternatively the 7i83 would do what you want, but seems overkill for an individual analogue output: store.mesanet.com/index.php?route=produc...83_88&product_id=122
It's a pity there isn't a single-channel smart-serial version of the Spinx1
store.mesanet.com/index.php?route=produc...t_id=205&search=spin
Please Log in or Create an account to join the conversation.
Time to create page: 0.120 seconds