When I write a simple code to power on an axes everything works fine. But when I stop the program the inverter gives the error F4037 Exzessive Lagesollwertdiffernz (Excessive position setpoint difference). I can't restart the the program unless I manualy clear the error on the inverter.
Operating system: Ubuntu Core 20
PLC app version: 1.16.0
Used motor: MS2N03/4
Used inverter: XCD1-W2323
Solved! Go to Solution.
Please check, if you activated ctrlX MOTION. PLCopen commands only work with activated ctrlX MOTION:
In my last post I forgot to mention that I use the softmotion library. This library doesn't work when the motion app is installed/enabled.
To answer your questions ...
- Attachement 1
- I use the softmotion library in the Codesys Development system
- What i mean by stopping the program is pressing the stop button in codesys
- I have the motion app disabled so this can't be the issue.
I have it try with my system.
ctrlX CODESYS Sioftmotion Adaption 1.14
but it runs and if i stop the PLC there is no Error
could you send me your code so I can check if it works on my system.
(btw I have softmotion V4.12 and Softmotion adaption V1.16)
Stopping the PLC programm is a cruel action. (but not forbidden)
But normally this should not happen.
The drive reports F4037 Excessive command difference. The drive expect every cycle a new position. This new position must fit the ongoing trend of the movement. For example, you are at 1643,249 mm. The next cycle comes and commands 1643,261 mm, the machine react as usual. Then you stop the PLC so the control over the process is completey gone. Then it could happen that the next Cyclic postion is 0000,000 mm. The drive will come with an error, It cannot go in 1 ms from 1643,261 to 0000,000. That's excessive ....
I do not know what exacly happens. If the PLC crashes, or is stopped, what should be done by the system. Is there a motion app in between. Should the motion app handle this and give a proper stop, so generate cyclic postions to a decent stop position (without the plc) .
I think what is needed is a scope measurement of the commanded positions the drive got. (So then we can see if or how big this excessive position jump is). Then we have to take care about the internal process. Is it possible (in the datalayer) to monitor(scope) the commanded position value processing to see what happens there. Then we see how its internally processed.
In the PLC You give a position command lets say Move_Absolute to 2000 mm. Then with the given vel./acc./dec. the movement path is generated. From this path the commanded values will be extracted and send to the drives. Thats the part where we have to focus on.
The PLC is used for generating a movement, the drive will execute it. Between there the Apps or firmware will take care of it. I do not know if there are differences between some release versions. But to solve it we need the most information we can get.
We checked internally what happende. Indead the commanded value jumps to "0" generating the excessive position jump.
In the drive I did not find a way to accept this jump.
While the commanded value jumps to "0" when you stop the plc, a solution can be to first move to "0" with the axis.
And then stop the PLC programm to change code or whatever.
It seems to be that the ctrlX drive accept this without generating the F4037.
This can be a solution. The other way is that Codesys keeps a variable at the last known value. But PLC on STOP is as I told before a creul stop... I do not know if anything is possible, while STOP is a special kind of state....