[etherlab-dev] EtherCAT :: generating voltage on Beckhoff EL4732terminal fails

Daniel Bechter daniel.bechter at omicron.at
Wed Apr 15 13:57:48 CEST 2009


Aaaah, I got the solution... I swapped most significant and least significant
byte. Instead of '7FFF', one has to write 'FF7F' for 10V into the image.


-----Original Message-----
From: etherlab-dev-bounces at etherlab.org
[mailto:etherlab-dev-bounces at etherlab.org] On Behalf Of Daniel Bechter
Sent: Wednesday, 15. April 2009 11:45
To: etherlab-dev at etherlab.org
Subject: [etherlab-dev] EtherCAT :: generating voltage on Beckhoff
EL4732terminal fails


Hey guys,

my name is Daniel Bechter and I am currently evaluating the EtherLab
EtherCAT-Master. I already succeeded in writing some sample tasks.
One for example reads out DIP switches (input data) and mirrors the binary
value, which is being set, to LED's (output data). This example works with
the Beckhoff EL9800 Evaluation-Board and its DIP switches and LED's connected
to the simple digital I/O interfaces of the ET1100 ASIC (configured for
16-bit digital I/O).
Another task is a port of the Beckhoff PLC application which communicates
with the Slave Sample Code written to the PIC on the Beckhoff EL9800
Evaluation-Board (ET1100 configured for SPI).

I then went a step further with Beckhoff EtherCAT terminals. My simple
configuration looks as follows:
EK1100 (coupler) -> EL4732 (analog out)

What I tried to do was generating a voltage on the analog output of the
EL4732. So I wrote a little task which maps SM0 (PDO's 0x1600 and 0x1680) and
then writes 0x7FFF (which the EL4732 should translate to 10V) to the offset
of PDO 0x1600 (Ch1 Sample Value) cyclicly. I tried to measure the voltage
with a multimeter, but I failed (measured 0V). Attached you will find some
files for debugging:

main.c: source code of the task
ec_user_example_output: console output of the task
commandline_tool_output: slaves, their XML device descriptions and states
when running the task, I/O data
syslog: EtherCAT-Master log messages

>From commandline_tool_output you can see that 0x7FFF is written to the I/O
image. The EL4732 does not output the desired voltage however.

I also ran TwinCAT to verify that my configuration was actually working and
that my idea was correct. Wenn writing 0x7FFF to the Ch1 Sample Value field
of the I/O image, the EL4732 generated the 10V output.

Does anybody have a clue what's wrong with my task? I am kind of stuck here.

 <<commandline_tool_output>>  <<ec_user_example_output>>  <<syslog>>  
<<main.c>> 

Greets,
Daniel



More information about the Etherlab-dev mailing list