NEWS
LinuxCNC 2.5.2 Release
There are no translations available.

LinuxCNC 2.5.2 Update Released (changelog).
 
LinuxCNC 2.5.1 Release
There are no translations available.

LinuxCNC 2.5.1 Update Released (changelog). If the Package Manager does not prompt you to upgrade see this page.

 
LinuxCNC 2.5.0 Release
There are no translations available.

New major release (changelog). See the instructions to update your system from EMC 2.4 to LinuxCNC 2.5.
 
Home Forum General General LinuxCNC Questions 7i33 pwmgen.value question

Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: 7i33 pwmgen.value question

7i33 pwmgen.value question 05 Фев 2012 13:15 #17444

  • justin
  • justin's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 27
  • Karma: 0
Hello,
I have a 5i20 and 7i33 and I am interfacing with a vfd which wants a 0-10vdc signal. So originally I had the pwmgen value +/-10vdc but made it positive 10v regardless of spindle direction by using abs. In hal meter it is showing appropriate positive values for the pwgen.value. However when I a measure between the DRV2 and Ground on my 7i33 I get the exact value only negative.

When I am not using the abs component and I input an m4 hal meter shows a negative value on pwmgen.2.value but it outputs a positive dc voltage to my vfd and it works fine!

I am sure i am missing something simple here....

Here a section on my .hal file

#spindle scales
addf scale.0 servo-thread
addf scale.1 servo-thread

setp scale.0.gain 0.0001666

setp scale.1.gain 60


loadrt abs count=4
addf abs.0 servo-thread
addf abs.1 servo-thread
addf abs.2 servo-thread
addf abs.3 servo-thread

#spindle speed out limits
loadrt limit1 count=1
addf limit1.0 servo-thread
setp limit1.0.min -6000
setp limit1.0.max 6000

#set scale and pwm
setp hm2_5i20.0.encoder.02.scale -4096
setp hm2_[HOSTMOT2](BOARD).0.pwmgen.02.output-type 1


net spindle-speed-limit motion.spindle-speed-out => limit1.0.in
net spindle-speed-limit-out limit1.0.out => scale.0.in
net spindle-speed-DAC scale.0.out
net spindle-speed-DAC-abs => hm2_5i20.0.pwmgen.02.value
#net spindle-speed-DAC => hm2_5i20.0.pwmgen.02.value
net spindle-rpm => abs.1.in
net spindle-speed-abs <= abs.1.out
net spindle-speed-DAC => abs.3.in
net spindle-speed-DAC-abs => abs.3.out
net spindle-enable-req motion.spindle-on => and2.1.in0
net spindle-brake-sensor hm2_5i20.0.gpio.051.in_not => and2.1.in1
net spindle-enable and2.1.out => hm2_5i20.0.pwmgen.02.enable
The administrator has disabled public write access.

Re:7i33 pwmgen.value question 05 Фев 2012 16:28 #17448

  • cmorley
  • cmorley's Avatar
  • OFFLINE
  • Moderator
  • Posts: 1486
  • Thank you received: 40
  • Karma: 89
change you pwmgen scale from negative to positive.

setp hm2_5i20.0.encoder.02.scale 4096
The administrator has disabled public write access.

Re:7i33 pwmgen.value question 05 Фев 2012 21:17 #17450

  • justin
  • justin's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 27
  • Karma: 0
Thanks for the reply. I just tried changing it and it does not seem to reverse the actual dc voltage from the 7i33. I imagine it would be a bad idea to simply swap the drv. and ground wires to the VFD. Would this cause grounding problems?
The administrator has disabled public write access.

Re:7i33 pwmgen.value question 05 Фев 2012 22:03 #17451

  • PCW
  • PCW's Avatar
  • OFFLINE
  • Moderator
  • Posts: 1645
  • Thank you received: 86
  • Karma: 116
If the VFD signal is ground, yes it will cause troubles and possibly damage the 7I33

I think cmorely meant for you to change the PWM scale, not the encoder scale:

setp hm2_5i20.0.pwmgen.02.scale -oldscale
The administrator has disabled public write access.

Re:7i33 pwmgen.value question 05 Фев 2012 23:22 #17452

  • justin
  • justin's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 27
  • Karma: 0
Thanks, that makes a lot of sense. I will try that in the morning...

Justin
The administrator has disabled public write access.

Re:7i33 pwmgen.value question 06 Фев 2012 12:03 #17472

  • cmorley
  • cmorley's Avatar
  • OFFLINE
  • Moderator
  • Posts: 1486
  • Thank you received: 40
  • Karma: 89
Sorry yes thats what i meant.
The administrator has disabled public write access.

Re:7i33 pwmgen.value question 07 Фев 2012 18:18 #17499

  • justin
  • justin's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 27
  • Karma: 0
Solved!.... first using Abs to make the pwmgen.value positive for both m3 and m4 and then using a pwmgen.scale of -1 worked great. Thanks for the help as always.

Justin
The administrator has disabled public write access.
  • Page:
  • 1
Time to create page: 0.889 seconds
Powered by Kunena Forum
© 2013 LinuxCNC.org
Joomla! is Free Software released under the GNU General Public License.