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

Multi-plc Support #6

Open
wants to merge 38 commits into
base: v0.2.0.rc1
Choose a base branch
from
Open

Conversation

Joshpolansky
Copy link
Member

@Joshpolansky Joshpolansky commented Oct 15, 2024

What:

  • Add variable read data to the USD in the session layer
  • Add support for Multiple PLC's
  • Moves connection information from global persistent to USD based
  • Improves cycle time performance from (3 + write) x ads time + to 1x ads time
  • Decrease jitter in refresh rate
  • Refactor code to use common components with other loupe extensions

Why:

  • Interfacing with the USD means the user does not need to use any python to interact with the extension
  • Multiple PLC are common in digital twin
  • Saving connection information in the USD allows users to have multiple different projects. It is also supports multiple PLC's in a clean wau
  • The extension was limited to reading new data every 30 ms. If writes were done in the same loop it would drop to 40 ms. This was due to the connection check making an ADS calls, and that check being called twice per scan.
  • The calculation for the next read time included the sleep time of the thread. If the thread slept for longer than specified sleep time, the sleep time added to the jitter. Previously there was a typical jitter of 8-20 ms depending on system load. New jitter is typically on the order of 1 ms.

TODO

This PR does not update the tests or docs. They should be updated before release.

New configuration UI:
Snag_f6f61b

New USD structure:
Snag_f73670

Configuration saved in the USD:
Snag_f76c06

Variable reading/writing Structure
Snag_f7a650

@sclaiborne
Copy link
Member

sclaiborne commented Oct 21, 2024

Looks good in general, I have a little more review todo.

Is tools/packman suppose to be ignored (currently it is not)?

@Joshpolansky
Copy link
Member Author

Looks good in general, I have a little more review todo.

Is tools/packman suppose to be ignored (currently it is not)?

The tools folder was included intentionally for development. I suppose it's debatable if it should be there. Thoughts?

@sclaiborne
Copy link
Member

I have not forgotten about this, I am scheduling some time to review next week

Copy link
Member

@sclaiborne sclaiborne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, A couple small open questions.

Comment on lines +13 to +14
from ..common.RuntimeBase import get_stream_name
from ..common.BridgeManager import BridgeManager, Manager_Events as ManEvents
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we decided common, needs to be renamed/moved here. Did we want to do that before merging?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ya, this should be fixed before we merge

default_beckoff_properties = {
ATTR_BECKHOFF_BRIDGE_ENABLE: False,
ATTR_BECKHOFF_BRIDGE_REFRESH: 20,
ATTR_BECKHOFF_BRIDGE_AMS_NET_ID: "127.0.0.1.1.1",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this correct?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are you referreing to? The AMS_NET_ID is sorta like a IP Address with 2 extra numbers, is that the question?

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

Successfully merging this pull request may close these issues.

2 participants