Complete the code to define the standard EtherNet/IP port number.
const EIP_PORT = [1];The standard port number for EtherNet/IP communication is 44818.
Complete the code to create an EtherNet/IP connection object with the IP address.
let connection = new EIP.Connection('[1]');
The IP address must be valid and reachable. '192.168.1.10' is a typical private IP address.
Fix the error in the code to read a tag value from the PLC.
connection.readTag('[1]').then(value => console.log(value));
Tag names are case-sensitive and usually lowercase or camelCase. 'tag1' is a valid tag name.
Fill both blanks to create a cyclic connection with a 500 ms interval and 1000 ms timeout.
connection.createCyclicConnection({interval: [1], timeout: [2]);The cyclic connection interval is 500 ms and the timeout is 1000 ms to allow for response delay.
Fill all three blanks to write a value of 100 to the tag 'MotorSpeed' with confirmation.
connection.writeTag('[1]', [2]).then(response => { if(response.[3]) console.log('Write successful'); });
The tag name is 'MotorSpeed', the value to write is 100, and the response property 'success' confirms the write.
