Dear Community User! We have started the migration process.
This community is now in READ ONLY mode.
Read more: Important information on the platform change.

cancel
Showing results for 
Search instead for 
Did you mean: 
SOLVED

Error F4037 after stopping PLC program

Error F4037 after stopping PLC program

LvEkk
Member

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

8 REPLIES 8

MichaelB
Community Moderator
Community Moderator

Please check, if you activated ctrlX MOTION. PLCopen commands only work with activated ctrlX MOTION:

  • Could you please provide us some more information about your system settings? E.g. send a system report so we get an overview what is exactly installed.
  • Which library are you using the MC_Power from?
  • What means stopping the PLC program? E.g. shutting down PLC, using MC_Stop
  • Do you accidentally or intended write the cyclic position command value via PLC and ctrlX MOTION at the same time?

 

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

LvEkk_0-1665749752185.png

- I have the motion app disabled so this can't be the issue. 

FranzClt
Established Member

I have it try with my system.

Softmotion 4.12

ctrlX CODESYS Sioftmotion Adaption 1.14

but it runs and if i stop the PLC there is no Error

 

Hello FranzClt,

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. 

Pinball_NL_0-1668506470984.png

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. 

Pinball_NL_1-1668506485749.png

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.... 

 

 

Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist