const options = {
target: {
host: "172.16.21.6",
netID: "5.9.36.191.1.1",
amsPort: 801
}
};
const client = new AdsClient.default(options);
client
.connect()
.then(async () => {
// write a tag
return client.monitorTag(".bTest", (value, timestamp) => {
console.log(`.bTest value changed ${value} at ${timestamp}`)
});
})
.catch(err => {
console.log("failed monitor item: ", err);
});