Softmotion Interpolator behaves strange

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

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!

Best reply by Soap

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

View original
MDS_PLCProj.projectarchive.zip
166.34MB
6 replies