Multi-State Lamp example for CONPROSYS HMI

More
2 months 2 weeks ago #57 by Tom_Contec
This is a Multi-State Lamp example for CONPROSYS HMI.
Attachments:

Please Log in or Create an account to join the conversation.

More
2 months 2 weeks ago #58 by Tom_Contec
To make this example, locate two components in HMI canvas.
1. Multi-State Lamp component
2. Slider component

Open the Multi-State Lamp options and set picture for each state (from State 0 to State 5).


Add JavaScript for Multi-State Lamp component
v = $getProp("Layer0.SliderH.0","value");
if(v < 10){
  this.setValue(0);
}
else if(v < 30){
  this.setValue(1);
}
else if(v < 50){
  this.setValue(2);
}
else if(v < 70){
  this.setValue(3);
}
else if(v < 90){
  this.setValue(4);
}
else{
  this.setValue(5);
}
Attachments:

Please Log in or Create an account to join the conversation.

Time to create page: 0.145 seconds
Powered by Kunena Forum