--- a/plcopen/instances_path.xslt Fri Sep 20 13:38:58 2019 +0200
+++ b/plcopen/instances_path.xslt Tue Sep 24 11:58:31 2019 +0200
@@ -62,9 +62,9 @@
<xsl:template match="ppx:dataType">
- <xsl:param name="instance_path"/>
+ <xsl:param name="instance_path" select="concat('#',@name)"/> <xsl:apply-templates select="ppx:baseType/*[self::ppx:derived or self::ppx:struct or self::ppx:array]">
- <xsl:with-param name="parent_path">
+ <xsl:with-param name="variable_path"> <xsl:value-of select="$instance_path"/>
@@ -108,12 +108,12 @@
<xsl:value-of select="@name"/>
+ <xsl:apply-templates select="ppx:type/*[self::ppx:derived or self::ppx:struct or self::ppx:array]"> + <xsl:with-param name="variable_path"> + <xsl:value-of select="$element_path"/> - <xsl:apply-templates select="ppx:type/*[self::ppx:derived or self::ppx:struct or self::ppx:array]">
- <xsl:with-param name="variable_path">
- <xsl:value-of select="$element_path"/>
<xsl:template match="ppx:array">
<xsl:param name="variable_path"/>
--- a/plcopen/instances_path.ysl2 Fri Sep 20 13:38:58 2019 +0200
+++ b/plcopen/instances_path.ysl2 Tue Sep 24 11:58:31 2019 +0200
@@ -60,9 +60,9 @@
template "ppx:dataType" {
+ param "instance_path","concat('#',@name)"; apply "ppx:baseType/*[self::ppx:derived or self::ppx:struct or self::ppx:array]" {
- with "parent_path" > «$instance_path»
+ with "variable_path" > «$instance_path» @@ -94,9 +94,9 @@
foreach "ppx:variable[ppx:type/ppx:derived or ppx:type/ppx:struct or ppx:type/ppx:array]" {
variable "element_path" > «$variable_path».«@name»
- apply "ppx:type/*[self::ppx:derived or self::ppx:struct or self::ppx:array]" {
- with "variable_path" > «$element_path»
+ apply "ppx:type/*[self::ppx:derived or self::ppx:struct or self::ppx:array]" { + with "variable_path" > «$element_path» --- a/tests/python/plc.xml Fri Sep 20 13:38:58 2019 +0200
+++ b/tests/python/plc.xml Tue Sep 24 11:58:31 2019 +0200
@@ -1,7 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<project xmlns="http://www.plcopen.org/xml/tc6_0201" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xhtml="http://www.w3.org/1999/xhtml" xsi:schemaLocation="http://www.plcopen.org/xml/tc6_0201">
<fileHeader companyName="" productName="Beremiz" productVersion="0.0" creationDateTime="2008-12-14T16:21:19" contentDescription="This example shows many features in Beremiz: 1. How to implement python extensions. 2. How to implement basic C extension. 3. How to use C code in IEC POUs. 4. How to call C functions from python code. 5. How to avoid race conditions between IEC, C and python code. 6. How to convert betweet different IEC types. "/>
- <contentHeader name="Beremiz Python Support Tests" modificationDateTime="2018-09-26T13:15:28">
+ <contentHeader name="Beremiz Python Support Tests" modificationDateTime="2019-09-24T11:49:14"> <pageSize x="1024" y="1024"/>
@@ -49,6 +49,16 @@
+ <dataType name="blups"> + <dimension lower="0" upper="31"/> + <derived name="CPLX_TYPE"/> <pou name="main_pytest" pouType="program">
@@ -61,6 +71,9 @@
+ <xhtml:p><![CDATA[blah]]></xhtml:p> <variable name="mux2_sel">
@@ -1351,6 +1364,11 @@
+ <variable name="Dudiduda"> + <derived name="blups"/> @@ -1372,6 +1390,9 @@
(* If you do not use GetFbVar and SetFbVar macros, expect unexpected behaviour*)
+(* testing access to global struct array *) +Dudiduda[2].FIRSTBYTE := 0; @@ -1442,6 +1463,11 @@
+ <variable name="Dudiduda"> + <derived name="blups"/>