Another EMI issue
- flychris
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 1
11 Oct 2024 22:57 #311836
by flychris
Another EMI issue was created by flychris
I am getting some pretty ridiculous EMI from my VFD and I'd like to try add debounce so I can cut parts again. Long story short, my hard drive failed so I got a new PC setup, copied all of my machine settings and it doesn't work. EMI for days but only if my VFD is running!!! Even with 3 line filters on all of the 110/240V circuits. Missing steps and sounds horrible.
Could someone be so kind to review my INI and let me know how to write a good debounce code for it?
loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
loadrt hal_parport cfg="0 out"
setp parport.0.reset-time 5000
loadrt stepgen step_type=0,0,0
addf parport.0.read base-thread
addf stepgen.make-pulses base-thread
addf parport.0.write base-thread
addf parport.0.reset base-thread
addf stepgen.capture-position servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf stepgen.update-freq servo-thread
net probe-in => motion.probe-input
net xstep => parport.0.pin-01-out
setp parport.0.pin-01-out-reset 1
net xdir => parport.0.pin-02-out
net ystep => parport.0.pin-03-out
setp parport.0.pin-03-out-reset 1
net ydir => parport.0.pin-04-out
net zstep => parport.0.pin-05-out
setp parport.0.pin-05-out-reset 1
net zdir => parport.0.pin-06-out
net min-home-x <= parport.0.pin-10-in-not
net min-home-y <= parport.0.pin-11-in-not
net max-home-u <= parport.0.pin-12-in
net probe-in <= parport.0.pin-13-in
setp stepgen.0.position-scale [JOINT_0]SCALE
setp stepgen.0.steplen 1
setp stepgen.0.stepspace 0
setp stepgen.0.dirhold 59941
setp stepgen.0.dirsetup 59941
setp stepgen.0.maxaccel [JOINT_0]STEPGEN_MAXACCEL
net xpos-cmd joint.0.motor-pos-cmd => stepgen.0.position-cmd
net xpos-fb stepgen.0.position-fb => joint.0.motor-pos-fb
net xstep <= stepgen.0.step
net xdir <= stepgen.0.dir
net xenable joint.0.amp-enable-out => stepgen.0.enable
net min-home-x => joint.0.home-sw-in
net min-home-x => joint.0.neg-lim-sw-in
setp stepgen.1.position-scale [JOINT_1]SCALE
setp stepgen.1.steplen 1
setp stepgen.1.stepspace 0
setp stepgen.1.dirhold 59941
setp stepgen.1.dirsetup 59941
setp stepgen.1.maxaccel [JOINT_1]STEPGEN_MAXACCEL
net ypos-cmd joint.1.motor-pos-cmd => stepgen.1.position-cmd
net ypos-fb stepgen.1.position-fb => joint.1.motor-pos-fb
net ystep <= stepgen.1.step
net ydir <= stepgen.1.dir
net yenable joint.1.amp-enable-out => stepgen.1.enable
net min-home-y => joint.1.home-sw-in
net min-home-y => joint.1.neg-lim-sw-in
setp stepgen.2.position-scale [JOINT_2]SCALE
setp stepgen.2.steplen 1
setp stepgen.2.stepspace 0
setp stepgen.2.dirhold 59941
setp stepgen.2.dirsetup 59941
setp stepgen.2.maxaccel [JOINT_2]STEPGEN_MAXACCEL
net zpos-cmd joint.2.motor-pos-cmd => stepgen.2.position-cmd
net zpos-fb stepgen.2.position-fb => joint.2.motor-pos-fb
net zstep <= stepgen.2.step
net zdir <= stepgen.2.dir
net zenable joint.2.amp-enable-out => stepgen.2.enable
net estop-out <= iocontrol.0.user-enable-out
net estop-out => iocontrol.0.emc-enable-in
net tool-number <= iocontrol.0.tool-prep-number
net tool-change-loopback iocontrol.0.tool-change => iocontrol.0.tool-changed
net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
Could someone be so kind to review my INI and let me know how to write a good debounce code for it?
loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
loadrt hal_parport cfg="0 out"
setp parport.0.reset-time 5000
loadrt stepgen step_type=0,0,0
addf parport.0.read base-thread
addf stepgen.make-pulses base-thread
addf parport.0.write base-thread
addf parport.0.reset base-thread
addf stepgen.capture-position servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf stepgen.update-freq servo-thread
net probe-in => motion.probe-input
net xstep => parport.0.pin-01-out
setp parport.0.pin-01-out-reset 1
net xdir => parport.0.pin-02-out
net ystep => parport.0.pin-03-out
setp parport.0.pin-03-out-reset 1
net ydir => parport.0.pin-04-out
net zstep => parport.0.pin-05-out
setp parport.0.pin-05-out-reset 1
net zdir => parport.0.pin-06-out
net min-home-x <= parport.0.pin-10-in-not
net min-home-y <= parport.0.pin-11-in-not
net max-home-u <= parport.0.pin-12-in
net probe-in <= parport.0.pin-13-in
setp stepgen.0.position-scale [JOINT_0]SCALE
setp stepgen.0.steplen 1
setp stepgen.0.stepspace 0
setp stepgen.0.dirhold 59941
setp stepgen.0.dirsetup 59941
setp stepgen.0.maxaccel [JOINT_0]STEPGEN_MAXACCEL
net xpos-cmd joint.0.motor-pos-cmd => stepgen.0.position-cmd
net xpos-fb stepgen.0.position-fb => joint.0.motor-pos-fb
net xstep <= stepgen.0.step
net xdir <= stepgen.0.dir
net xenable joint.0.amp-enable-out => stepgen.0.enable
net min-home-x => joint.0.home-sw-in
net min-home-x => joint.0.neg-lim-sw-in
setp stepgen.1.position-scale [JOINT_1]SCALE
setp stepgen.1.steplen 1
setp stepgen.1.stepspace 0
setp stepgen.1.dirhold 59941
setp stepgen.1.dirsetup 59941
setp stepgen.1.maxaccel [JOINT_1]STEPGEN_MAXACCEL
net ypos-cmd joint.1.motor-pos-cmd => stepgen.1.position-cmd
net ypos-fb stepgen.1.position-fb => joint.1.motor-pos-fb
net ystep <= stepgen.1.step
net ydir <= stepgen.1.dir
net yenable joint.1.amp-enable-out => stepgen.1.enable
net min-home-y => joint.1.home-sw-in
net min-home-y => joint.1.neg-lim-sw-in
setp stepgen.2.position-scale [JOINT_2]SCALE
setp stepgen.2.steplen 1
setp stepgen.2.stepspace 0
setp stepgen.2.dirhold 59941
setp stepgen.2.dirsetup 59941
setp stepgen.2.maxaccel [JOINT_2]STEPGEN_MAXACCEL
net zpos-cmd joint.2.motor-pos-cmd => stepgen.2.position-cmd
net zpos-fb stepgen.2.position-fb => joint.2.motor-pos-fb
net zstep <= stepgen.2.step
net zdir <= stepgen.2.dir
net zenable joint.2.amp-enable-out => stepgen.2.enable
net estop-out <= iocontrol.0.user-enable-out
net estop-out => iocontrol.0.emc-enable-in
net tool-number <= iocontrol.0.tool-prep-number
net tool-change-loopback iocontrol.0.tool-change => iocontrol.0.tool-changed
net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
Please Log in or Create an account to join the conversation.
- PCW
- Offline
- Moderator
Less
More
- Posts: 17904
- Thank you received: 4774
11 Oct 2024 23:10 #311837
by PCW
Replied by PCW on topic Another EMI issue
Missing steps and sounds horrible.
Sounds like EMI in the step/dir lines which debounce will not help.
Debounce can help with noise on the limit switch and probe inputs
but that's it.
For noise on the step/dir signals you need to make sure that they are not
routed near wires connected to the VFD. Also a common mode choke
(giant ferrite bead around the U,V,W motor leads) can help reduce radiated
EMI. Also if you are controlling the VFD speed/direction make sure the control
logic is isolated. If not isolated, you can help reduce introducing noise into
the control system by adding common mode chokes to all the control wiring
going to the VFD.
Sounds like EMI in the step/dir lines which debounce will not help.
Debounce can help with noise on the limit switch and probe inputs
but that's it.
For noise on the step/dir signals you need to make sure that they are not
routed near wires connected to the VFD. Also a common mode choke
(giant ferrite bead around the U,V,W motor leads) can help reduce radiated
EMI. Also if you are controlling the VFD speed/direction make sure the control
logic is isolated. If not isolated, you can help reduce introducing noise into
the control system by adding common mode chokes to all the control wiring
going to the VFD.
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19408
- Thank you received: 6507
11 Oct 2024 23:15 #311838
by tommylight
Replied by tommylight on topic Another EMI issue
From your description, no amount of debounce will help, so where did you get the idea that it will?
It would be more helpful if you upload the pictures of the wiring, detailed ones, but in the mean time:
-make sure the PC is grounded properly
-make sure the VFD is grounded properly
-power supplies that can be grounded should be grounded
-use shielded cable for the spindle, shield bolted to motor and to VFD
-using a ferrite bead (doughnut) on motor wires at the VFD side helps
It would be more helpful if you upload the pictures of the wiring, detailed ones, but in the mean time:
-make sure the PC is grounded properly
-make sure the VFD is grounded properly
-power supplies that can be grounded should be grounded
-use shielded cable for the spindle, shield bolted to motor and to VFD
-using a ferrite bead (doughnut) on motor wires at the VFD side helps
Please Log in or Create an account to join the conversation.
- flychris
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 1
18 Oct 2024 03:54 #312464
by flychris
Replied by flychris on topic Another EMI issue
Alright. Grounded every component like it should be, including one end of all my shielded wire. Cleaned up the signals very good! I even have tolerances to where i need them. I do get an occasional limit switch or probe trip a program, so a decent debounce should help me. Could someone write one according to my INI. I feel like I have the concept, but the parports get me to wonky.
Please Log in or Create an account to join the conversation.
- flychris
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 1
20 Oct 2024 19:32 #312706
by flychris
Replied by flychris on topic Another EMI issue
100% solved. Grounded every component to a ground distribution block. Used tinned copper braided wire and grounded the grounding block to the chassis and the spindle to the gantry. Then added a simple debounce to my probes and limit homes. It's all good to go. Right back to .0005" tolerances. Thanks for the support
Attachments:
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
- jmelson
- Offline
- Moderator
Less
More
- Posts: 817
- Thank you received: 151
25 Oct 2024 19:20 #313227
by jmelson
Replied by jmelson on topic Another EMI issue
I did a retrofit on a Bridgeport R2E3 mill. I had occasional comm errors between my PPMC interface boards and the PC, seen as wild encoder positions that caused following errors. Grounding made it happen only rarely, but I put a big line filter unit on the power input to the VFD. TOTALLY solved!
Jon
Jon
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19408
- Thank you received: 6507
25 Oct 2024 21:16 #313234
by tommylight
Replied by tommylight on topic Another EMI issue
Attachments:
Please Log in or Create an account to join the conversation.
Time to create page: 0.298 seconds