OpenEtherCATsociety / SOEM

Simple Open Source EtherCAT Master
Other
1.35k stars 685 forks source link

Motor shuts down when trying to read inputs #856

Open esgasaria opened 2 months ago

esgasaria commented 2 months ago

Hello, I'm working with a FAULHABER and BECKHOFF setup. I managed to be able to integrate both systems and I can control the motor in different operation modes. However my goal is to be able to control the velocity of the motor based on the analog input from an external potentiometer that I attached to my AI PLC module (EL3104). The moment I try to control the velocity based on it, the motor shuts down immediately. I'll attatch the code, as well as the log from the Motion Manager from Faulhaber, which gives some precise error codes. Also I'm adding the terminal output.

Code: test.zip

Terminal output: test.txt

Communication log from Faulhaber Motion Manager: Communication.csv

I'm struggling because I can only see a voltage issue, however no limit is being reached because the physical setup doesn't allow it, and also because it doesn't pop up when simply running the motor by commanding different velocities manually one by one. So my guess is that the issue is simply a representation of the immediate shutdown. If so, then I don't know why it shuts down. So I'm a bit lost.

ArthurKetels commented 2 months ago

Well, good try, but there are many issues with your code. SDO transfers are not meant to control your slaves in real-time. You would use PDO for that. They are mapped into the IOmap but you only seem to use the analog input module this way.

You should capture the packets on the network interface with WireShark. This will give you a much better understanding of what issues there are.