node-ethernet-ip icon indicating copy to clipboard operation
node-ethernet-ip copied to clipboard

I added the ability to read strings by modifying 'parseReadMessageResponse(data)' method. I add this to the case/ switch: case 672: this.controller_value = data.toString('ascii', 8); break;

Open tjusticeus opened this issue 5 years ago • 6 comments

Current Behavior

Expected Behavior

Possible Solution (Optional)

Context

Steps to Reproduce (for bugs only)

Your Environment

  • Package version (Use npm list - e.g. 1.0.6):
  • Node Version (Use node --version - e.g. 9.8.0):
  • Operating System and version:
  • Controller Type (eg 1756-L83E/B):
  • Controller Firmware (eg 30.11):

tjusticeus avatar Jul 11 '18 17:07 tjusticeus

L83...High power! We're actually actively working on integrating string read/write in a more general way along with UDTs right now. Come join us on gitter for more discussion!

jhenson29 avatar Jul 13 '18 02:07 jhenson29

@tjusticeus How exactly were you able to read strings? I really need the ability to just read strings but haven't been able to figure it out yet.

austin557 avatar Jul 18 '19 21:07 austin557

It has been awhile since i looked at this. I will have to refresh my memory. Get back to you soon.

Sent from Yahoo Mail on Android

On Thu, Jul 18, 2019 at 5:02 PM, austin557[email protected] wrote:
@tjusticeus How exactly were you able to read strings? I really need the ability to just read strings but haven't been able to figure it out yet.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

tjusticeus avatar Jul 18 '19 22:07 tjusticeus

go to ethernet-ip/src/tag/index.js

go to method 'parseReadMessageResponse(data)' //Line 304

under the 'break' of case BOOL, I added another case

case 672: this.controller_value = data.toString('ascii', 8); break;

tjusticeus avatar Jul 18 '19 23:07 tjusticeus

@tjusticeus Thanks for the help!

austin557 avatar Jul 19 '19 14:07 austin557

any know how to write string?

RubenFarfanL avatar Jul 17 '20 15:07 RubenFarfanL