<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to SM3_Basic.IAxisRef.GetAxisRefPointer not working?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/bed10c4cdd/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/bed10c4cdd/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/bed10c4cdd/</id><updated>2021-12-28T17:08:52.432000Z</updated><subtitle>Recent posts to SM3_Basic.IAxisRef.GetAxisRefPointer not working?</subtitle><entry><title>SM3_Basic.IAxisRef.GetAxisRefPointer not working?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/bed10c4cdd/?limit=25#2a35" rel="alternate"/><published>2021-12-28T17:08:52.432000Z</published><updated>2021-12-28T17:08:52.432000Z</updated><author><name>dwpessoa</name><uri>https://forge.codesys.com/u/dwpessoa/</uri></author><id>https://forge.codesys.come7ffacbfa2ef2a55cb091eced9ccbb79858399da</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi void, &lt;br/&gt;
GetAxisRefPointer is a method, try add "()" in the end:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="err"&gt;pAxisRefSm3 := itfAxisRef.GetAxisRefPointer();&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;/div&gt;</summary></entry><entry><title>SM3_Basic.IAxisRef.GetAxisRefPointer not working?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/bed10c4cdd/?limit=50#6680" rel="alternate"/><published>2021-12-28T16:25:11.442000Z</published><updated>2021-12-28T16:25:11.442000Z</updated><author><name>void</name><uri>https://forge.codesys.com/u/weixintan/</uri></author><id>https://forge.codesys.com850b3f7af58885795b7eda0afb7c942e99ce493c</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi, running "CODESYS V3.5 SP16" here, does anyone have a problem with the method in the title?&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="err"&gt;PROGRAM PLC_PRG&lt;/span&gt;
&lt;span class="err"&gt;VAR&lt;/span&gt;
&lt;span class="err"&gt;    itfAxisRef : SM3_Basic.IAxisRef;&lt;/span&gt;
&lt;span class="err"&gt;    pAxisRefSm3 : POINTER TO SM3_Basic.AXIS_REF_SM3;&lt;/span&gt;
&lt;span class="err"&gt;END_VAR&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="err"&gt;pAxisRefSm3 := itfAxisRef.GetAxisRefPointer;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Trying to compile the above throws the following error&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;C0032&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;  &lt;span class="n"&gt;Cannot&lt;/span&gt; &lt;span class="n"&gt;convert&lt;/span&gt; &lt;span class="n"&gt;type&lt;/span&gt; &lt;span class="s1"&gt;'GETAXISREFPOINTER(sm3_basic, 4.10.0.0 (3s - smart software solutions gmbh))'&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;type&lt;/span&gt; &lt;span class="s1"&gt;'POINTER TO SM3_Basic.AXIS_REF_SM3'&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;which has me really confused because I've never seen the type &lt;code&gt;GETAXISREFPOINTER&lt;/code&gt; and the documentation for &lt;code&gt;.GetAxisRefPointer&lt;/code&gt; states that it returns &lt;code&gt;POINTER TO AXIS_REF_SM3&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://help.codesys.com/webapp/3dvrBKsuKjYfmeP1KzrJnylfstc%2FGetAxisRefPointer;product=SM3_Basic;version=4.9.0.0" rel="nofollow"&gt;https://help.codesys.com/webapp/3dvrBKsuKjYfmeP1KzrJnylfstc%2FGetAxisRefPointer;product=SM3_Basic;version=4.9.0.0&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As for why I'm trying to use this method, I'm trying to loop through the array of axes in a &lt;code&gt;SM3_Robotics.AXIS_GROUP_REF_SM3&lt;/code&gt; to get their individual &lt;code&gt;SM3_Basic.SMC_AXIS_STATE&lt;/code&gt; (not only the &lt;code&gt;SM3_Robotics.SMC_AXIS_GROUP_STATE&lt;/code&gt;) for debugging&lt;/p&gt;
&lt;p&gt;Is there a better way to achieve the above without using the axes array?&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>