Hello. 1
In this video we are going to learn analog input and output usage. 2
The common analog signals are voltage as voltage 0 to 10 Volt and the current as current 4 to 3
20 mA to use the analog signals inside of the PLC. 4
We have to convert them as digital values like 0 to 4000 , 0 to 8000. 5
The important point is here. 6
Animal input means analog to digital converter and analog output means digital to analog converter. 7
For example if our converter is 8 bit so 1 divided by 2^8 - 1. 8
So 10 divided by 255. 9
Equals to 0.04V as we can say it. 10
Resolution. 11
So if we to this equation if we apply 4V to analog input of module we are going to read 1000 12
value inside of our plc. 13
It's calculated for 8 bit but let's say our converter is 12 bit. 14
So 10 divided by 4095. 15
So it equals 16
from equation. 17
Result is 0.00244 18
This is a voltage value and it equals one bit. 19
So if I apply 2.44Vdc to analog input of module we are going to read one thousandth 20
value inside of plc. 21
It is calculated for 12 bit example that DVP06XA analog input and output modules allows 22
4 analog input and 2 x 12 bit digital output connections the data transfer can be done using DVP 23
06XA via RS485 communication or by connecting directly these modules to our CPU. 24
If you put this module to CPU the closest module a number is going to be 0. 25
The furthest modules number is going to be 7 and the maximum 8 modules can be connected to CPU in 26
here. 27
You can take a picture also you can see how to voltage input is applied to our modules how to connect 28
your current input to your module and how to output from module voltage output then you can get a cabling 29
structure is here v+ is for voltage I+ for current input and output and the com is common 30
cable communication and in here you can see your power supply and the ground connection and you can 31
see in here Channel 1 the lowest side and Channel 3 and Channel 5 for voltage or current output and 32
channel 6. 33
And in here Channel 4 and in here Channel 2 IO terminals in here you can see what is offset and gain 34
and offset is a starting point from zero then you can adopt it for example inside of the plc you are 35
reading a zero and offset is zero but you can adapt your offset. 36
For example 1V then until one volt to your analog input. 37
for example it can come zero point five fold or zero point six volt than you will read zero inside your 38
plc THEN you can block or you can cut some sections of your analog input and the gain is you are 39
going to see a 1000 as digital value insİDE your plc according to or after 5v applied to your 40
analog input module. 41
The for example Channel 1 and if you want to see 1000 when 6 voltDc apply to your analog input then 42
you can adopt it with the gain settings and in here also you can see current input and digital output. 43
So for example for the current input you can start if you want to start for example from 4 ma 44
then you need to adopt your offset settings in here we can see a complete control registers of DVP06XA 45
and we are going to learn how to read this manual and how can we control this manual , okay. 46
Let's go to our example in Channel 1 of analog module ,sensor is connected to this sensor is 4 to 20 47
ma pnp current output it gives to us 4 to 20 ma,and when this sensor detects the 48
light and it will give a current output to us and if this output is greater than 10ma motor1 49
is going to start if this output greater than 15 ma motor 2 starts to run in the second 50
input. 51
This is our first input channel and you can see the current input connection is done in here we have 52
one we can see thermocouple symbol temperature sensor is connected and this sensor output than that 53
means input of our analog module is between 0 to 10VDC 54
So if boiler water temperatures lower than 5V, motor3 is going to turn and starts and if boiler 55
water temperatures is bigger than 5v motor 4 is going to start to turn and now let's how to, try 56
to solve this problem with use of our DVP06XA's module control registers and first thing we need 57
to use TO command for write to module and if you need to read from module we need to use FROM command 58
and this is our channel numbers and this is, these are all bit numbers of our channels so this table 59
shows bits of all channels and we will assign bit values as 0 or 1 and we will calculate our value to 60
send device first let's determine whether the status of channels of our analog module. 61
So Channel 1 is going to be current input read rest of all will be voltage input. 62
Let's take a look to voltage input is 0 0 0 and current input or current output but this needs to be 63
input not an output but okay we will use this one mode 3 and this should be 0 1 1 So Channel 1 will 64
be current input so I will put it tohere and the 0 0 0 will be Channel 2 the rest of all will be voltage 65
input so all of them will be 0. 66
If you calculate this number as binary, you can open your calculator and you 67
can write this as binary but this is work like this. 68
0 0 0 1 and 1 0 and 1 1. 69
These are all 0 so this is 3 as hexadecimal 3 and decimal 3 also but we need to send hexadecimal values 70
to our plc hexadecimal 3 value that we get and this and this value in here. 71
to first module with first scan inside in the first second with the TO Command we write this value 72
to our analog module and now we need to adapt our offset and gain adjustment and authorization 73
settings must be done so in the first scan and the controller registers 33 we write 74
h0 but why. 75
Let's take a look to in here. 76
33 is control registers that offset and gain took tuning 77
I couldn't say authorization so the default is 0 0 0 so we need to use this 0 value because 78
we need to get permission for the offset and gain settings so what is the gain an offset adjustment 79
and why is it needed conversion of analog signal to digital signal in plc between 0 to 4000 value 80
for the voltage input and 1 to 0 to 1000 value for the current input then it changes to according to plc 81
brands and the hardware. 82
For example 10 Volt it means 10 divided by 4000 and 2.5 mv equals to 1 as digital 83
value in plc. 84
In other words lowest valued bit that we can express as resolution is that sensitivity and it equals 85
2.5 mv 86
And in this case for example it is necessary to use the expression of for example 8000 lowest values 87
bit equals to two , why because 800 88
Multiply by 2.5 mv will be two volt and 2000 value 89
will be five volt and 2000 multiply by 2.5mV 90
mv , this is the answer of our question and if we looked in the same way for the current 20ma 91
current and one lowest valued bit will be 20 mA divided by 1000 and will be 20 ma 92
And in here Channel 1 will work in the range of 4-20mA and the Channel 2 is going to be 93
range will be 0-10 Volt and output channel in the range of will be 5 to 10 Volt. 94
Okay first gain settings and office settings. 95
Let's take a look them all then come here and we will see also in here analyzed one by one for the gain 96
settings it is starting from Channel 24 to channel 29. 97
Let's go to here. 98
24 to 29 99
You can see them all in here for the Channel 1 and Channel 4. 100
gain settings default value was 1000 when the voltage input range from 800 to 4000 for the 101
current input 800 to 2600 for the outputs of ourChannel 5 and Channel6 102
to adjust gain of outputs. 103
Look in here. 104
Default is K 2000 and the range is 0-4000 and come here. 105
Let's take a look once to our values. 106
So what is the meaning of 1000 in here. 107
So first thing we need to know. 108
The gain settings for the current input. 109
Like in here. 110
Channel 1 will be default 1000 for the current input. 111
So in here K 4000 will be a maximum value of our voltage input because we will say it like this. 112
Now if 20 ma comes to our current input channel then it will be 1000 value inside of 113
the PLC. 114
If we see 10 volt of our channel 2 or analog input then this will be inside of the PLC 4000 value. 115
So Channel 3 and Channel 4 not used and the outputs. 116
Also we adopted it like this. 117
We will give to 0-10 volt output. 118
So if we give 10 Volt as analog output from our plc we are writing to this registers to 4000 in our 119
PLC offsets settings for 4 mA ,in here we need to write here to 200 120
Why. 121
Because1 lowest valued bit is 20uA and we calculated in here and 20uA 122
multiply by 200 -> 200 x 20uA an it equals to 123
4000uA and it equals to 4 mA 124
So we want to use our analog input as 4-20mA because of we want to started to 4mA 125
we write it here. 126
K200 127
So it is now default offset value and it will start from 4mA 128
to 20mA and the range will be like this. 129
And for the our analog inputs for Channel 2 we are going to use 0 to 10 volts and we don't need 130
to use an offset anything and for Channel 4 No ,for Channel 5 we write in here. 131
K1000 Why? 132
Because let's go back to here and for offset of Channel 5 you can see it. 133
The range is K -2000 to +2000 so two thousand equals to 10v for analog 134
output. 135
This is equals to 10 volts because we are using 0 to 10 volt. 136
Okay go back here. 137
So if we start it from the K1000. 138
It starts from 5 volt so in our example let's go to there. 139
So we are wanting to calculate according to 5V lower than or bigger than. 140
So we can adopt it these offsets to 1000 and it starts from 5V to 10v then 141
Channel 6 is not used so we can leave it like this and for the CR 142
24 to 29 is for the Channel 1 to Channel 6 sequentially in order to enter gain settings from table. 143
And we already saw it ,in here from CR registers 18 to CR 23. 144
These are all adjusted offset settings and the for the gain value for Channel 1 2 and 3. 145
It's starting from 24 to 29. 146
And this one is coming from here so CR1 that we can adopt our input and output mode. 147
And we are going to read our values from where. 148
Let's take a look it also and let's take a look once to our complete plc project. 149
Remember in the first line we adopted our channels current and voltage situations and the permissions 150
for the offset and gain settings. 151
So we adopted it we write H3 and we write 0 to first module to CR33 152
and offset settings are adopted for 4mA and for 5V and the gain settings of all channels 153
adopted when we get 20mA we will get 1000. 154
When we get what inside of the plc 4000 and it will be equal to 10 volt and the outputs will 155
be 0 to 10 volt. 156
And if we write 4000 to our outputs it will give 10 volt and in here we are reading from analog 157
inputs with the from command. 158
So from the first module we are reading C12-13 159
Let's take a look. 160
12 is Channel One input present value then Channel 13 or control registers 13 is Channel 2 input 161
present value. 162
So we are reading current from here analog input from here and we are writing these values to D200 163
is our current input value D202 inside of it we can see our voltage 164
input value. 165
So let's compare it for example in here we are comparing Channel 1 as mA 166
So what we did we are starting from 200 and the maximum value is 1000. 167
So in here we have 16 mA and so it is starting from 4-20Ma And 800 equals 168
16Ma and so 1Ma equals to I'm sorry like this 50 value, 169
If you want to compare with 10 mA and 10 mA. 170
Multiply by 50. 171
So we get this value. 172
So we are comparing it with this value. 173
And if it's bigger than for example 500. 174
So let's go back our question. 175
So if it is bigger than 10 mA then motor1 is going to start. 176
Okay. 177
Let's take a look ones in here. 178
If it's bigger than this value so the motor will turn and if it bigger than 15 mA then 15 multiply 179
by 50. 180
So it is equal to 750. 181
The second motor is going to turn and the compare Channel 2 which 5V. 182
So remember we started from K 1000 183
It is our now. 184
zero position. 185
So K2000 = 5V 186
So because we started from one thousand one thousand is zero and go back to here and let's take 187
a look to it for the offset value. 188
This is our range. 189
So two K 2000 190
So in here let's go back to here. 191
So K 2000 = 5V 192
Why. 193
Because what we have we have 0 to 194
K2000 it started from here. 195
And this is completely. 196
2000 was 10 Volt and one thousand is 5Volt 197
So now we are starting from this one than the rest of all is not used but we can go a little 198
bit further. 199
How like this K 2000 is - K1000 and it equals 1000 so 1000 equals 5V 200
And if it D202 our temperature is lower than 5V according to our comparision. 201
Motor 3 is going to turn and if D202 202
D202 value is equals or bigger than 5V 203
K2000 204
That means the 4. Motor will turn these are the outputs are from plc then you can 205
connect this output to your motors to your relays or contactors etc. then you can turn 206
motors according to analog inputs then and also analog output. 207
In this video. 208
Finished in here. 209
see you in the next video.