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

Changed Event is missed for previously written tags #70

Open
PeterChristen577 opened this issue May 16, 2020 · 0 comments
Open

Changed Event is missed for previously written tags #70

PeterChristen577 opened this issue May 16, 2020 · 0 comments

Comments

@PeterChristen577
Copy link

Changed Event is missed for previously written tags.

Current Behavior

When a tag is written to the PLC, in the following read cycles is no Changed Event produced.

Expected Behavior

A Changed Event is also produced for tags previously written to the PLC.

Possible Solution (Optional)

In file /src/tag/index.js remove line (574):

    unstageWriteRequest() {
        const { tag } = this.state;
        tag.stage_write = false;
        //tag.controllerValue = tag.value;
    }

Context

If node-ethernet-ip is used in Node-RED and eth-ip in and eth-ip out nodes are connected to the same PLC tag, the value is properly written to the PLC but cannot be read back.
The reasons for this behaviour are:

  1. In unstageWriteRequest the value of tag.controllerValue is already updated to the new value.
  2. In controller_value the comparison (line 239) if (newValue !== this.state.tag.controllerValue) does not see a difference and there no Changed Event has been emitted.
  3. In Node-RED no message is generated at eth-ip in node.

Steps to Reproduce (for bugs only)

  1. In Node-Red, create a small flow consisting in: numeric to eth-ip in and eth-ip out to text. Both eth-ip nodes are linked to the same PLC DINT tag. Screenshot:
    Flow
  2. Run it and change the value of numeric node (input) on the dashboard.
  3. Check if the value for the text node (output), it does not change.
    Dashboard

Your Environment

  • Package version (Use npm list - e.g. 1.0.6): 1.2.5
  • Node Version (Use node --version - e.g. 9.8.0): 12.16.2
  • Operating System and version: Linux raspberrypi 4.19.97-v7+
  • Controller Type (eg 1756-L83E/B): 1769-L32E
  • Controller Firmware (eg 30.11): 20.14
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

1 participant