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

Softmotion Interpolator behaves strange

Softmotion Interpolator behaves strange

Soap
Established Member

Hello everyone,

Iam observing troubles with Codesys SoftMotion Interpolator. It interpolates one line again and again. It is stuct on objectNo = 1, and interpolator This takes place when file is interpreted into SMC_OutQueue (using FBs: SMC_ReadNCFile2, SMC_NCInterpreter, SMC_CheckVelocities).

When the same NC code copied into Codesys CNC program (within the PLC project), then the program runs without any trouble.

Tested NC Code:

N5 G00 X20 Y20 Z20
N10 G00 X0 Y0 Z0
N20 G01 X100 F10
N30 G01 Y50
N35 G03 X50 Y100 R50
N40 G01 X0
N50 G01 Y0
N60 G00 Z50
N70 M30

Project attached ctrlX PLC Engineering version 1.20.6, WORKS version 1.20.8

Soap_0-1709198714871.png

I wasted lots of time investigating, but still have no clue what to check. Has anybody ever faced this issues? I would really appreciate any hint. 

Thanks!

6 REPLIES 6

FranzClt
Established Member

Hello

in your program is missing the limitations of accelerations

Just insert in the first line N100 G53 F3000 E1000 E-1000

for error handling in the Softmotion CNC please have a look in our example

 

Soap
Established Member

Hello Franz,

thank you very much for answer. Your solution with some dynamic limitations unfortunatelly did not helped. I also call the instance of SMC_ReadNCFile2 with some default values:

Soap_0-1709552769949.png

Regarding the error handling - can you be more specific?

I found you use instance of FB SMC_CNC_REF - what that FB is used for? The given example does not show the idea as well as documentation. It seems that it somehow constraints some start position with given NC file:

Soap_0-1709562573723.png

Thank you for explanations!

BR Jan

 

FranzClt
Established Member

Hello jan

What for error message to you have.

Have you tryed my example

BR Franz

Soap
Established Member

Hello Franz,

trouble is that no error comes. The interpolator is repeating one movement endlessly. It moves from start to target position and when target position is reached interpolator's command value jumps back to start postion. This creates a gap which is covered by some gap acceleration deceleration and also velocity, so axes moves back to start pos. Axes catch up interpolator's set positions and moving to target position. When target reached the interpolator setpositions are back to start position which again creates gap. And so on, and so on... endless loop.

As this is caused only by Gcode from file and the GCode from project works fine I assume I have no problem with the program architecture, but there must be some difference between the OutQueue from file and OutQueue from project GCode.

So that is the situation. What to do now? Any ideas?

Thank you!

BR Jan

 

FranzClt
Established Member

Hello Jan

This looks like a known problem, have you tried the program with my example project?
Probably the input

fbSMC_Interpreter( sentences:= fbSMC_ReadNCfile2.sentences, bExecute:= TRUE, bAbort:= ,     bAppend:= ,

piStartPosition:=stSMC_StartPos,

...

To the error handling.
Each block has its own error output. In my example, I created under the actions "aErrorhandling" for the individual assemblies.

So please have a llok about my example.

 

Soap
Established Member

Hello Franz,

I have found the root cause of this problem. This was happening due to the different variabeles of type SMC_OUTQUEUE I used. I have used one variable (of type SMC_OutQueue) for "fileOperations" and copied the content after succesfull reading to the other instance of type SMC_OutQueue. The effect was overwritting the queue which caused the same row of file was executed again and again. My fault. But also big fault in documentation - there is not mentioned how to connect the FBs together and any row about the data flow or how does it work in general.

The solution is simple just to have only one instance. From the instance of FB SMC_CheckVelocities there comes pointer to SMC_OutQueue which is then only neccessary to copy into FB SMC_Interpolator. So the FB Interpolator works directly with output of FB CheckVelocities.

This is also why the "integrated NC program editor" was working fine. It generates variable of type SMC_OutQueue, which adress you then need to paste inside the FB SMC_Interpolator. When switched Interpolator input to integrated editor program then it run smoothly.

Anyway many thanks for your goodwill to help.

BR Jan

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