[etherlab-users] generate Simulink block from .xml file

Richard Hacker (MSc Eng) ha at igh-essen.com
Fri May 22 08:58:11 CEST 2009


The number of inputs is up to you and depends on the input vector width! The 
block will allows a vector of up to 4 values on that port. The output vector 
width should be correct.

- Richard

On Wednesday 20 May 2009 15:33, you wrote:
> Hi,
> that's not my problem. I was able to produce this block, but the number
> of inputs and outputs (or the dimension of the individual inputs and
> outputs) is too small.
> For Example:
> The PDO input 'Single Control' from xml-file
>
>           <RxPdo Sm="2" Fixed="1" Mandatory="1">
>              <Index>#x1601</Index>
>              <Name>Single Control</Name>
>              <Entry>
>                <Index>#x2040</Index>
>                <SubIndex>0</SubIndex>
>                <BitLen>16</BitLen>
>                <Name>Controlword X1</Name>
>                <DataType>UINT16</DataType>
>              </Entry>
>              <Entry>
>                <Index>#x2840</Index>
>                <SubIndex>0</SubIndex>
>                <BitLen>16</BitLen>
>                <Name>Controlword X2</Name>
>                <DataType>UINT16</DataType>
>              </Entry>
>              <Entry>
>                <Index>#x3040</Index>
>                <SubIndex>0</SubIndex>
>                <BitLen>16</BitLen>
>                <Name>Controlword Y1</Name>
>                <DataType>UINT16</DataType>
>              </Entry>
>              <Entry>
>                <Index>#x3840</Index>
>                <SubIndex>0</SubIndex>
>                <BitLen>16</BitLen>
>                <Name>Controlword Y2</Name>
>                <DataType>UINT16</DataType>
>              </Entry>
>            </RxPdo>
>
> is four-dimensional (I think it must be a vector input with 4 Element of
> uint16). The input line is only one-dimensional (uint16). That is the
> reason that the number of inputs is too schmall.
>
>
> - Dominik
>
> Richard Hacker (MSc Eng) schrieb:
> > Hi,
> >
> > I cannot reproduce your problem. Attached is a screenshot where I
> > successfully loaded your xml file and it seems fine.
> >
> > Note that you cannot enter the name of a .mat file into the EtherCATInfo
> > space. If you do not want to wait for the xml parser to parse your xml
> > file on every update, you can cache the parsing by loading the file
> > manually:
> >
> > MatlabPrompt>> ei = EtherCATInfo('/path/to/IDAM_DMD_dk.xml')
> >
> > and then use ei (note no quotes!) instead of '/path/to/IDAM_DMD_dk.xml'
> > in the EtherCATInfo field.
> >
> > - Richard
> >
> > On Wednesday 20 May 2009 11:52, Dominik Karolewski wrote:
> >> Hi,
> >>
> >> I have problems to generate the correct Simulink Slave block from the
> >> '.xml'- file below. I'm missing all the subindices in Simulink block
> >> in- and outputports. I use the setup.m file in
> >> opt/etherlab/rtw/blocks/EtherCAT/xml/ to generate the .mat file for the
> >> Simulink block.
> >> We are working with MATLAB2007b and EtherLab® Bundle 1.6.
> >>
> >> Best Regards
> >>
> >> Dipl.-Math. Dominik Karolewski
> >> Mitarbeiter
> >>
> >> IMMS Institut für Mikroelektronik- und Mechatronik-Systeme gGmbH
> >> Ehrenbergstrasse 27
> >> D - 98693 Ilmenau
> >> WWW   : http://www.imms.de
> >
> > ------------------------------------------------------------------------

-- 
------------------------------------------------------------------------

Richard Hacker
Ingenieurgemeinschaft IgH
Gesellschaft für Ingenieurleistungen mbH
Heinz-Baecker-Str. 34
D-45356 Essen
Tel.: +49 201 / 360-14-16
Fax.: +49 201 / 360-14-14
Mobil: +49 175 6822089
E-mail: ha at igh-essen.com

------------------------------------------------------------------------



More information about the Etherlab-users mailing list