Stepperonline A6 Ethercat - Digital IO [SOLVED]

More
5 months 1 week ago #346608 by spumco
Got the inputs figured out.

1.  Program drive so all inputs are 'no function assigned'

2. Change xml input address HAL name:
Code:
<pdoEntry idx="60FD" subIdx="00" bitLen="32" halPin="digitalinputs" halType="u32"/>

3. Add bitslice to HAL, using the bit chart from the servo manual:
Code:
loadrt bitslice count=1 personality=32 addf    bitslice.0              servo-thread    #DRIVE IO net DI-X-IN     <=  lcec.0.A6.digitalinputs net DI-X-IN     =>  bitslice.0.in net DI-X-IN-16  <=  bitslice.0.out-16 net DI-X-IN-17  <=  bitslice.0.out-17 net DI-X-IN-18  <=  bitslice.0.out-18 net DI-X-IN-19  <=  bitslice.0.out-19 net DI-X-IN-20  <=  bitslice.0.out-20

Now I can press buttons connected to the drive and all five inputs react in halshow.  Rather exciting...

Next step is to see if I can fumble through changing the PDOs to 'fixed' and somehow map the outputs.

Anyone have a clue what 'sub-index 1' means?
 
The following user(s) said Thank You: tommylight

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

More
5 months 1 week ago #346626 by rodw
You don't need bitslice, just do it in the xml
Code:
<pdoEntry idx="60FD" subIdx="0" bitLen="32" halType="complex"> <complexEntry bitLen="1" halPin="CW-limit" halType="bit"/> <complexEntry bitLen="1" halPin="CCW-limit" halType="bit"/> <complexEntry bitLen="1" halPin="in-home" halType="bit"/> <complexEntry bitLen="13"/> <complexEntry bitLen="1" halPin="in-1" halType="bit"/> <complexEntry bitLen="1" halPin="in-2" halType="bit"/> <complexEntry bitLen="1" halPin="in-3" halType="bit"/> <complexEntry bitLen="1" halPin="in-4" halType="bit"/> <complexEntry bitLen="1" halPin="in-5" halType="bit"/> <complexEntry bitLen="1" halPin="in-6" halType="bit"/> <complexEntry bitLen="10"/> </pdoEntry>
 NOte there are some unused bits in this example
The following user(s) said Thank You: spumco

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

More
5 months 6 days ago #346628 by spumco
Thanks Rod, I found another example - which pointed me to your GH example.  I've now got the XML and HAL configured like your example, and evern figured out how to use the "sub-index" stuff.

Remaining problem is that the manual is missing the bit values for digital outputs.

There's no corresponding chart or description for index 60FE like there is for the inputs.

I can 'talk' to the 60FEh address and write values - and see them change in the tuning software - but I've no idea what values turn on/off the outputs.

 

Based on the two output-related sub-indexes I'm also wondering if there's some requirement to first enable the outputs, then activate them.

I checked the OEM servo manufacturer's manual and no luck (JSS servos - JSS715N).

I tried bits 1 & 2, as well as bits 16 & 17 - based on the now-obsolete T7/leadshine servos.  Wild chance, but no dice.

Also tried turning both sub-indexes on, still no joy.

I've emailed Stepperonline, no response yet.

Anyone have a suggestion?

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

More
5 months 6 days ago - 5 months 6 days ago #346629 by rodw
type:
ethercat pdos > pdos.txt
ethercat sdos > sdos.txt
and share the output here.

Probably something like
Code:
<pdoEntry idx="60FE" subIdx="1" bitLen="16" halType="complex"> <complexEntry bitLen="1" halPin="out-1" halType="bit"/> <complexEntry bitLen="1" halPin="out-2" halType="bit"/> <complexEntry bitLen="14"/> </pdoEntry> also adapted from my GitHub example  
Last edit: 5 months 6 days ago by rodw.

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

More
5 months 6 days ago #346631 by spumco
no sdos.txt was created.

pdos.txt below:
Code:
M0: PhysAddr 0x1000, DefaultSize  256, ControlRegister 0x26, Enable 1 SM1: PhysAddr 0x1400, DefaultSize  256, ControlRegister 0x22, Enable 1 SM2: PhysAddr 0x1800, DefaultSize   12, ControlRegister 0x64, Enable 1   RxPDO 0x1600 ""     PDO entry 0x6040:00, 16 bit, ""     PDO entry 0x607a:00, 32 bit, ""     PDO entry 0x60b8:00, 16 bit, ""     PDO entry 0x6060:00,  8 bit, ""     PDO entry 0x60fe:01, 32 bit, ""     PDO entry 0x60fe:02, 32 bit, "" SM3: PhysAddr 0x1c00, DefaultSize   28, ControlRegister 0x20, Enable 1   TxPDO 0x1a00 ""     PDO entry 0x6041:00, 16 bit, ""     PDO entry 0x6064:00, 32 bit, ""     PDO entry 0x60ba:00, 32 bit, ""     PDO entry 0x60bc:00, 32 bit, ""     PDO entry 0x60b9:00, 16 bit, ""     PDO entry 0x603f:00, 16 bit, ""     PDO entry 0x60fd:00, 32 bit, ""     PDO entry 0x60f4:00, 32 bit, ""

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

More
5 months 6 days ago #346633 by rodw
ok, seems its like
Code:
<syncManager idx="3" dir="in"> <pdo idx="1a00"> ....... <pdoEntry idx="60FD" subIdx="0" bitLen="32" halType="complex"> <complexEntry bitLen="1" halPin="CW-limit" halType="bit"/> <complexEntry bitLen="1" halPin="CCW-limit" halType="bit"/> <complexEntry bitLen="1" halPin="in-home" halType="bit"/> <complexEntry bitLen="13"/> <complexEntry bitLen="1" halPin="in-1" halType="bit"/> <complexEntry bitLen="1" halPin="in-2" halType="bit"/> <complexEntry bitLen="1" halPin="in-3" halType="bit"/> <complexEntry bitLen="1" halPin="in-4" halType="bit"/> <complexEntry bitLen="1" halPin="in-5" halType="bit"/> <complexEntry bitLen="1" halPin="in-6" halType="bit"/> <complexEntry bitLen="10"/> </pdoEntry> </pdo>

Keep the rest of the entries there. Things like status words are important
Also make sure the total bits adds up to 32, pad out unused ones
 

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

Time to create page: 0.168 seconds
Powered by Kunena Forum