[etherlab-dev] [Rtai] Ethercat/RTAI-Module Problem

Malte Lutz adkins42 at gmx.de
Fri Mar 4 10:32:35 CET 2011


Hello Hans,

thx for your reply, i thought of something similar. I` ll do some more 
research on that.

What i also know concerning your answer (if you are interested):

keep writing the bits is not necessary. If i use a flag to write only 
once but keep on looping in the run function, the leds stay on too. But 
the loop is necessary.
So i guess it is somehow important to call the functions from line 
573-585 and 617-623 in a loop.

regards

Malte




On 04.03.2011 09:18, Hans-Wilhelm Mehrkens wrote:
> hello
> as far as i know all beckhoff bus coupler (including the ethercat 
> ones) have a timeout timer built in, that means writing only once is 
> not sufficient to hold the outputs on.
> It needs to write continiously to the device to avoid a timeout.
> regards hans
>
>
> Malte Lutz schrieb:
>> <div class="moz-text-flowed" style="font-family: -moz-fixed">Hello,
>>
>> i' ve taken the RTAI-Example Module from the ethercat manual and 
>> modified it to be able to write bits to the Beckhoff EL2004 Slave 
>> (Digital Outputs) among other things.
>>
>> to describe my problem i uploaded 2 different versions of my code:
>>
>> 1. http://pastebin.com/ERFhuhy7
>> 2. http://pastebin.com/EiJeRJ1A
>>
>>
>> My problem lays in the function "run" (line 565-631):
>>
>> In the code-version 2 i have an infinite loop, which writes 4 bits to 
>> my EL2004 (1111). This works properly (LEDs are on)!
>> In the code-version 1 i commented out the loop to write the 4 bits 
>> only once to the EL2004 and not infinite times, but that doesnt work 
>> (LEDs stay off). Can someone explain me why this is happening?
>>
>>
>> thx
>>
>> Malte
>>
>>
>>
>> </div>
>
>




More information about the Etherlab-dev mailing list