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

Not periodic message set to peridic message #396

Open
DDoIt opened this issue Sep 5, 2023 · 3 comments
Open

Not periodic message set to peridic message #396

DDoIt opened this issue Sep 5, 2023 · 3 comments
Labels

Comments

@DDoIt
Copy link

DDoIt commented Sep 5, 2023

Hi,

Is it possible that the following line may be correct for periodic PDOs but not for non-periodic messages?

self.period = timestamp - self.timestamp # base.py line 301

The issues I am encountering are in some functions in the 402 profile. For example, the check_statusword function is experiencing timeout issues because messages aren't being received or transmitted.

If I remove the line above, everything works fine.

Best regards,
David

@af-silva
Copy link
Collaborator

af-silva commented Sep 5, 2023

Hi @DDoIt,

The PDO is configured as periodic ??
The status word should be periodic I think...

@DDoIt
Copy link
Author

DDoIt commented Sep 5, 2023

Hi @af-silva ,
in my case the PDO is not periodic, even the statusword is not periodic. After the first call of
on_message (base.py line 294)
the PDO is defined as periodic

if self.timestamp is not None:
self.period = timestamp - self.timestamp

@acolomb
Copy link
Collaborator

acolomb commented Jan 7, 2024

The .period member is reserved for use within the library, as it tells the DS402 logic whether periodic updates can be expected or the statusword needs to be polled. If you want to store that calculation result somewhere, rename your attribute to something else, or make sure the PDO actually is periodic. The latter can be done by configuring it with a transmission type that triggers with a periodic SYNC object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants