Skip to content

[BUG] - No error on Write for Bool #330

@seversonic

Description

@seversonic

Pre-checks

  • running latest version
  • enabled logging
  • consulted the docs

Description
No errors are flagged when trying to write a string, or other failed datatype to a boolean value in the PLC.
I tested on a DINT and I do receive an error.

Target PLC
Model: 1756-L81
Firmware Revision: 37.11
Other Devices in CIP Path: n/a

Code Sample

 from pycomm3 import LogixDriver

with LogixDriver('192.168.1.10') as plc:
    result = plc.write('XY_123_intlk.Cfg_OKState.0', 'Hello') # or False
    if result.error is None:
        print(f"success: {result}")
    else:
        print(f"Error writing to Tag: {result.error}")

Additional context

This is the output result.

sucess: XY_123_intlk.cfg_OKState.0, 'Hello', BOOL, None

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions