cmseaton42 / node-ethernet-ip

A Lightweight Ethernet/IP API written to interface with Rockwell ControlLogix/CompactLogix Controllers.
MIT License
265 stars 106 forks source link

Tag unstagewrite bugfix #39

Closed jhenson29 closed 6 years ago

jhenson29 commented 6 years ago

changed unstageWriteRequest to set tag.controllerValue to tag.value instead of the other way around.

Description, Motivation, and Context

tag.value returns to previous value after a plc write because it is set to tag.controllerValue in unstageWriteRequest, but tag.controllerValue had never been updated.

How Has This Been Tested?

Tested writing tag to plc.

Screenshots (if appropriate):

Types of changes

Checklist:

Related Issue

36

coveralls commented 6 years ago

Pull Request Test Coverage Report for Build 112


Changes Missing Coverage Covered Lines Changed/Added Lines %
src/tag/index.js 0 1 0.0%
<!-- Total: 0 1 0.0% -->
Totals Coverage Status
Change from base Build 110: 0.0%
Covered Lines: 472
Relevant Lines: 883

💛 - Coveralls
cmseaton42 commented 6 years ago

You are correct on this I think

The only use of the unstageWriteRequest method is to move the value from tag.vlaue to tag.controllervalue once a write has been successful. This way the controllervalue is always up to date with what is in the PLC