Send data from CBM to workplace
hi, I made small program( totalizer) in the project, and when I wanted to send total (real data type) to the workplace I have got error(conversion from real to brush is not automatic) how can I send this signal to workplace? please see attended picture
Thanks in advance
Thanks in advance
Voted best answer
It deppends of the tool you are using to show the value, i think it is no correct, beucause it use a data tyoe that is no compatible with your data type.
you can use a different tool, look at the tools.
you can use a different tool, look at the tools.
Answers
The graphic element property that u r calling ur real value in is a color property (brush data type), try another property like value or parsing it into a string
Osama
Osama
Hi,
From the image it seems that you are trying to move a real value in a FillColor Property, which is not possible as FillColor is of type Brush. I see that you are using a Label Toolbox.
If you want to show the value on HMI you can use a text box or a Label box (from the graphics builder toolboxes), then connect this Total variable to the Text/Label Property not to FillColor property, it will automatically convert it to string when you parse it. Save and close and refresh your Graphic page, you would find the value on HMI.
If you want to change some colors on your graphic display according to this value then you have to write some condition in Fill Color property eg.
if Total > 80.0 then
Red
else
Green
Hope it helps.
From the image it seems that you are trying to move a real value in a FillColor Property, which is not possible as FillColor is of type Brush. I see that you are using a Label Toolbox.
If you want to show the value on HMI you can use a text box or a Label box (from the graphics builder toolboxes), then connect this Total variable to the Text/Label Property not to FillColor property, it will automatically convert it to string when you parse it. Save and close and refresh your Graphic page, you would find the value on HMI.
If you want to change some colors on your graphic display according to this value then you have to write some condition in Fill Color property eg.
if Total > 80.0 then
Red
else
Green
Hope it helps.
Add new comment