How to write "glue module" in the AMKASYN Servo?

More
25 Feb 2011 01:53 - 25 Feb 2011 07:19 #7438 by linuxcnc1
hi,all
I'm using Servo inverter KE/KE and KU Option card EtherCAT (SoE) KW-EC1 / KU-EC1 at emc2.3.0(ubuntu8.0.4; IgH -ethercat-1.4.0),
but how to write glue module and hal?under EtherCAT (SoE) .thanks a lot~
now here is link info at emc2.3.0 and KM-r03(servo):
root@lcl-desktop:/home/lcl# /etc/init.d/ethercat start
Starting EtherCAT master 1.4.0 done
root@lcl-desktop:/home/lcl# /opt/etherlab/bin/ethercat master
Master0
Phase: Idle
Slaves: 0
Device0: 00:23:cd:92:66:7f (attached)
Tx count: 0
Rx count: 0
Device1: None.
root@lcl-desktop:/home/lcl# /opt/etherlab/bin/ethercat slave
0 0:0 PREOP + KW compact inverter module -R03 (SoE)
root@lcl-desktop:/home/lcl# /opt/etherlab/bin/ethercat slave -v
=== Slave 0 ===
State: PREOP
Flag: +
Identity:
Vendor Id: 0x000001eb
Product code: 0x00000001
Revision number: 0x01010312
Serial number: 0x00000000
Mailboxes:
RX: 0x1800/512, TX: 0x1c00/512
Supported protocols: SoE
General:
Group: Drive
Image name: DRIVE
Order number: KW (-R03)
Device name: KW compact inverter module -R03 (SoE)
Flags:
Enable SafeOp: no
Enable notLRW: no
Current consumption: 0 mA
root@lcl-desktop:/home/lcl#
root@lcl-desktop:/home/lcl# /opt/etherlab/bin/ethercat pdos
SM0: PhysAddr 0x1800, DefaultSize 512, ControlRegister 0x26, Enable 1
SM1: PhysAddr 0x1c00, DefaultSize 512, ControlRegister 0x22, Enable 1
SM2: PhysAddr 0x1000, DefaultSize 0, ControlRegister 0x24, Enable 1
RxPDO 0x0018 "MDT"
PDO entry 0x0086:00, 16 bit, "Master control word"
PDO entry 0x002f:00, 32 bit, "Position command value"
PDO entry 0x0024:00, 32 bit, "Velocity command value"
SM3: PhysAddr 0x1400, DefaultSize 0, ControlRegister 0x22, Enable 1
TxPDO 0x0010 "AT"
PDO entry 0x0087:00, 16 bit, "Drive status word"
PDO entry 0x0033:00, 32 bit, "Position feedback value 1"
PDO entry 0x0028:00, 32 bit, "Velocity feedback value"
root@lcl-desktop:/home/lcl# /opt/etherlab/bin/ethercat sdos
root@lcl-desktop:/home/lcl# /opt/etherlab/bin/ethercat sdo
root@lcl-desktop:/home/lcl# /opt/etherlab/bin/ethercat xml
<?xml version="1.0" ?>
<EtherCATInfo>
<!-- Slave 0 -->
<Vendor>
<Id>491</Id>
</Vendor>
<Descriptions>
<Devices>
<Device>
<Type ProductCode="#x00000001" RevisionNo="#x01010312">KW (-R03)</Type>
<Name><![CDATA[KW compact inverter module -R03 (SoE)]]></Name>
<Sm Enable="1" StartAddress="6144" ControlByte="38" DefaultSize="512" />
<Sm Enable="1" StartAddress="7168" ControlByte="34" DefaultSize="512" />
<Sm Enable="1" StartAddress="4096" ControlByte="36" DefaultSize="0" />
<Sm Enable="1" StartAddress="5120" ControlByte="34" DefaultSize="0" />
<RxPdo Sm="2" Fixed="1" Mandatory="1">
<Index>#x0018</Index>
<Name>MDT</Name>
<Entry>
<Index>#x0086</Index>
<SubIndex>0</SubIndex>
<BitLen>16</BitLen>
<Name>Master control word</Name>
<DataType>UINT16</DataType>
</Entry>
<Entry>
<Index>#x002f</Index>
<SubIndex>0</SubIndex>
<BitLen>32</BitLen>
<Name>Position command value</Name>
<DataType>UINT32</DataType>
</Entry>
<Entry>
<Index>#x0024</Index>
<SubIndex>0</SubIndex>
<BitLen>32</BitLen>
<Name>Velocity command value</Name>
<DataType>UINT32</DataType>
</Entry>
</RxPdo>
<TxPdo Sm="3" Fixed="1" Mandatory="1">
<Index>#x0010</Index>
<Name>AT</Name>
<Entry>
<Index>#x0087</Index>
<SubIndex>0</SubIndex>
<BitLen>16</BitLen>
<Name>Drive status word</Name>
<DataType>UINT16</DataType>
</Entry>
<Entry>
<Index>#x0033</Index>
<SubIndex>0</SubIndex>
<BitLen>32</BitLen>
<Name>Position feedback value 1</Name>
<DataType>UINT32</DataType>
</Entry>
<Entry>
<Index>#x0028</Index>
<SubIndex>0</SubIndex>
<BitLen>32</BitLen>
<Name>Velocity feedback value</Name>
<DataType>UINT32</DataType>
</Entry>
</TxPdo>
</Device>
</Devices>
</Descriptions>
</EtherCATInfo>
Last edit: 25 Feb 2011 07:19 by linuxcnc1.

Please Log in or Create an account to join the conversation.

More
27 Feb 2011 01:36 #7481 by andypugh
Have you seen this page?
linuxcnc.org/docs/html/hal_comp.html

It describes the basics of writing a realtime HAL component.

Or is your question more specific?

Please Log in or Create an account to join the conversation.

Time to create page: 0.746 seconds
Powered by Kunena Forum