TwinCAT 3 Colour Variables

Sohaib28

Member
Join Date
Aug 2015
Location
Cottbus
Posts
31
Hello. I am working on TwinCAT 3 visualization.


I want to fill the colour of a rectangle in the visualization using Fill colour . The variable I defines is an array of DINT which includes different colour codes. By implementing different condition


I want to know How can I get the light green colour using 16#TTRRGGBB or 16#FF8FE03F ? I mean i can get red colour using this value 16711680, hex value= FF0000. But How to get light green colour? Can someone explain me about how colour variables work in TwinCAT 3. I have also added the explanation below.





Thanks in advance.


Regards













Color variables


The color variables used for dynamic definition of the element colors via project variables of type DWORD. A color is defined based on a hexadecimal number consisting of red, green and blue (RGB) components. In addition, the variables are used to specify the transparency of the color (FF: fully opaque - 00: fully transparent). The DWORD has the following structure: 16#TTRRGGBB

Icon%20Note.gif

Note

The structure of the hexadecimal number differs, compared to TwinCAT 2. In TwinCAT 3, in addition to the RGB components, the color transparency can also be defined with the hexadecimal number. The transparency is indicated by the first two digits after “16#”. Colors with definitions starting with “16#00” are invisible, since they are fully transparent.


Example:

nFillColor := 16#FF8FE03F;

▪FF: transparency (fully opaque)
▪8F: red
▪E0: green
▪3F: blue
 
The help note pretty much spells it out. What exactly are you having trouble with? If you specify 16#FF8FE03F as the fill color, you should get a light green. Is this not the behavior you are seeing in Twincat?
 
find a colour wheel, or a global var list.
i do it by using a dialog and then write down the colours needed in the global vars.
 

Similar Topics

I am using twincat 3 to send some strings over TCP/IP. Where the server is a sensor and my PLC is the client. I noticed that the sensor didnt...
Replies
2
Views
97
I'm trying to control a device via MODBUS RTU and the ModbusRtuMasterV2_PcCOM in Twincat 3. I've configured a device with the right com port and...
Replies
7
Views
256
Hi! I am trying to run the 'SimpleSample' (https://infosys.beckhoff.com/content/1033/TF5100_TC3_NC_I/Resources/3438746891/.zip ) to understand the...
Replies
2
Views
117
I am developing a library in twincat and one of the function uses IID_ITcVnAccess_TcVnPoint2_DINT and the definition of this type is defined in...
Replies
0
Views
84
Sorry if this has been asked before, and apologies if this seems like a trivial issue, but I am new to Beckhoff and have been banging my head...
Replies
2
Views
169
Back
Top Bottom