<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to CNC Editor and Expressions</title><link href="https://forge.codesys.com/forge/talk/Motion/thread/04fc3652d9/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Motion/thread/04fc3652d9/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Motion/thread/04fc3652d9/</id><updated>2020-02-27T18:36:58.759000Z</updated><subtitle>Recent posts to CNC Editor and Expressions</subtitle><entry><title>CNC Editor and Expressions</title><link href="https://forge.codesys.com/forge/talk/Motion/thread/04fc3652d9/?limit=25#88fa" rel="alternate"/><published>2020-02-27T18:36:58.759000Z</published><updated>2020-02-27T18:36:58.759000Z</updated><author><name>eschwellinger</name><uri>https://forge.codesys.com/u/eschwellinger/</uri></author><id>https://forge.codesys.com9494e7acc3ce1b03695c108d509d95b54c9f03d5</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;sorry, expressions in CNC editor are not yet supported. There is a tracking issue for it&lt;/p&gt;
&lt;p&gt;you need a *.CNC file, SMC_ReadNcFile2 and SMC_NCInterpreter FBs to do this.&lt;br/&gt;
If needed I will attach an example.&lt;br/&gt;
BR&lt;br/&gt;
Edwin&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="https://forum.codesys.com//download/file.php?id=4643" rel="nofollow"&gt;CNC_Expressions.cnc.txt &lt;span&gt;&lt;span&gt;[51 Bytes]&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="https://forum.codesys.com//download/file.php?id=4642" rel="nofollow"&gt;CNCExpressions.project &lt;span&gt;&lt;span&gt;[145.05 KiB]&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CNC Editor and Expressions</title><link href="https://forge.codesys.com/forge/talk/Motion/thread/04fc3652d9/?limit=25#b291" rel="alternate"/><published>2020-02-27T18:36:57.575000Z</published><updated>2020-02-27T18:36:57.575000Z</updated><author><name>Fless</name><uri>https://forge.codesys.com/u/fless/</uri></author><id>https://forge.codesys.comcf47292fc0c6306e8ee03dc3943486a06c91608d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;After the update and a restart the CNC Editor still shows errors when programs contain expressions.&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: cnc editor marker.png" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=4640"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CNC Editor and Expressions</title><link href="https://forge.codesys.com/forge/talk/Motion/thread/04fc3652d9/?limit=25#66ca" rel="alternate"/><published>2020-02-27T18:36:56.333000Z</published><updated>2020-02-27T18:36:56.333000Z</updated><author><name>eschwellinger</name><uri>https://forge.codesys.com/u/eschwellinger/</uri></author><id>https://forge.codesys.com2f91ee930edf2f1aa16e212c23be280c4869fb6f</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;br/&gt;
go to the packageManager and update the SoftMotion version to current.&lt;/p&gt;
&lt;p&gt;BR&lt;br/&gt;
Edwin&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: Update.png" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=4638"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CNC Editor and Expressions</title><link href="https://forge.codesys.com/forge/talk/Motion/thread/04fc3652d9/?limit=25#7aed" rel="alternate"/><published>2020-02-27T18:36:53.120000Z</published><updated>2020-02-27T18:36:53.120000Z</updated><author><name>Fless</name><uri>https://forge.codesys.com/u/fless/</uri></author><id>https://forge.codesys.come285e73f7b13fa3f9a2fef3a2f84bf52e0bb3d6c</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I was using the CNC Edtor with SMC_CNC_REF objects in Codesys 3.5.11.&lt;br/&gt;
SMC_CNC_REF because I need to use variables in my programs.&lt;/p&gt;
&lt;p&gt;Now I upgraded to Codesys 3.5.13 (Softmotion 4.4.0.2) which supports expressions in CNC programms.&lt;br/&gt;
The documentation states I need to use SMC_ReadNCFile2 and SMC_NCInterpreter&lt;br/&gt;
to use this feature.&lt;br/&gt;
So I created a new CNC program as file (as input to SMC_ReadNCFile2).&lt;/p&gt;
&lt;p&gt;But when I use an expressions in the program like:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;N000&lt;/span&gt; &lt;span class="n"&gt;G01&lt;/span&gt; &lt;span class="n"&gt;X0&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;845&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;79&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The CNC Editor shows 'unexpected token'.&lt;/p&gt;
&lt;p&gt;What I'm i doing wrong?&lt;br/&gt;
The example for sub programs and expressions shows the CNC programs as&lt;br/&gt;
external file in the project. But I need the CNC editor for preview and debugging.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>