Compare commits

5 Commits

Author SHA1 Message Date
Woutverheijen
59dec46846 test 2025-10-24 09:40:40 +02:00
Woutverheijen
133cadf225 remove test 2025-10-23 12:23:45 +02:00
Woutverheijen
60d7dcb1ac test 2025-10-23 12:20:46 +02:00
c081acae4e Remove non-implemented temperature handling function 2025-10-10 13:27:31 +02:00
08185243bc Merge pull request 'dev-Rene' (#1) from dev-Rene into main
Reviewed-on: #1
2025-10-06 14:16:18 +00:00
2 changed files with 13 additions and 21 deletions

View File

@@ -115,7 +115,7 @@ class nodeClass {
const mode = m.currentMode;
const state = m.state.getCurrentState();
const flow = Math.round(m.measurements.type("flow").variant("predicted").position('downstream').getCurrentValue());
const power = Math.round(m.measurements.type("power").variant("predicted").position('upstream').getCurrentValue());
const power = Math.round(m.measurements.type("power").variant("predicted").position('atEquipment').getCurrentValue());
let symbolState;
switch(state){
case "off":

View File

@@ -161,10 +161,6 @@ _callMeasurementHandler(measurementType, value, position, context) {
this.updateMeasuredFlow(value, position, context);
break;
case 'temperature':
this.updateMeasuredTemperature(value, position, context);
break;
default:
this.logger.warn(`No handler for measurement type: ${measurementType}`);
// Generic handler - just update position
@@ -775,9 +771,9 @@ _callMeasurementHandler(measurementType, value, position, context) {
module.exports = Machine;
/*------------------- Testing -------------------*/
/*
curve = require('C:/Users/zn375/.node-red/public/fallbackData.json');
/*
//curve = require('C:/Users/zn375/.node-red/public/fallbackData.json');
//import a child
const Child = require('../../measurement/src/specificClass');
@@ -793,7 +789,6 @@ const PT1 = new Child(config={
},
functionality:{
softwareType:"measurement",
positionVsParent:"upstream",
},
asset:{
supplier:"Vega",
@@ -815,7 +810,6 @@ const PT2 = new Child(config={
},
functionality:{
softwareType:"measurement",
positionVsParent:"upstream",
},
asset:{
supplier:"Vega",
@@ -831,18 +825,17 @@ console.log(`Creating machine...`);
const machineConfig = {
general: {
name: "Hydrostal",
name: "Hidrostal",
logging: {
enabled: true,
logLevel: "debug",
}
},
asset: {
supplier: "Hydrostal",
supplier: "Hidrostal",
type: "pump",
category: "centrifugal",
model: "H05K-S03R+HGM1X-X280KO", // Ensure this field is present.
machineCurve: curve["machineCurves"]["Hydrostal"]["H05K-S03R+HGM1X-X280KO"],
model: "hidrostal-H05K-S03R", // Ensure this field is present.
}
}
@@ -871,18 +864,17 @@ const machine = new Machine(machineConfig, stateConfig);
machine.logger.info(`Registering child...`);
machine.childRegistrationUtils.registerChild(PT1, "upstream");
machine.childRegistrationUtils.registerChild(PT2, "downstream");
//feed curve to the machine class
//machine.updateCurve(curve["machineCurves"]["Hydrostal"]["H05K-S03R+HGM1X-X280KO"]);
/*
PT1.logger.info(`Enable sim...`);
PT1.toggleSimulation();
PT2.logger.info(`Enable sim...`);
PT2.toggleSimulation();
machine.getOutput();
*/
//manual test
//machine.handleInput("parent", "execSequence", "startup");
/*
machine.measurements.type("pressure").variant("measured").position('upstream').value(-200);
machine.measurements.type("pressure").variant("measured").position('downstream').value(1000);
@@ -892,8 +884,8 @@ const tickLoop = setInterval(changeInput,1000);
function changeInput(){
PT1.logger.info(`tick...`);
PT1.tick();
PT2.tick();
//PT1.tick();
//PT2.tick();
}
async function testingSequences(){