Supported platforms: CODESYS 2.3, CODESYS 3.5
G_ADScale is array of struct ADData
admax |
unit |
pdres |
pures |
Description |
16383 |
2850 |
- |
- |
5 V reference, 2850 = 28,50V |
16383 |
2850 |
- |
- |
10 V reference, 2850 = 28,50V |
16383 |
5500 |
- |
- |
Supply voltage, 5500 = 55,00V |
16383 |
500 |
94000 |
2200 |
5 V analog voltage input, 500 = 5,00V |
16383 |
1000 |
94000 |
2200 |
10 V analog voltage input, 1000 = 10,00V |
16383 |
2273 |
220 |
0 |
Analog current input, 2273 = 22,73mA |
16383 |
2500 |
- |
- |
PWFM Current mode 2500 = 2500mA |
16383 |
5500 |
- |
- |
PWFM Voltage mode 5500 = 55,00V |
16383 |
1000 |
- |
- |
PWM % 1000=100,0% |
Struct G_AIType is used as an enumeration of conversion scale values. See examples below.
Name of the variable |
Data Type |
Default value |
Description |
G_AIType.Ref5V |
BYTE |
1 |
5 V reference, 2850 = 28,50V |
G_AIType.Ref10V |
BYTE |
2 |
10 V reference, 2850 = 28,50V |
G_AIType.Supply |
BYTE |
3 |
Supply voltage, 5500 = 55,00V |
G_AIType.AI5V |
BYTE |
4 |
5 V analog voltage input, 500 = 5,00V |
G_AIType.AI10V |
BYTE |
5 |
10 V analog voltage input, 1000 = 10,00V |
G_AIType.AImA |
BYTE |
6 |
Analog current input, 2273 = 22,73mA |
G_AIType.PwfmCM |
BYTE |
7 |
PWFM Current mode 2500 = 2500mA |
G_AIType.PwfmVM |
BYTE |
8 |
PWFM Voltage mode 5500 = 55,00V |
G_AIType.PWM |
BYTE |
9 |
PWM % 1000=100,0% |
Name of the variable |
Data Type |
Default value |
Description |
G_ADScaleArrMax |
BYTE |
9 |
Size of G_ADScale array, used internally for index checking. |
G_TemperatureOffset |
DINT |
-395 |
Temperature offset, -395 = -395mV |
G_TemperatureFactor |
DINT |
620 |
Temperature factor, 620 = 6,20mV/°C |
G_TemperatureADMax |
WORD |
16383 |
Temperature sensor ADC maximum value |
Example 1: Input type G_AIType.AI5V gives 5,00V (500 with 2 decimals) with AD maximum value.
Example 2: Voltage is converted to AD converter value. 500 (i.e. 5,00V with 2 decimals) gives AD maximum value with input type G_AIType.AI5V.
Source file Topic000377.htm
Last updated 21-Feb-2025