IO Questions around mixing IO between Ethercat and Pi 5?

More
1 year 4 months ago #329948 by jhandel
that EasyCAT is an interesting bit of kit...

Please Log in to join the conversation.

More
1 year 4 months ago #330011 by zmrdko

Please Log in to join the conversation.

More
1 year 4 months ago #330092 by jhandel
looking at your code, are you getting 64 digital inputs and outputs you "could" address over EtherCat?

looking at your code your passing around the digital io around as a single 32bit int and you have 2 of them...

uint32_t outDigitalSet0;
uint32_t outDigitalSet1;

if you mix that with an I2C or SPI extender couldn't those be mapped to an I/O extender of some kind?

Please Log in to join the conversation.

More
1 year 4 months ago #330201 by zmrdko
i am sorry, it was some time ago. I believe that you can customize PDOs as you need.

Please Log in to join the conversation.

More
1 year 3 months ago #331266 by laurentl38
Hello zmrdko,

I just found your great work with the easycat card.
I'm starting to play with it, and it works great for digital input and output. With 1 encoder, no problem.

However, with 2 or more encoders, it doesn't work... As soon as I change the "QUADENCS" value to greater than 1, I can no longer connect to the easycat card. I get an error with the "easynavigator" software.
Have you ever had this problem?
Do you have any leads?

regards
Laurent

Attachment not found

Please Log in to join the conversation.

More
1 year 3 months ago #331449 by zmrdko
have you edited the Arduino sketch as well?

there is only one encoder defined:

github.com/zmrdko/3DWorks_EasyCAT/blob/m...orks_EasyCAT.ino#L93

lines 98 and 120/121

Please Log in to join the conversation.

More
1 year 3 months ago #331456 by laurentl38
in first time, yes i modified line 98 and add line 121
in second time, i mak a little modification at line 454 : 

but the same error still occurs.

 

Attachment not found

Please Log in to join the conversation.

More
1 year 3 months ago #331465 by laurentl38
it's very strang
I think I found the problem:
If I replace "QuadEncMp[0];" with "4" line 430, 435, ..

it's working.

replace for each encoder
:
#if QUADENCS >= 1
EncCount[0] = Encoder0.read()/QuadEncMp[0];

by
#if QUADENCS >= 1
EncCount[0] = Encoder0.read()/4;

Please Log in to join the conversation.

Time to create page: 0.055 seconds
Powered by Kunena Forum