Please check this example of svg controlled via js:
http://forum.logicmachine.net/showthread...275&page=4
I can also prepare something to start for you. If this wouldn't work please change '0' to '1' or other value, it depends on how many other images do you have in your visualisation.
At this moment I have only time for such little help Maybe tomorrow
I see also some buttons, can you describe how do you change parameters on real thermostat?
http://forum.logicmachine.net/showthread...275&page=4
I can also prepare something to start for you. If this wouldn't work please change '0' to '1' or other value, it depends on how many other images do you have in your visualisation.
Code:
$(function(){
$('object').load(function() {
var svg = $('.siemens')[0].firstChild; // Choosing svg
var svgDoc = svg.contentDocument; // Choosing content from svg
var temperature = svgDoc.getElementById("temperature"); // Choosing temperature from content
var setpoint = svgDoc.getElementById("setpoint"); // Choosing setpoint from content
var primary = svgDoc.getElementById("primary"); // Choosing primary from content
var secondary = svgDoc.getElementById("secondary"); // Choosing secondary from content
var radiator = svgDoc.getElementById("radiator"); // Choosing radiator from content
var speed0_16 = svgDoc.getElementById("speed0_16"); // Choosing speed0_16 from content
var speed16_33 = svgDoc.getElementById("speed16_33"); // Choosing speed16_33 from content
var speed33_50 = svgDoc.getElementById("speed33_50"); // Choosing speed33_50 from content
var speed50_83 = svgDoc.getElementById("speed50_83"); // Choosing speed50_83 from content
var speed83_100 = svgDoc.getElementById("speed83_100"); // Choosing speed83_100 from content
var fan = svgDoc.getElementById("g24"); // Choosing fan from content
var heat = svgDoc.getElementById("g39"); // Choosing heat from content
var cool = svgDoc.getElementById("g34"); // Choosing cool from content
// Update temperature
actual_temp = Scada.encodeGroupAddress('1/1/10'); // temperature
objectStore.addListener(actual_temp, function(obj, type) {
console.log(temperature, obj.value)
temperature.textContent= obj.value
});
});
});
At this moment I have only time for such little help Maybe tomorrow
I see also some buttons, can you describe how do you change parameters on real thermostat?