plcpeople / mcprotocol

node.js implementation of the MC (MELSEC communication) protocol to exchange data with Mitsubishi FX programmable controllers.
MIT License
98 stars 40 forks source link

Timeout should be number - my sollution #7

Closed jinx17 closed 3 years ago

jinx17 commented 3 years ago

I AM SORRY, I MADE MISTAKE. THIS WAS MENT FOR node-red-contrib-mcprotocol

Hi, when setting timeout in settings I get error when I deploy, that timeout should be number not string ie "1000".

Sollution (in my opinion): in file connection.js I use function Number() to tell this variable is getting number, not string. this.options.timeout = Number(config.timeout) || 1000; Best regards, Jinx