[etherlab-users] Warnings during code generation with simulink

Jannes Kloepfer J.Kloepfer at web.de
Fri Feb 5 08:17:48 CET 2010


Hi, 

I’m new to Etherlab and Ethercat and I’ve some problems to get it working. 

When I try to compile the example.mdl from the Etherlab-Bundle I get the following warnings:

 

### Starting Real-Time Workshop build procedure for model: example
### Generating code into build directory: /usr/local/matlab/work/example_etl_rtw
### Invoking Target Language Compiler on example.rtw
    tlc
    -r
    /usr/local/matlab/work/example_etl_rtw/example.rtw
    /opt/etherlab/etherlab-1.3-pre-r589/rtw/etherlab/etherlab.tlc
    -O/usr/local/matlab/work/example_etl_rtw
    -I/opt/etherlab/etherlab-1.3-pre-r589/rtw/etherlab
    -I/opt/etherlab/rtw/blocks/EtherCAT
    -I/usr/local/matlab/work/example_etl_rtw/tlc
    -I/usr/local/matlab/rtw/c/tlc/mw
    -I/usr/local/matlab/rtw/c/tlc/lib
    -I/usr/local/matlab/rtw/c/tlc/blocks
    -I/usr/local/matlab/rtw/c/tlc/fixpt
    -I/usr/local/matlab/stateflow/c/tlc
    -aEnforceIntegerDowncast=1
    -aFoldNonRolledExpr=1
    -aInlineInvariantSignals=0
    -aInlineParameters=0
    -aLocalBlockOutputs=0
    -aRollThreshold=5
    -aZeroInternalMemoryAtStartup=1
    -aZeroExternalMemoryAtStartup=1
    -aInitFltsAndDblsToZero=1
    -aGenerateReport=0
    -aGenCodeOnly=0
    -aRTWVerbose=1
    -aIncludeHyperlinkInReport=0
    -aLaunchReport=0
    -aGenerateTraceInfo=0
    -aForceParamTrailComments=0
    -aGenerateComments=1
    -aIgnoreCustomStorageClasses=1
    -aIncHierarchyInIds=0
    -aMaxRTWIdLen=31
    -aShowEliminatedStatements=0
    -aIncDataTypeInIds=0
    -aInsertBlockDesc=0
    -aSimulinkBlockComments=1
    -aInlinedPrmAccess="Literals"
    -aTargetFcnLib="ansi_tfl_tmw.mat"
    -aIsPILTarget=0
    -aLogVarNameModifier="rt_"
    -aGenerateFullHeader=1
    -aExtMode=0
    -aExtModeStaticAlloc=0
    -aExtModeTesting=0
    -aExtModeStaticAllocSize=1000000
    -aExtModeTransport=0
    -aRTWCAPISignals=1
    -aRTWCAPIParams=1
    -aGenerateASAP2=0
    -aBufferTime=10
    -aOverrunCount=1000
    -aStackSize=2000
    -aETLDecimation=1
    -aVerboseBuild=0
    -aStagingDir=""
    -aModulePayload="example.mdl"
    -aGenerateTraceInfo=0
    -p10000


### Loading TLC function libraries

.....
### Initial pass through model to cache user defined code
.
### Caching model source code
.......
### Generating TLC interface API.
...
### Writing source file example_capi.c
.
### Writing header file example_capi.h
................
### Writing header file example_types.h
### Writing source file example.c
### Writing header file example.h
.
### Writing header file example_private.h
### Writing header file rtmodel.h
### Writing source file example_data.c
### Writing header file rt_nonfinite.h
.
### Writing source file rt_nonfinite.c
### TLC code generation complete.
### Evaluating PostCodeGenCommand specified in the model
### Generating parameter meta information: example_meta.txt
.
### Processing Template Makefile: /opt/etherlab/etherlab-1.3-pre-r589/rtw/etherlab/etherlab_kmod.tmf
### example.mk which is generated from /opt/etherlab/etherlab-1.3-pre-r589/rtw/etherlab/etherlab_kmod.tmf is up to date
### Building example: /usr/local/matlab/bin/glnx86/gmake -f example.mk  GENERATE_REPORT=0 EXT_MODE=0 EXTMODE_STATIC_ALLOC=0 EXTMODE_STATIC_ALLOC_SIZE=1000000 EXTMODE_TRANSPORT=0
  CC     rtw_wrapper.o
  CC     rtw_app_info.o
  CC     example_capi.o
  CC     example_data.o
  CC     rt_nonfinite.o

  CC     rtw_data_interface.o
//opt/etherlab/rtw/src/rtw_data_interface.c: In Funktion »rtw_capi_init«:
//opt/etherlab/rtw/src/rtw_data_interface.c:409: Warnung: Variable »tid« wird nicht verwendet
//opt/etherlab/rtw/src/rtw_data_interface.c:407: Warnung: Variable »samplePeriodPtr« wird nicht verwendet
  CC     example.o
  AR     examplelib.a
  LD     example_obj.o_shipped
### Created example_obj.o_shipped
Generating module_payload.c
# Call KBuild process
gmake[1]: Betrete Verzeichnis '/usr/src/linux-headers-2.6.24.7-rtai-3.6.2'
  CC [M]  /usr/local/matlab/work/example_etl_rtw/rt_app_main.o
  CC [M]  /usr/local/matlab/work/example_etl_rtw/module_payload.o
  LD [M]  /usr/local/matlab/work/example_etl_rtw/example_kmod.o
  Building modules, stage 2.
  MODPOST 1 modules
WARNING: could not find /usr/local/matlab/work/example_etl_rtw/.example_obj.o_shipped.cmd for /usr/local/matlab/work/example_etl_rtw/example_obj.o_shipped
WARNING: "ecrt_master_receive" [/usr/local/matlab/work/example_etl_rtw/example_kmod.ko] undefined!
WARNING: "rt_sem_wait" [/usr/local/matlab/work/example_etl_rtw/example_kmod.ko] undefined!
WARNING: "ecrt_master_create_domain" [/usr/local/matlab/work/example_etl_rtw/example_kmod.ko] undefined!
WARNING: "ecrt_version_magic" [/usr/local/matlab/work/example_etl_rtw/example_kmod.ko] undefined!
WARNING: "ecrt_master_send" [/usr/local/matlab/work/example_etl_rtw/example_kmod.ko] undefined!
WARNING: "start_rt_app" [/usr/local/matlab/work/example_etl_rtw/example_kmod.ko] undefined!
WARNING: "ecrt_domain_queue" [/usr/local/matlab/work/example_etl_rtw/example_kmod.ko] undefined!
WARNING: "ecrt_slave_config_sdo16" [/usr/local/matlab/work/example_etl_rtw/example_kmod.ko] undefined!
WARNING: "ecrt_master_sync_slave_clocks" [/usr/local/matlab/work/example_etl_rtw/example_kmod.ko] undefined!
WARNING: "ecrt_slave_config_sdo32" [/usr/local/matlab/work/example_etl_rtw/example_kmod.ko] undefined!
WARNING: "rt_sem_init" [/usr/local/matlab/work/example_etl_rtw/example_kmod.ko] undefined!
WARNING: "ecrt_master_application_time" [/usr/local/matlab/work/example_etl_rtw/example_kmod.ko] undefined!
WARNING: "ecrt_slave_config_reg_pdo_entry" [/usr/local/matlab/work/example_etl_rtw/example_kmod.ko] undefined!
WARNING: "ecrt_domain_process" [/usr/local/matlab/work/example_etl_rtw/example_kmod.ko] undefined!
WARNING: "ecrt_domain_state" [/usr/local/matlab/work/example_etl_rtw/example_kmod.ko] undefined!
WARNING: "ecrt_master_callbacks" [/usr/local/matlab/work/example_etl_rtw/example_kmod.ko] undefined!
WARNING: "ecrt_master_state" [/usr/local/matlab/work/example_etl_rtw/example_kmod.ko] undefined!
WARNING: "rt_sem_signal" [/usr/local/matlab/work/example_etl_rtw/example_kmod.ko] undefined!
WARNING: "ecrt_master_slave_config" [/usr/local/matlab/work/example_etl_rtw/example_kmod.ko] undefined!
WARNING: "sin" [/usr/local/matlab/work/example_etl_rtw/example_kmod.ko] undefined!
WARNING: "ecrt_slave_config_dc" [/usr/local/matlab/work/example_etl_rtw/example_kmod.ko] undefined!
WARNING: "cos" [/usr/local/matlab/work/example_etl_rtw/example_kmod.ko] undefined!
WARNING: "ecrt_slave_config_pdos" [/usr/local/matlab/work/example_etl_rtw/example_kmod.ko] undefined!
WARNING: "ecrt_master_sync_reference_clock" [/usr/local/matlab/work/example_etl_rtw/example_kmod.ko] undefined!
WARNING: "ecrt_domain_external_memory" [/usr/local/matlab/work/example_etl_rtw/example_kmod.ko] undefined!
WARNING: "rt_var_exit" [/usr/local/matlab/work/example_etl_rtw/example_kmod.ko] undefined!
WARNING: "ecrt_domain_size" [/usr/local/matlab/work/example_etl_rtw/example_kmod.ko] undefined!
WARNING: "stop_rt_app" [/usr/local/matlab/work/example_etl_rtw/example_kmod.ko] undefined!
WARNING: "ecrt_master_activate" [/usr/local/matlab/work/example_etl_rtw/example_kmod.ko] undefined!
WARNING: "ecrt_release_master" [/usr/local/matlab/work/example_etl_rtw/example_kmod.ko] undefined!
WARNING: "ecrt_request_master" [/usr/local/matlab/work/example_etl_rtw/example_kmod.ko] undefined!
WARNING: "ecrt_slave_config_sdo8" [/usr/local/matlab/work/example_etl_rtw/example_kmod.ko] undefined!
  CC      /usr/local/matlab/work/example_etl_rtw/example_kmod.mod.o
  LD [M]  /usr/local/matlab/work/example_etl_rtw/example_kmod.ko
gmake[1]: Verlasse Verzeichnis '/usr/src/linux-headers-2.6.24.7-rtai-3.6.2'
### Created kernel module: ../example_kmod.ko
### Successful completion of Real-Time Workshop build procedure for model: example

 
Especially the warnings about the tid-variable and the samplePeriodPtr-varibale are dubious. 

I just removed the digital devices and configured the other blocks corresponding to my connected Ethercat Hardware (BK1100+EL4034+EL3102) 

After starting the created module on the target I get further warnings from the master:

 

Failed to configure mapping of PDO 0x1600
Failed to configure mapping of PDO 0x1602
Failed to configure mapping of PDO 0x1602
Failed to configure mapping of PDO 0x1603
Slave 1 does not support changing the PDO mapping

 

Slave 1 is an EL4034  4-Channel Analog Output Terminal, -10..+10 V, 12 bit 

Everything else seems to be ok – the slave states switched to OP and I can also connect to the process via Testmanager. 

The problem is that there is no signal at the output channels from the EL4034. There should be a constant voltage about 10V on output 1 and a sine wave with amplitude of 10V and a frequency of 10Hz at ouput 2. 

But when I connect my hardware configuration to Twincat everything works fine. I can measure the correct signal at the output channels and I can also read the correct values at the input channels.

 
Thanks for any help in advance!


Best regards,

 

Jannes Kloepfer
______________________________________________________
GRATIS für alle WEB.DE-Nutzer: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://movieflat.web.de




More information about the Etherlab-users mailing list