Ethercat HAL driver
03 May 2017 11:07 #92567
by cgc
Replied by cgc on topic Ethercat HAL driver
Hi Warren,
you need the halType complex only, if the drive send one variable that is a union of several individual variables.
E.g. position an status bits together.
With the complex type, you can divide it, like this.
The union is a variable with 48 bit, statusbits and position together.
The complex type divide it in single status bits and separate position
<pdoEntry idx="7000" subIdx="02" bitLen="48" halType="complex">
<complexEntry bitLen="1" halPin="X-cmd-SwitchOn" halType="bit"/>
<complexEntry bitLen="1" halPin="X-cmd-EnableVoltage" halType="bit"/>
<complexEntry bitLen="1" halPin="X-cmd-/QuickStop" halType="bit"/>
<complexEntry bitLen="1" halPin="X-cmd-EnableOperation" halType="bit"/>
<complexEntry bitLen="1" halPin="X-cmd-NewSetpoint" halType="bit"/>
<complexEntry bitLen="1" halPin="X-cmd-ChangeSetImmediatly" halType="bit"/>
<complexEntry bitLen="1" halPin="X-cmd-RelativPos" halType="bit"/>
<complexEntry bitLen="1" halPin="X-cmd-FaultReset" halType="bit"/>
<complexEntry bitLen="1" halPin="X-cmd-Halt" halType="bit"/>
<complexEntry bitLen="1" halPin="X-cmd-bit09" halType="bit"/>
<complexEntry bitLen="1" halPin="X-cmd-bit10" halType="bit"/>
<complexEntry bitLen="1" halPin="X-cmd-bit11" halType="bit"/>
<complexEntry bitLen="1" halPin="X-cmd-bit12" halType="bit"/>
<complexEntry bitLen="1" halPin="X-cmd-bit13" halType="bit"/>
<complexEntry bitLen="1" halPin="X-cmd-bit14" halType="bit"/>
<complexEntry bitLen="1" halPin="X-cmd-bit15" halType="bit"/>
<complexEntry bitLen="32" halPin="X-TargetPos" halType="float" scale="1000"/>
</pdoEntry>
regards Frank
you need the halType complex only, if the drive send one variable that is a union of several individual variables.
E.g. position an status bits together.
With the complex type, you can divide it, like this.
The union is a variable with 48 bit, statusbits and position together.
The complex type divide it in single status bits and separate position
<pdoEntry idx="7000" subIdx="02" bitLen="48" halType="complex">
<complexEntry bitLen="1" halPin="X-cmd-SwitchOn" halType="bit"/>
<complexEntry bitLen="1" halPin="X-cmd-EnableVoltage" halType="bit"/>
<complexEntry bitLen="1" halPin="X-cmd-/QuickStop" halType="bit"/>
<complexEntry bitLen="1" halPin="X-cmd-EnableOperation" halType="bit"/>
<complexEntry bitLen="1" halPin="X-cmd-NewSetpoint" halType="bit"/>
<complexEntry bitLen="1" halPin="X-cmd-ChangeSetImmediatly" halType="bit"/>
<complexEntry bitLen="1" halPin="X-cmd-RelativPos" halType="bit"/>
<complexEntry bitLen="1" halPin="X-cmd-FaultReset" halType="bit"/>
<complexEntry bitLen="1" halPin="X-cmd-Halt" halType="bit"/>
<complexEntry bitLen="1" halPin="X-cmd-bit09" halType="bit"/>
<complexEntry bitLen="1" halPin="X-cmd-bit10" halType="bit"/>
<complexEntry bitLen="1" halPin="X-cmd-bit11" halType="bit"/>
<complexEntry bitLen="1" halPin="X-cmd-bit12" halType="bit"/>
<complexEntry bitLen="1" halPin="X-cmd-bit13" halType="bit"/>
<complexEntry bitLen="1" halPin="X-cmd-bit14" halType="bit"/>
<complexEntry bitLen="1" halPin="X-cmd-bit15" halType="bit"/>
<complexEntry bitLen="32" halPin="X-TargetPos" halType="float" scale="1000"/>
</pdoEntry>
regards Frank
The following user(s) said Thank You: wazza77
Please Log in or Create an account to join the conversation.
03 May 2017 12:06 #92571
by roschi
Replied by roschi on topic Ethercat HAL driver
hi warren,
nice to see you agaim on this forum.
just a quick hint from my site. take into account that that the bytes in the sdoconfig -> sdoraw data are reverse orderded.
so eg. numerator shall be 0xe12 then the config is 12 0e
also do the math in the right way num/den shall be the smallest possible Integers in case for estun drives eg. not 4/8 more 1/2
hope that will help.
regards andreas
nice to see you agaim on this forum.
just a quick hint from my site. take into account that that the bytes in the sdoconfig -> sdoraw data are reverse orderded.
so eg. numerator shall be 0xe12 then the config is 12 0e
also do the math in the right way num/den shall be the smallest possible Integers in case for estun drives eg. not 4/8 more 1/2
hope that will help.
regards andreas
The following user(s) said Thank You: wazza77
Please Log in or Create an account to join the conversation.
03 May 2017 13:48 #92577
by wazza77
Replied by wazza77 on topic Ethercat HAL driver
Thanks Again guys
roschi now the numbers start making sense I will have a go at it. Do I still need to use the hall complex to specify the scale? If not how do I scale it? it is very frustrating knowing that it is only going to be a little thing that is stopping you in your tracks, but I get so focused that I can't see it! Anyway, this will make me learn more, and I sent you an email about this problem. But I also wanted to let you know about those lunyee drives with the
second encoder feedback loop from linear encoder etc. and your thoughts on them they are SV-DA200
Anyway, I will have a go at it tomorrow.
roschi now the numbers start making sense I will have a go at it. Do I still need to use the hall complex to specify the scale? If not how do I scale it? it is very frustrating knowing that it is only going to be a little thing that is stopping you in your tracks, but I get so focused that I can't see it! Anyway, this will make me learn more, and I sent you an email about this problem. But I also wanted to let you know about those lunyee drives with the
second encoder feedback loop from linear encoder etc. and your thoughts on them they are SV-DA200
Anyway, I will have a go at it tomorrow.
Please Log in or Create an account to join the conversation.
04 May 2017 02:26 #92615
by wazza77
Replied by wazza77 on topic Ethercat HAL driver
Ok I have removed the halType complex and if I put the scale to "1" i can get them operational but as you could imagine with the scale so low that half a turn shows as 500mm of travel on the axis DRO. now it I put scale to 10 I can start and get operational but as soon as I go to jog an axis it moves a little bit and throws up a joint following error for that axis also shows very large numbers on the axis DRO.
if I put the scale to 100 the drives throw an A07 alarm again
if I put the scale to 100 the drives throw an A07 alarm again
Please Log in or Create an account to join the conversation.
04 May 2017 15:25 #92650
by wazza77
Replied by wazza77 on topic Ethercat HAL driver
So I had to walk away from this for a while and think about what is happening. I came back tried a few things to no avail but
I have noticed when i put any number larger than 1 I get the joint folowing error. If I try to toggle machine power agian the sevo trys to run flat out for les then a second and throws a joint error. And the DRO numbers coming up for that axis are obsinely large like upto a km
(would be a big mill!) on the last setup scale="1000" and it worked flawlessly now is the issue to do with the halType special32 and im now using halType float? So I am unsure how the scale is working i have looked through the code on the git repository and tried to see how the scale system works and all i can say is i need to learn a lot more about some of the concepts in cpp but i can see how it is used in roschi's halType="special32" but i cant quite get a grip of how it works with the halType float I thin I might have to implement The special32 I can already feel the grey hair (well greyer hair)
I have noticed when i put any number larger than 1 I get the joint folowing error. If I try to toggle machine power agian the sevo trys to run flat out for les then a second and throws a joint error. And the DRO numbers coming up for that axis are obsinely large like upto a km
(would be a big mill!) on the last setup scale="1000" and it worked flawlessly now is the issue to do with the halType special32 and im now using halType float? So I am unsure how the scale is working i have looked through the code on the git repository and tried to see how the scale system works and all i can say is i need to learn a lot more about some of the concepts in cpp but i can see how it is used in roschi's halType="special32" but i cant quite get a grip of how it works with the halType float I thin I might have to implement The special32 I can already feel the grey hair (well greyer hair)
Please Log in or Create an account to join the conversation.
04 May 2017 15:55 #92659
by sirop
Replied by sirop on topic Ethercat HAL driver
My CanOpen manual says:
TARGET POSITION INDEX 0X607A
Type Access Units Range Map PDO Memory
Integer 32 RW counts - YES RF
Why should your 0X607A be a float?
TARGET POSITION INDEX 0X607A
Type Access Units Range Map PDO Memory
Integer 32 RW counts - YES RF
Why should your 0X607A be a float?
Please Log in or Create an account to join the conversation.
04 May 2017 22:21 #92678
by wazza77
Replied by wazza77 on topic Ethercat HAL driver
Hi sirop
I was only using float so that I could add scale. the generic.c will check that you have specified float if you have scale
as part of its error handling. I will spend a bit more time tonight going over the code to see how the scaling is implemented and I am looking to see if there is some sort of packet sniffer so I can see what is in the EtherCAT packet.
but this morning I have to drive into town its about 135km each way!
I was only using float so that I could add scale. the generic.c will check that you have specified float if you have scale
as part of its error handling. I will spend a bit more time tonight going over the code to see how the scaling is implemented and I am looking to see if there is some sort of packet sniffer so I can see what is in the EtherCAT packet.
but this morning I have to drive into town its about 135km each way!
Please Log in or Create an account to join the conversation.
- bleachkthe
- Offline
- New Member
Less
More
- Posts: 1
- Thank you received: 0
25 May 2017 23:14 #93646
by bleachkthe
Replied by bleachkthe on topic Ethercat HAL driver
Sorry at all a little info ... is possible to run ethercat driver over linuxmint 18 rt_preempt?
regards
BKT
regards
BKT
Please Log in or Create an account to join the conversation.
25 May 2017 23:21 #93647
by sirop
Replied by sirop on topic Ethercat HAL driver
Yes.
Please Log in or Create an account to join the conversation.
05 Jun 2017 12:52 #94087
by ChrisB
Replied by ChrisB on topic Ethercat HAL driver
Hello,
i am new to ethercat and linux.
But up to now i have installed IgH EtherCAT Master 1.5.2.
I have started ethercat master in the terminal with the gineric linux driver.
The networkleds are blinking and the statemachine is in the state: PREOP
But wehn i try to change to SAFEOP or to OP then the Slave gets the an Fieldbuserror with the wrong length.
I use a Kollmorgen Servostar 30361-NA with Ethercatmodul. Tho the Drive im am connected via RS232 with a Windowsnotebook an the Kollmorgen Drivesetupsoftware. Here i can see the AL-Controlword and AL-Statusword.
My assumption is that my mapping is wrong.
Here is the xml output from the comandlinetool:
i am using this doc : etherlab.org/download/ethercat/ethercat-1.5.2.pdf
and the attached Kollmorgen Ethercatdocument
on page 52 of ethercat-1.5.2.pdf is the SDO download described.
But i donĀ“t know how to download the attached S300 xml.
Can someone help me?
Thanks a lot
Christian
i am new to ethercat and linux.
But up to now i have installed IgH EtherCAT Master 1.5.2.
I have started ethercat master in the terminal with the gineric linux driver.
The networkleds are blinking and the statemachine is in the state: PREOP
But wehn i try to change to SAFEOP or to OP then the Slave gets the an Fieldbuserror with the wrong length.
I use a Kollmorgen Servostar 30361-NA with Ethercatmodul. Tho the Drive im am connected via RS232 with a Windowsnotebook an the Kollmorgen Drivesetupsoftware. Here i can see the AL-Controlword and AL-Statusword.
My assumption is that my mapping is wrong.
Here is the xml output from the comandlinetool:
<?xml version="1.0" ?>
<EtherCATInfo>
<!-- Slave 0 -->
<Vendor>
<Id>106</Id>
</Vendor>
<Descriptions>
<Devices>
<Device>
<Type ProductCode="#x03000600" RevisionNo="#x00000001">S300_S400_S600_S700</Type>
<Name><![CDATA[S300/S400/S600/S700 EtherCAT Drive (CoE)]]></Name>
<Sm Enable="1" StartAddress="#x1800" ControlByte="#x26" DefaultSize="512" />
<Sm Enable="1" StartAddress="#x1c00" ControlByte="#x22" DefaultSize="512" />
<Sm Enable="1" StartAddress="#x1100" ControlByte="#x24" DefaultSize="0" />
<Sm Enable="1" StartAddress="#x1140" ControlByte="#x20" DefaultSize="0" />
<RxPdo Sm="2" Fixed="1" Mandatory="1">
<Index>#x1702</Index>
<Name></Name>
<Entry>
<Index>#x606b</Index>
<SubIndex>0</SubIndex>
<BitLen>32</BitLen>
<Name></Name>
<DataType>UINT32</DataType>
</Entry>
<Entry>
<Index>#x6040</Index>
<SubIndex>0</SubIndex>
<BitLen>16</BitLen>
<Name></Name>
<DataType>UINT16</DataType>
</Entry>
</RxPdo>
<TxPdo Sm="3" Fixed="1" Mandatory="1">
<Index>#x1b01</Index>
<Name></Name>
<Entry>
<Index>#x6064</Index>
<SubIndex>0</SubIndex>
<BitLen>32</BitLen>
<Name></Name>
<DataType>UINT32</DataType>
</Entry>
<Entry>
<Index>#x6041</Index>
<SubIndex>0</SubIndex>
<BitLen>16</BitLen>
<Name></Name>
<DataType>UINT16</DataType>
</Entry>
</TxPdo>
</Device>
</Devices>
</Descriptions>
</EtherCATInfo>
i am using this doc : etherlab.org/download/ethercat/ethercat-1.5.2.pdf
and the attached Kollmorgen Ethercatdocument
on page 52 of ethercat-1.5.2.pdf is the SDO download described.
But i donĀ“t know how to download the attached S300 xml.
Can someone help me?
Thanks a lot
Christian
Please Log in or Create an account to join the conversation.
Time to create page: 0.149 seconds