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

Incorrect type detection of string array in parse_notification #409

Open
xiaoliu-heng opened this issue Aug 23, 2024 · 2 comments
Open

Incorrect type detection of string array in parse_notification #409

xiaoliu-heng opened this issue Aug 23, 2024 · 2 comments

Comments

@xiaoliu-heng
Copy link

the type could be wrong when use auto_update for c_char_Array likeSTRING(28)

image
@chrisbeardy
Copy link
Collaborator

possibly related or same fix required for #356 and #405

@RobertoRoos
Copy link
Contributor

RobertoRoos commented Sep 13, 2024

The fix in PR #410 is nice, but I think AdsConnection shouldn't re-implement the type parsing that already exists in get_value_from_ctype_data() at all. I'm trying to squeeze it into PR #419 .

Issue can be reproduced with:

    with Connection(ams_net_id="127.0.0.1.1.1", ams_net_port=851) as plc:
        symbol_name = "GVL_Example.auto_string"

        plc.write_by_name(symbol_name, value="Hello")
        sleep(0.5)

        var = plc.get_symbol(symbol_name, auto_update=True)
        print(var.value)

        plc.write_by_name(symbol_name, value="Hello world!")

        sleep(0.5)

        print(var.value)

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

3 participants