Cloud-Automation / chrome-modbus

Modbus/TCP for Chrome Apps.
MIT License
32 stars 17 forks source link

ModbusClient() not found in any files #5

Closed AlbertHatesCodes closed 2 years ago

AlbertHatesCodes commented 2 years ago

image

I can't load the main.js completely .Could Anyone helpe me solve this problem?

stefanpoeter commented 2 years ago

Hey @AlbertHatesCodes,

if you post the whole code, maybe I could help.

AlbertHatesCodes commented 2 years ago

Hey @AlbertHatesCodes,

if you post the whole code, maybe I could help.

@stefanpoeter hello my friend The Code I used is the sample01 under the folder examples, I opened it by VS Code and I run it on the Chrome. I saw the console indicate that this modbusClient was not import. Neither do the jquery.min.js and modbus.min.js

I guess I didn't do the process correctly or this example lose some files

stefanpoeter commented 2 years ago

This is library is not ment to be executed in a browser. You need to run it with node.js.

AlbertHatesCodes commented 2 years ago

Got it !Thank you my friend, it works! What If I really want to show the Data where I got from Modbus TCP. How should I do it with Node.js? Could you give me some suggestions?

stefanpoeter commented 2 years ago

There are plenty of tutorials and How-Tos for JavaScript and Node.js that will get you started.