Variable names according to Hungarian notation

Question:

Which are the general contents and abbreviations when variable names are created with regard to the Hungarian notation?

Answer:

Lenze software guideline for variable names:
For the convention of the creation of variable names Lenze considers the 'Hungarian notation', which has been extended specifically by Lenze.

When the user applies Lenze-specific functions/function blocks, it becomes obvious for him which data type e. g. has to be given to a function block and which data type is given back as output value.

Following the Hungarian Notation:
These conventions are used e. g. in order to see the most important variable features from its name.
Variable names consist of:
  • one variable type indication
  • one prefix (in case of  array or pointer)
  • one data type indication
  • one identification (the name 'itself' should refer to the use)
  • Designation of the signal type (in case of inputs and outputs of the Lenze function blocks)

Example: g_anFixSetSpeedValue_a
(a global array of type Integer containing analog values and is called FixSetSpeedValue)

Remember:
  • _a (analog) - 16384 = 100 %
  • _v (velocity) - 16384 = 15000 rpm
  • _p (angle or position) - 65536 = one motor revolution


URL for linking this AKB article: https://www.lenze.com/en-de/go/akb/200600021/1/
Contact form