[etherlab-users] A question about ecrt_master_reference_clock_time

2018-12-28 Thread Mohsen Alizadeh Noghani
Hello everyone. When "ecrt_master_reference_clock_time" is called, does EtherCAT Master read the reference clock at that instant (i.e. it communicates with the reference slave specifically for reading its clock), or does the clock value already exist in the datagram received by

Re: [etherlab-users] Syncing master to the reference slave: should I care?

2018-11-21 Thread Mohsen Alizadeh Noghani
d out the new data > before the slaves need it. You don't really care too much about jitter here. > > > > > > Lastly, if you are getting timing error's using option 2 then your master > time compensation method is probably wrong. I don't use the timing method > from the rtai

[etherlab-users] Syncing master to the reference slave: should I care?

2018-11-17 Thread Mohsen Alizadeh Noghani
Hello everyone. In terms of choosing the reference clock in the network, there are two options. In the first method, PC clock is chosen as the reference and in the second one, slave 0's clock is the reference. 1- Syncing slave 0's clock to the master (application) time: this is the method used by

[etherlab-users] Difference between "default" and "stable-1.5" branches

2018-11-15 Thread Mohsen Alizadeh Noghani
Hello everyone. What is the difference between "default" and "stable-1.5" branches of the SourceForge repository? I know the"default" version is the one for applying Gavin's patchest to. Is "stable-1.5" basically "default" + the patches in "stable" folder of the patchset? Best, Mohsen

Re: [etherlab-users] Measuring the frequency of master sending the frames to network

2018-10-28 Thread Mohsen Alizadeh Noghani
with FIFO scheduler) Best, Mohsen On Sun, Oct 7, 2018 at 10:29 PM Mohsen Alizadeh Noghani < m.aliza...@gmail.com> wrote: > Dear Graeme, > Thanks for the excellent and detailed explanation. Since I'm already using > distributed clocks in my program, I think I just have to do captu

[etherlab-users] A question about the master's clock synchronization algorithm used in rtai_rtdm_dc

2018-10-28 Thread Mohsen Alizadeh Noghani
Hello everyone. In the rtai_rtdm_dc example, there is a choice of syncing the master's clock to the reference slave, instead of the other way around. The algorithm is basically implemented in three functions, *system_time_ns*, *sync_distributed_clocks, *and *update_master_clock.* There are many

Re: [etherlab-users] Problem with reading reference clock time: Slave synchronization datagram was not received.

2018-10-26 Thread Mohsen Alizadeh Noghani
Calling the function after *ert_master_receive* and before *ecrt_domain_queue() *fixed the issue. (At the moment, I have only tested it on stable-1.5). Best, Mohsen On Fri, Oct 26, 2018 at 11:29 AM Mohsen Alizadeh Noghani < m.aliza...@gmail.com> wrote: > Hello everyone. > Following

[etherlab-users] Problem with reading reference clock time: Slave synchronization datagram was not received.

2018-10-26 Thread Mohsen Alizadeh Noghani
Hello everyone. Following my previous email, I have tried reading the 32-bit time of the reference clock by *ecrt_master_reference_clock_time* in various versions of the library. Here are the results of calling this function in userspace code: - 1.5.2 (*Failed to get reference clock time:

[etherlab-users] Failed to get reference clock time: Input/output error

2018-10-26 Thread Mohsen Alizadeh Noghani
Hello everyone. When I call *ecrt_master_reference_clock_time -*right after *ecrt_master_sync_slave_clocks()- *in my userspace code, I get the following error every cycle. *Failed to get reference clock time: Input/output error.* I'm using stable-1.5 branch. Has anyone been able to resolve this

[etherlab-users] RTAI + DC: Extremely poor and inconsistent performance.

2018-10-25 Thread Mohsen Alizadeh Noghani
Hello everyone. I can't consistently run a very simple EtherLab RTAI code with distributed clocks at more than about 100 Hz! If I increase the frequency, I usually get the EtherCAT error: *AL status message 0x0032: "PLL error

[etherlab-users] Where, in the application cycle, should I call ecrt_master_64bit_reference_clock_time/queue?

2018-10-25 Thread Mohsen Alizadeh Noghani
Hello everyone. I would like to know where should I call *ecrt_master_64bit_reference_clock_time_queue() * and *ecrt_master_64bit_reference_clock_time() * 1- with respect to each other (does it matter which one is called first?) 2- with respect the distributed clock function calls? i.e.

[etherlab-users] Unable to write servo drive control word

2018-10-22 Thread Mohsen Alizadeh Noghani
Hi Jan. I don't think requesting OP mode is a good idea. Drive configuration (e.g. setting the control word) is often done in the PRE-OP state, which, if the master module is active, is automatically requested. Additionally, even if you do enter OP mode, you have to continually send frames in

Re: [etherlab-users] Problem with distributed clocks in RTAI: "Slave did not sync after 5000 ms" & "No Sync Error"

2018-10-22 Thread Mohsen Alizadeh Noghani
Both problems were fixed by using the latest snapshot of stable-1.5 branch (commit 336963) in SourceForge. Best, Mohsen On Mon, Oct 22, 2018 at 11:07 AM Mohsen Alizadeh Noghani < m.aliza...@gmail.com> wrote: > I think I'm dealing with two separate problems here: > 1- `abs_sync_d

Re: [etherlab-users] Problem with distributed clocks in RTAI: "Slave did not sync after 5000 ms" & "No Sync Error"

2018-10-22 Thread Mohsen Alizadeh Noghani
033/ethercatsystem/1072494091.html=>: "No Sync Error". Best, Mohsen On Sat, Oct 20, 2018 at 2:08 PM Mohsen Alizadeh Noghani < m.aliza...@gmail.com> wrote: > Also notable is that the userspace code reaches the 10 microseconds > threshold after 5.2 seconds, despite having hal

Re: [etherlab-users] Problem with distributed clocks in RTAI: "Slave did not sync after 5000 ms" & "No Sync Error"

2018-10-20 Thread Mohsen Alizadeh Noghani
Also notable is that the userspace code reaches the 10 microseconds threshold after 5.2 seconds, despite having half the update rate of RTAI (1 kHz vs. 2 kHz). Best, Mohsen On Sat, Oct 20, 2018 at 1:58 PM Mohsen Alizadeh Noghani < m.aliza...@gmail.com> wrote: > Update: I

Re: [etherlab-users] Problem with distributed clocks in RTAI: "Slave did not sync after 5000 ms" & "No Sync Error"

2018-10-20 Thread Mohsen Alizadeh Noghani
-0: Register request successful.* *kernel: [14576.050335] EtherCAT DEBUG 0-0: Now in SAFEOP.* - Is there something wrong with the algorithm used for nudging "abs_sync_diff" towards 0? - If so, why does it work perfectly fine in the userspace, but not in RTAI? Best, Mohsen On Fri, Oct 19, 2

[etherlab-users] Problem with distributed clocks in RTAI: "Slave did not sync after 5000 ms" & "No Sync Error"

2018-10-19 Thread Mohsen Alizadeh Noghani
Hello everyone. I'm using kernel 3.4.6, RTAI 4.0 and IgH Master 1.5.2. When running a simple RTAI program that uses distributed clocks (basically the dc_rtai example), I encounter the following kernel log: *kernel: [

Re: [etherlab-users] rtai_rtdm example code hangs after activating master

2018-10-16 Thread Mohsen Alizadeh Noghani
Update: The problem persists in the latest update from SourceForge. Best, Mohsen On Mon, Oct 15, 2018 at 11:43 PM Mohsen Alizadeh Noghani < m.aliza...@gmail.com> wrote: > I should have also mentioned that I'm using kernel 3.4.6 and IgH EtherCAT > Master 1.5.2. > Best, > Mohsen

Re: [etherlab-users] rtai_rtdm example code hangs after activating master

2018-10-15 Thread Mohsen Alizadeh Noghani
I should have also mentioned that I'm using kernel 3.4.6 and IgH EtherCAT Master 1.5.2. Best, Mohsen On Mon, Oct 15, 2018 at 2:26 PM Mohsen Alizadeh Noghani < m.aliza...@gmail.com> wrote: > Running the rtai_rtdm example hangs at "ecrt_master_activate". This > happens in s

[etherlab-users] rtai_rtdm example code hangs after activating master

2018-10-15 Thread Mohsen Alizadeh Noghani
Running the rtai_rtdm example hangs at "ecrt_master_activate". This happens in such a way that I can't even stop the process with a ctrl+c signal. *Additional info:* - Nothing out of ordinary in dmesg, the last message is, *EtherCAT successfully requested master 0.* - I'm using r8169 driver (the

[etherlab-users] Can I only apply gavinl's driver patches?

2018-10-11 Thread Mohsen Alizadeh Noghani
I'm using kernel 4.1.18 and RTAI 5.0.1. Patched r8169 drivers are available in gavinl's patchset for kernel 4.1, 4.1.13, and 4.1.14. 1- Considering my kernel version, which one do you suggest I use? 2- What do I have do to

Re: [etherlab-users] Measuring the frequency of master sending the frames to network

2018-10-07 Thread Mohsen Alizadeh Noghani
tion is running at 1khz then this value rolls > over every 4.2 odd seconds, so gets more complicated to track long running > time. Gavinl's patchset adds the ability to read the whole 64bit timestamp > using ecrt_master_sync_slave_clocks(). > > > > Regards, > > Gra

Re: [etherlab-users] Measuring the frequency of master sending the frames to network

2018-10-07 Thread Mohsen Alizadeh Noghani
; particular slave you’re using exposes these for diagnostic purposes; > otherwise I don’t recommend trying to crack an off-the-shelf slave open to > try to access these signals.  > > > > *From:* Graeme Foot > *Sent:* Wednesday, 3 October 2018 12:20 > *To:* Mohsen Alizadeh Nog

Re: [etherlab-users] etherlab-users Digest, Vol 136, Issue 8

2018-10-05 Thread Mohsen Alizadeh Noghani
chazka) >2. Re: How to check if all slaves have reached operational > state? (Christoph Schroeder) > > > ------ > > Message: 1 > Date: Thu, 4 Oct 2018 17:15:34 -0400 > From: Ian Prochazka > To: Moh

[etherlab-users] Xenomai vs. RTAI+RTDM

2018-10-05 Thread Mohsen Alizadeh Noghani
Hello everyone. It seems to me that for executing hard real-time programs alongside userspace applications (e.g. a GUI), there are two possibilities: Xenomai and RTAI+RTDM. ("Vanilla" RTAI programs are kernel modules so I think using a GUI alongside it is out of the picture.). How do these two

[etherlab-users] How to check if all slaves have reached operational state?

2018-10-04 Thread Mohsen Alizadeh Noghani
Dear EtherLab users, After activating the master and starting frame exchange, is there a way to check whether all states have reached operational? *Additional info:* Currently, in my code , I just send empty frames for long enough

Re: [etherlab-users] Error flag after requesting SAFEOP

2018-10-03 Thread Mohsen Alizadeh Noghani
Activating the master resolved this issue. ecrt_master_activate takes care of state transitions from PREOP to OP. Best, Mohsen On Fri, Sep 28, 2018 at 3:56 PM Mohsen Alizadeh Noghani < m.aliza...@gmail.com> wrote: > Having read EtherCAT and EtherLab documentation a bit more, > >

Re: [etherlab-users] API for enabling/disabling sync managers of a slave

2018-10-01 Thread Mohsen Alizadeh Noghani
atchdog if you’re setting it to have zero PDOs. > > > > It sounds like you should probably read the documentation for the EtherCAT > protocol and for the Etherlab master in particular. > > > > *From:* Mohsen Alizadeh Noghani > *Sent:* Wednesday, 26 September 2018 04

Re: [etherlab-users] Error flag after requesting SAFEOP

2018-09-28 Thread Mohsen Alizadeh Noghani
Os contained in the SM and then also actually use at > least one PDO from each SM in your domain mapping. Typically you use > ecrt_slave_config_pdos to do the former and ecrt_domain_reg_pdo_entry_list > for the latter. See the example code. > > > > *From:* Mohsen Aliz

Re: [etherlab-users] Read from/write to the slave's object dictionary using SDOs

2018-09-26 Thread Mohsen Alizadeh Noghani
methods to perform > polling on the realtime thread (for some extra code complexity). > > > > If it’s just something you need to do during commissioning and then never > again (eg. if you can save the setting to the slave permanently), then you > can use the “ethercat download”

Re: [etherlab-users] API for enabling/disabling sync managers of a slave

2018-09-25 Thread Mohsen Alizadeh Noghani
: > You need to write an application, and then use > ecrt_slave_config_sync_manager or ecrt_slave_config_pdos to configure the > Sync Managers for each slave. > > > > *From:* Mohsen Alizadeh Noghani > *Sent:* Tuesday, 25 September 2018 02:29 > *To:* etherlab-users@etherlab

[etherlab-users] Read from/write to the slave's object dictionary using SDOs

2018-09-25 Thread Mohsen Alizadeh Noghani
Hello everyone. How can I read from or write to an entry of a slave's object dictionary using SDO? I'm going to do this before my real-time task. For example, I would like to set the value of 0x6040 to 15 before my cyclic task. Best, Mohsen ___

[etherlab-users] API for enabling/disabling sync managers of a slave

2018-09-24 Thread Mohsen Alizadeh Noghani
Hello everyone. Is there a function call that I can use for enabling a particular sync manager of a slave? For example, I'd like to enable sync manager 2 of slave 1. Best, Mohsen ___ etherlab-users mailing list etherlab-users@etherlab.org

[etherlab-users] Which version of kernel and RTAI should I use?

2018-09-23 Thread Mohsen Alizadeh Noghani
Hello everyone, I have recently decided to try EtherLab and I intend to use it on RTAI, with a Realtek (either 8139 or 8169) network card. I'm using an ordinary Intel CPU. I'm not sure about the best combination of EtherLab, kernel and RTAI. My only constraint is for the installation process to