CODESYS - the IEC 61131-3 automation software
https://forum.codesys.com/

CNC Editor and Expressions
https://forum.codesys.com/viewtopic.php?f=6&t=9729
Page 1 of 1

Author:  Fless [ Tue May 07, 2019 7:24 am ]
Post subject:  CNC Editor and Expressions

Hello,

I was using the CNC Edtor with SMC_CNC_REF objects in Codesys 3.5.11.
SMC_CNC_REF because I need to use variables in my programs.

Now I upgraded to Codesys 3.5.13 (Softmotion 4.4.0.2) which supports expressions in CNC programms.
The documentation states I need to use SMC_ReadNCFile2 and SMC_NCInterpreter
to use this feature.
So I created a new CNC program as file (as input to SMC_ReadNCFile2).

But when I use an expressions in the program like:
Code:
N000 G01 X0.845 + 0.79

The CNC Editor shows 'unexpected token'.

What I'm i doing wrong?
The example for sub programs and expressions shows the CNC programs as
external file in the project. But I need the CNC editor for preview and debugging.

Author:  Edwin Schwellinger [ Tue May 07, 2019 1:37 pm ]
Post subject:  Re: CNC Editor and Expressions

Hi,
go to the packageManager and update the SoftMotion version to current.

BR
Edwin

Author:  Fless [ Wed May 08, 2019 6:54 am ]
Post subject:  Re: CNC Editor and Expressions

After the update and a restart the CNC Editor still shows errors when programs contain expressions.

Author:  Edwin Schwellinger [ Wed May 08, 2019 7:51 pm ]
Post subject:  Re: CNC Editor and Expressions

Hi,

sorry, expressions in CNC editor are not yet supported. There is a tracking issue for it

you need a *.CNC file, SMC_ReadNcFile2 and SMC_NCInterpreter FBs to do this.
If needed I will attach an example.
BR
Edwin

Page 1 of 1 All times are UTC+01:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/