07-03-2025 04:28 PM - edited 07-03-2025 05:00 PM
Hi,
To preface, I think this is more of a mechanical/electric issue than a LabVIEW code issue but I would appreciate any insight for my issue. Also, to add before going into the issue, the current wiring setup for the load cell and motor and a more complex code using it were functioning fine previously. I had to redo some of the motor cables because the previous one snapped but I don't think this problem started then.
Devices used: USB-6211 and ESCON 50/5 for the motor
The problem is that my program uses load cell data for a PID controller to control the motor but the motor seems to be affecting the load cell data and adding in noise which is affecting the PID controller. The load cell data is fine when the motor isn't in the "enable" state (as seen in nomotorVI figure attached) but once I enable the motor there is a lot of noise from the motor (seen in withmotorVI figure). Just turning the motor on adds so much noise to the load cell data (seen in the motoronVI figure) and makes it seem like there is a force when it should be around 0, this really affects the PID controller so it just does not function as it should. Again, this happened recently and I was not having this issue earlier in the week.
Some troubleshooting I have been doing was to unwire and rewire all the wires, though they are not isolated (yet) so there may be noise through the grounds I believe. The load cell is wired to the USB-6211 in the differential AI1, while the motor via the ESCON is wired to P1.0, P1.1, 5V, DGND, AO1, and AOGND on the USB-6211. These connections between the ESCON and DAQ board are necessary for the motor to function. I am also using two different batteries for the load cell and the motor (via the ESCON) so there is no shared power source either.
I also made a simpler program without the PID controller to just see the load cell data with and without the motor turned on, which is the program seen in the attached figures and is the attached VI (testLC).
If any other information is useful, please let me know. I would appreciate any more insight into how to go about resolving this issue. (To reiterate, this noise started recently and I do not know what is causing it when it worked with the same wiring setup + I rewired to ensure the wires are sturdy/not cracked).
Solved! Go to Solution.
07-04-2025 01:26 PM
Do you have an oscilloscope handy? Sounds like when you re-wired, shielding might have been overlooked,
and "motor noise" is getting into the "measurement" channels. Are your A/D inputs single-ended or differential?
Bob Schor
07-04-2025 03:43 PM
Hi
What do you have connected to the AI1- ?
Is the configuration of the VI as Differential ?
Is there anythin connected to the AI GND ?
go throught the article bellow and check how you're connecting your signals.
Differential Measurement System - NI
When using the NI-MAX (Not your program) with the motor on do you observe similar results ?
07-07-2025 10:58 AM
I do have an oscilloscope I could use.
The Analog Input is differential, I have the load cell attached to AI1+/-
The Analog Output is single-ended, I have the motor command values on AO0 and AO GND.
The Digital Output is single-ended, I have the "enable" and "direction" boolean commands for the motor on P1.0, P1.1 and DGND.
07-07-2025 02:43 PM
The loadcell amplifier is connected to AI1-, nothing is connected to the AI GND.
Th configuration is Differential in the VI.
I have trouble getting the motor to function with the NI-MAX testing.
07-14-2025 12:01 PM
I found the issue in case anyone wanted to know, some metal part of the cable was touching the motor, causing some interference and affecting the loadcell; so it did not really have to do with the wiring. I changed the cable type and there is no more large noise.