Skip to content

Conversation

@martinlukas84
Copy link
Collaborator

Describe your changes

This PR adds the compatibility check according to the standard IEC61851-23 CC.5.6.
Furthermore, adding the response code to the feedback to get this information available for other modules.
This is helpful for process view in PLC, HMI etc.

Issue ticket number and link

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have made corresponding changes to the documentation
  • I read the contribution documentation and made sure that my changes meet its requirements

…te ChargeParameterDiscovery.

This will be added here.

Signed-off-by: Martin Lukas <martin.lukas@chargebyte.com>
…send via feedback to the Iso module.

Signed-off-by: Martin Lukas <martin.lukas@chargebyte.com>
// the EVerest environment (power supply, grid), here we assume that both are the same

bool compatiblity_flag = true;
const auto ev_max_limits_cpd = ev_max_limits;
Copy link
Member

Choose a reason for hiding this comment

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

Why did you add another copy here? Why not using the argument ev_max_limits as const ref

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

up to now i was not sure how to handle the CPD and RATED index. I thought to work with new named vars to keep a kind sort of readability. But when we now get rid of the CPD and RATED index it can be removed or implemented in other way.

Copy link
Member

Choose a reason for hiding this comment

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

If you like to use variables for this, it's better to use const ref instead of copying each variable.

@martinlukas84 martinlukas84 force-pushed the feature/compatibility_check branch from cb38711 to 8a92f25 Compare December 1, 2025 05:18
Signed-off-by: Martin Lukas <martin.lukas@chargebyte.com>
@martinlukas84 martinlukas84 force-pushed the feature/compatibility_check branch 2 times, most recently from c8b084b to 4d31def Compare December 1, 2025 05:53
…concerns part CC.5.6 2a in standard

IEC61851-23. The test case defines a powersupply voltage of 900V. But this must be meet
the requirement from mentioned part min(V_ev +50, V_evse, 500).
So here the V_Evse must be <= 450V.

Signed-off-by: Martin Lukas <martin.lukas@chargebyte.com>
@martinlukas84 martinlukas84 force-pushed the feature/compatibility_check branch from 4d31def to 863ac54 Compare December 1, 2025 06:01
Fix wrong parameter usage in compatibility check.

Signed-off-by: Martin Lukas <martin.lukas@chargebyte.com>
@SebaLukas
Copy link
Member

SebaLukas commented Dec 5, 2025

I took a closer look at CC.5.6 in IEC61851-23:2023 and don't seem to interpret it the same way you do.
I understand section CC.5.6. 2) a) - c) to mean rather that the charger should adjust the parameters for ChargeParameterDiscoveryRes and not check whether the values are within the value range.
For me, it would be fatal if a charger ended the session with an error every time just because the max EVSE voltage is 1000V and the EV only specifies a maximum voltage of 500V.
Therefore, a) - c) should adjust the parameters of the ChargeParameterDiscoveryRes accordingly.

For me the g) section also describes a check in which the charger changes the ResponseCode, Processing, and StatusCode accordingly.

In addition, ChargeParameterDiscoveryRes or any other res message should not have any values in the event of an error, if possible. I saw that in the newly added unit tests.

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.

3 participants