Welcome, Guest
Username: Password: Remember me

TOPIC: Rectangle colour property .

Rectangle colour property . 5 months 5 days ago #3405

Dear Sir,

I am currently working with a rectangle in our SCADA system and would like to change its colors according to certain ranges based on specific tags: TEST_1_HH_SP, TEST_1_H_SP, TEST_1_L_SP, and TEST_1_LL_SP.

At present, we are using the fill color associated with the Type-Tag.PV in the range, which is set to fixed values. However, I have observed that when the set point value changes in SCADA, the color does not adapt accordingly; it remains based on the fixed value.

Could you please advise on how I can modify the color property to reflect the set point value dynamically?

Thank you for your assistance.

Best Regards,
Chatan Kashyap
The administrator has disabled public write access.

Rectangle colour property . 5 months 5 days ago #3406

  • fatkhrus
  • fatkhrus's Avatar
  • Offline
  • Administrator
  • Posts: 984
  • Thank you received: 134
  • Karma: -103
Dear Chatan,

I don't understand your question. Do you want to change color of the rectangle depending on the values of several tags?

Best regards,
Ruslan
The administrator has disabled public write access.

Rectangle colour property . 5 months 5 days ago #3407

I want change color property of rectangle according to different different tags.
The administrator has disabled public write access.

Rectangle colour property . 5 months 5 days ago #3408

  • fatkhrus
  • fatkhrus's Avatar
  • Offline
  • Administrator
  • Posts: 984
  • Thank you received: 134
  • Karma: -103
For changing color depending on many tags you have to use scripts. Example: teslascada.com/HTML/complex-color-change-with-scri.html

Best regards,
Ruslan
The administrator has disabled public write access.

Rectangle colour property . 5 months 2 days ago #3409

Dear Ruslan,

The example you have attached is for changing the colors of motor.

We need to give fill color property to a rectangle based on the tank level (Float data type)
If the tank level (Float data type)is greater than the HI setpoint, the color should be orange with the filling property & if the tank level (Float data type) is greater than the HI HI setpoint the color of the rectangle should change to RED with filling property.
& in normal condition, the color should be green with filling property.

Attached Citect video for your reference for what we need to do in tesla Scada.
Best Regards,
Chatan Kashyap
Last Edit: 5 months 2 days ago by CHETAN@0707. Reason: dpuble typing
The administrator has disabled public write access.

Rectangle colour property . 5 months 2 days ago #3411

  • fatkhrus
  • fatkhrus's Avatar
  • Offline
  • Administrator
  • Posts: 984
  • Thank you received: 134
  • Karma: -103
Dear Chatan,

I don't understand what's the problem. You can use fillcolor property of the tank or rectangle instead of the motor like in the example.
You can use script like this:
if (Tags.level>Tags.Hi){
Objects.Tank.fillcolor = Color.ORANGE;
} else if (Tags.level>Tags.HiHi){
Objects.Tank.fillcolor = Color.RED;
}
else {
Objects.Tank.fillcolor = Color.GREEN;
}

Best regards,
Ruslan
The administrator has disabled public write access.
Go to top