Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is the significance of SubIndex when CA is TRUE? #27

Closed
ShabbyX opened this issue Jan 8, 2016 · 2 comments
Closed

What is the significance of SubIndex when CA is TRUE? #27

ShabbyX opened this issue Jan 8, 2016 · 2 comments

Comments

@ShabbyX
Copy link
Contributor

ShabbyX commented Jan 8, 2016

In ecx_SDOread() and ecxSDOwrite(), the parameter CA says:

FALSE = single subindex. TRUE = Complete Access, all subindexes read/written.

And the parameter SubIndex says:

Subindex to read, must be 0 or 1 if CA is used

What is the difference between 0 and 1 if CA is used?

@mheden
Copy link
Collaborator

mheden commented Jan 9, 2016

I think it has to do if you want to write the "Number of elements" (subindex 0) item or not together with your data or not.

In a lot of slaves the subindex 0 is not writable (or only writable in certain states) so I assume this adds the possibility to do a complete access writes for such slaves. It could also be useful if you want to read/write a whole struct without adding the number of elements item to the struct.

@ShabbyX
Copy link
Contributor Author

ShabbyX commented Jan 9, 2016

Thanks, that makes sense. I think our slave doesn't have a special "Number of Elements" at subindex 0, so it would make sense for me to read the whole thing as a struct.

@ShabbyX ShabbyX closed this as completed Jan 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants