<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Axis in Structure</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/5e23c24a59/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/5e23c24a59/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/5e23c24a59/</id><updated>2020-02-27T13:48:31.959000Z</updated><subtitle>Recent posts to Axis in Structure</subtitle><entry><title>Axis in Structure</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/5e23c24a59/?limit=25#fe16" rel="alternate"/><published>2020-02-27T13:48:31.959000Z</published><updated>2020-02-27T13:48:31.959000Z</updated><author><name>Bobbypointe</name><uri>https://forge.codesys.com/u/bobbypointe/</uri></author><id>https://forge.codesys.comc4312f1c060567191348d3a33ff0164cb09c5cf9</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;once again thanks.&lt;br/&gt;
I didn't know the REF principle... and command "REF="&lt;br/&gt;
Works well too...&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Axis in Structure</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/5e23c24a59/?limit=25#b62f" rel="alternate"/><published>2020-02-27T13:48:31.880000Z</published><updated>2020-02-27T13:48:31.880000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.com4c7be3bf212db77a49da70f314c963c0f112cd7d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; scott_cunningham&lt;/p&gt;
&lt;p&gt;Since you are using reference, this is better:  _Test._Axis REF= SM_Drive_Virtual.&lt;/p&gt;
&lt;p&gt;It's the same idea as pointers and ADR, without having to dereference with ^ all the time.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Axis in Structure</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/5e23c24a59/?limit=25#9be5" rel="alternate"/><published>2020-02-27T13:48:31.811000Z</published><updated>2020-02-27T13:48:31.811000Z</updated><author><name>Bobbypointe</name><uri>https://forge.codesys.com/u/bobbypointe/</uri></author><id>https://forge.codesys.com0d1f0dd8c656c8c45e7032a3e0c27dadc0ec6fdf</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I Got it !!!&lt;/p&gt;
&lt;p&gt;Structure declaration&lt;br/&gt;
&lt;span style="color: #0000FF;"&gt;TYPE &lt;/span&gt;Axis_Structure :&lt;br/&gt;
&lt;span style="color: #0000FF;"&gt;STRUCT&lt;/span&gt;&lt;br/&gt;
    _Axis:  &lt;span style="color: #0000FF;"&gt;POINTER TO &lt;/span&gt;AXIS_REF_SM3;&lt;br/&gt;
    _Power : MC_Power;&lt;br/&gt;
        bOn : BOOL;&lt;br/&gt;
        bStart : BOOL;&lt;br/&gt;
 &lt;span style="color: #0040FF;"&gt;END_STRUCT&lt;br/&gt;
END_TYPE&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Then a link to set _Test._Axis := ADR(SM8Drive_Virtual) , it links the drive to the structure name&lt;br/&gt;
Then the MC_power input axis should be _Test._Axis^ to link the adresse content...&lt;/p&gt;
&lt;p&gt;Thanks for your help...&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: 2015" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=1492"/&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: 2015" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=1491"/&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: 2015" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=1490"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Axis in Structure</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/5e23c24a59/?limit=25#2542" rel="alternate"/><published>2020-02-27T13:48:31.744000Z</published><updated>2020-02-27T13:48:31.744000Z</updated><author><name>Bobbypointe</name><uri>https://forge.codesys.com/u/bobbypointe/</uri></author><id>https://forge.codesys.comedf12adc42cb006fb53fe40f6825c8664b80ebb1</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I'm sorry I don't get what you mean.&lt;br/&gt;
I have to link the Axis of my structure to the virtual axis...&lt;br/&gt;
In order to do that I have to link the virtual axis to the name of my structure.&lt;br/&gt;
It means at some point, I have to have something like &lt;/p&gt;
&lt;p&gt;_Test.Axis := SM_Drive_Virtual;&lt;br/&gt;
But as this lin,k should be bidierctional, maybe I have to go through pointer?&lt;/p&gt;
&lt;p&gt;I try to figure how to do this, but without success up to now...&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Axis in Structure</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/5e23c24a59/?limit=25#dd41" rel="alternate"/><published>2020-02-27T13:48:31.665000Z</published><updated>2020-02-27T13:48:31.665000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.com27467f659f43202aacf129dc6047f1877e3a111a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; scott_cunningham&lt;/p&gt;
&lt;p&gt;Try _Test_Axis._Axis instead. SM_Drive_vritual is not your axis steucture type, only of your _Axis member....&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Axis in Structure</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/5e23c24a59/?limit=25#6e49" rel="alternate"/><published>2020-02-27T13:48:31.593000Z</published><updated>2020-02-27T13:48:31.593000Z</updated><author><name>Bobbypointe</name><uri>https://forge.codesys.com/u/bobbypointe/</uri></author><id>https://forge.codesys.com2674bcee430be73613fd1598f7786c460517dc7b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Scott,&lt;/p&gt;
&lt;p&gt;Thanks for your answer...&lt;br/&gt;
What you write makes a lot of sense because the Axis should be writable in the structure. &lt;br/&gt;
I have tried what you suggested, unfortunately, it creates exception in my PLC.&lt;/p&gt;
&lt;p&gt;I have try with Pointer too without any success...&lt;br/&gt;
If you have any other Idea, I will read them with pleasure&lt;/p&gt;
&lt;p&gt;My structure declaration is &lt;br/&gt;
&lt;span style="color: #0000FF;"&gt;TYPE  &lt;/span&gt;Axis_Structure :&lt;br/&gt;
&lt;span style="color: #0000FF;"&gt;STRUCT&lt;/span&gt;&lt;br/&gt;
    _Axis:  &lt;span style="color: #0000FF;"&gt;REFERENCE TO &lt;/span&gt;AXIS_REF_SM3;&lt;br/&gt;
    _Power : MC_Power;&lt;br/&gt;
        bOn : &lt;span style="color: #0000FF;"&gt;BOOL&lt;/span&gt;;&lt;br/&gt;
        bStart : &lt;span style="color: #0000FF;"&gt;BOOL&lt;/span&gt;;&lt;br/&gt;
 &lt;span style="color: #0000FF;"&gt;END_STRUCT&lt;br/&gt;
END_TYPE&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Build is ok&lt;br/&gt;
But when I login and start the project...&lt;br/&gt;
I have this&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: 2015" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=1489"/&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: 2015" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=1488"/&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: 2015" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=1487"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Axis in Structure</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/5e23c24a59/?limit=25#cdf1" rel="alternate"/><published>2020-02-27T13:48:31.511000Z</published><updated>2020-02-27T13:48:31.511000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.com2c0a242ada9a0ae0696b3ec1d40bdb5899f0d205</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; scott_cunningham&lt;/p&gt;
&lt;p&gt;In your structure, I think it should be REFERENCE TO AXIS_REF_VIRTUAL_SM3 because your assignment of Axe_Virtua1 to _Test_Axis is a one way data transfer. Soft motion axes are VAR_IN_OUT types, which means data is assigned in both ways. &lt;/p&gt;
&lt;p&gt;With REFERENCE TO, you only need to make the assignment once, and your _Test_Axis will actually be a pointer to your Axe_Virtual1 (which is what you were looking to do, if I understand correctly).&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Axis in Structure</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/5e23c24a59/?limit=25#bd2b" rel="alternate"/><published>2020-02-27T13:48:31.227000Z</published><updated>2020-02-27T13:48:31.227000Z</updated><author><name>Bobbypointe</name><uri>https://forge.codesys.com/u/bobbypointe/</uri></author><id>https://forge.codesys.comee86a4a94ecc85fb24d9daafcac3917cb578cc75</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Everybody,&lt;/p&gt;
&lt;p&gt;I'm trying to insert Axis Structure in Structure like this:&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #0000FF;"&gt;TYPE &lt;/span&gt;Axis_Structure :&lt;br/&gt;
&lt;span style="color: #0000FF;"&gt;STRUCT&lt;/span&gt;&lt;br/&gt;
    _AXis : AXIS_REF_VIRTUAL_SM3;&lt;br/&gt;
    _Power : MC_Power;&lt;br/&gt;
        bOn : &lt;span style="color: #0000FF;"&gt;BOOL&lt;/span&gt;;&lt;br/&gt;
        bStart : &lt;span style="color: #0000FF;"&gt;BOOL&lt;/span&gt;;&lt;br/&gt;
 &lt;span style="color: #0000FF;"&gt;END_STRUCT&lt;br/&gt;
END_TYPE&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Then I declare a virtual axis in the SoftMotion General Axis Pool as Axe_Virtuel1&lt;br/&gt;
In the POU PLC_PRG this declaration&lt;br/&gt;
_test: Axis_Structure;&lt;/p&gt;
&lt;p&gt;And _Test.axis := Axe_Virtuel1;&lt;/p&gt;
&lt;p&gt;But when I want to use this axis in a MC_POWER for example, the axis can't be started, it seems not being reactiong on the MC_POWER input.&lt;/p&gt;
&lt;p&gt;It means I'm doing something wrong...&lt;br/&gt;
Can Someone show me the right way?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: 2015" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=1480"/&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: 2015" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=1479"/&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: 2015" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=1478"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>