OK, I still need help. The problem persists. The reason why I was getting 10V is because I set it with the Beckhoff Master Sample and then set the EL4732 back to "init". For some reason, the EL4732 kept the output voltage.
I think I did not quite get how to configure PDO's and SM's. Most of the time, I get domain state 1 or the actual working counter does not match the expected working counter. The code from my first mail seems to work fine according to the logs, but no output voltage is generated. Any help would be appreciated. Greets, Daniel -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Daniel Bechter Sent: Wednesday, 15. April 2009 13:58 To: [email protected] Subject: Re: [etherlab-dev] EtherCAT :: generating voltage on BeckhoffEL4732terminal fails 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: [email protected] [mailto:[email protected]] On Behalf Of Daniel Bechter Sent: Wednesday, 15. April 2009 11:45 To: [email protected] 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 _______________________________________________ etherlab-dev mailing list [email protected] http://lists.etherlab.org/mailman/listinfo/etherlab-dev _______________________________________________ etherlab-dev mailing list [email protected] http://lists.etherlab.org/mailman/listinfo/etherlab-dev
