First Steps in WDX
The purpose of using our WDX is to provide data aggregation over network protocols (BACnet, MQTT, ... ) provided on a WebSocket-Server interface.
WDX Runtime
- Navigate to the WDX runtime script in the browser
PLC : http://ip-address:8010/wdx/scripts/
Docker : http://localhost:8010/wdx/scripts/ - Select "Scripts" in the navigation bar
- Click on "getDataValue.js", below the tab "Editor" the following script will be shown:
const dataPath1 ='virtual.store.a';
const subscription = EDJS
.getDataValue(dataPath1)
.subscribe(
{
next: (data) => {
console.log("getDataValue.next", data.path, data.value);
},
error: (error) => {
console.log("getDataValue.error", dataPath1, error);
console.error(error);
},
completed: () => {
console.log("getDataValue.completed");
}
}
);
const dataPath1 ='virtual.store.a';
const subscription = EDJS
.getDataValue(dataPath1)
.subscribe(
{
next: (data) => {
console.log("getDataValue.next", data.path, data.value);
},
error: (error) => {
console.log("getDataValue.error", dataPath1, error);
console.error(error);
},
completed: () => {
console.log("getDataValue.completed");
}
}
);
WDX Data Layer
- Navigate to the WDX data layer in the browser
PLC : http://ip-address:8010/wdx/data/
Docker : http://localhost:8010/wdx/data/ - navigate in the data structure to dataPath1='virtual.store.a';
- with the set button you can change the value, with the get button read the value and with subscribe read the value periodically