How do you enter a new control?

The way to insert a new control is very simple once the control respects two rules:

  • You must have certain variables declared, whether you use them or not.
  • Must have the UpdateControl method declared.

The properties or public variables within the class are:

  • Public Property PLC_Number As Integer
  • Public Property PLC_DataArea As General.DataArea
  • Public Property PLC_DB As Integer
  • Public Property PLC_Byte As Integer
  • Public Property PLC_DataType As General.DataType
  • Public Property PLC_Bit As Integer
  • Public Property PLC_Length As Integer

Once the class with these characteristics is created, it can be inserted into ControlList.PlcControlTypes

Additionally, Smart-tags can be included, although it is not necessary.

Modifications can be made to the Enum General.DataArea or General.Datatype as long as the original numbering is respected. If it is not done correctly, it will not be read or written correctly in the PLC. Therefore, use it as is if you don’t know what you are doing.