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

2018-10-23 Thread Dr.-Ing. Wilhelm Hagemeister

Hallo Jan,

to clarify Mohsen response; you need an application which exchanges data 
cyclically. One can't get a drive or slave to "Operational" or write and 
read PDOS only with the ethercat command. See the example section in the 
ethercat repo for examples.


Regards Wilhelm.
___
etherlab-users mailing list
etherlab-users@etherlab.org
http://lists.etherlab.org/mailman/listinfo/etherlab-users


[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 order to "sustain" it. We only enter OP mode when we start giving
position command to drives.
Therefore, I suggest you try writing the controlword, with subindex, after
loading the master module (/etc/init.d/ethercat start). No additional
commands should be necessary.
Best,
Mohsen
___
etherlab-users mailing list
etherlab-users@etherlab.org
http://lists.etherlab.org/mailman/listinfo/etherlab-users


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

2018-10-22 Thread Jan Thogersen
Hi all,

I'm very new to the world of EtherCat so please excuse me if the question
is 'dumb'.

I'm a CNC hobbyist that was so lucky to stumble upon 3 Mitsubishi servo
drives with EtherCat option. I've been trying to get the drive to respond
via EtherCat and I have partial successful.
I can read parameters however I can't write them. Not being able to write
parameter also prevent me from setting the drive to operational mode.

Details:
Drive: Mitsubishi MR-J3-40A-RJ158
Master: IgH EtherCAT master 1.5.2 2eff7c993a63
NIC: e100e (Intel pro/1000)

Here is what I do:
I set an alias
"ethercat alias -p 0x0 0x1"

I set the drive to OP mode
"ethercat states -p 0 op"

I read the sdos to verify that the object directory is received (see
attachment)
"ethercat sdos -v"

I can read the status word
"ethercat upload -p 0 0x6041 0"
response: "0x4070 16496"

"ethercat upload -p 0 0x6040 0"
response: "0x0 0"

Then I try to clear" via the writable register 0x6040.
"sudo ethercat download -p 0 -a 1 -t uint16 0x6040 0x8"
response: "SDO transfer aborted with code 0x0602: This object does not
exist in the object directory".

or with subindex
"sudo ethercat download -p 0 -a 1 -t int16 0x6040 0x0 0x8"
response: "SDO transfer aborted with code 0x0601: Unsupported access to
an object"

What am I doing wrong? Why can't I write to the register?

Any help or hints are highly appreciated!

Best regards
  Jan Thogersen
[0.00] Initializing cgroup subsys cpuset
[0.00] Initializing cgroup subsys cpu
[0.00] Linux version 3.4-9-rtai-686-pae (Debian 3.4.55-4linuxcnc) () 
(gcc version 4.6.3 (Debian 4.6.3-14) ) #1 SMP PREEMPT Debian 3.4.55-4linuxcnc
[0.00] BIOS-provided physical RAM map:
[0.00]  BIOS-e820:  - 0009ec00 (usable)
[0.00]  BIOS-e820: 000f - 0010 (reserved)
[0.00]  BIOS-e820: 0010 - ddbffc00 (usable)
[0.00]  BIOS-e820: ddbffc00 - ddc53c00 (ACPI NVS)
[0.00]  BIOS-e820: ddc53c00 - ddc55c00 (ACPI data)
[0.00]  BIOS-e820: ddc55c00 - e000 (reserved)
[0.00]  BIOS-e820: f800 - fc00 (reserved)
[0.00]  BIOS-e820: fec0 - fed00400 (reserved)
[0.00]  BIOS-e820: fed2 - feda (reserved)
[0.00]  BIOS-e820: fee0 - fef0 (reserved)
[0.00]  BIOS-e820: ffb0 - 0001 (reserved)
[0.00]  BIOS-e820: 0001 - 00011800 (usable)
[0.00] Notice: NX (Execute Disable) protection cannot be enabled: 
non-PAE kernel!
[0.00] SMBIOS 2.5 present.
[0.00] DMI: Dell Inc. OptiPlex 760 /0M863N, BIOS A13 
08/04/2011
[0.00] e820 update range:  - 0001 (usable) 
==> (reserved)
[0.00] e820 remove range: 000a - 0010 (usable)
[0.00] last_pfn = 0xddbff max_arch_pfn = 0x10
[0.00] MTRR default type: write-back
[0.00] MTRR fixed ranges enabled:
[0.00]   0-9 write-back
[0.00]   A-B uncachable
[0.00]   C-D3FFF write-protect
[0.00]   D4000-E uncachable
[0.00]   F-F write-protect
[0.00] MTRR variable ranges enabled:
[0.00]   0 base 0DDE0 mask FFFE0 uncachable
[0.00]   1 base 0DE00 mask FFE00 uncachable
[0.00]   2 base 0DDD0 mask 0 uncachable
[0.00]   3 base 0E000 mask FE000 uncachable
[0.00]   4 disabled
[0.00]   5 disabled
[0.00]   6 disabled
[0.00] x86 PAT enabled: cpu 0, old 0x7040600070406, new 0x7010600070106
[0.00] found SMP MP-table at [c00fe710] fe710
[0.00] initial memory mapped : 0 - 0180
[0.00] Base memory trampoline at [c009a000] 9a000 size 16384
[0.00] init_memory_mapping: -377fe000
[0.00]  00 - 40 page 4k
[0.00]  40 - 003740 page 2M
[0.00]  003740 - 00377fe000 page 4k
[0.00] kernel direct mapping tables up to 0x377fdfff @ [mem 
0x017f8000-0x017f]
[0.00] RAMDISK: 36526000 - 3728b000
[0.00] ACPI: RSDP 000fec00 00024 (v02 DELL  )
[0.00] ACPI: XSDT 000fc91b 0006C (v01 DELLB10K0015 ASL  
0061)
[0.00] ACPI: FACP 000fca43 000F4 (v03 DELLB10K0015 ASL  
0061)
[0.00] ACPI: DSDT fff1ff98 05655 (v01   DELLdt_ex 1000 INTL 
20050624)
[0.00] ACPI: FACS ddbffc00 00040
[0.00] ACPI: SSDT fff2570c 000AA (v01   DELLst_ex 1000 INTL 
20050624)
[0.00] ACPI: APIC 000fcb37 00092 (v01 DELLB10K0015 ASL  
0061)
[0.00] ACPI: BOOT 000fcbc9 00028 (v01 DELLB10K0015 ASL  
0061)
[0.00] ACPI: ASF! 000fcbf1 00096 (v32 DELLB10K0015