Siemens Home
Siemens Inverter
Siemens PLC
Siemens Product Center
Siemens Update
Contact Us

Siemens Update 

Siemens Update

Simens Analog Conversion Exercise

Publish Date 2018-07-24
Video tutorials don't do exercises.
Is this the right way to program?

Picture description:

Figure 5



Figure 6
Several suggestions:

1) According to the meaning of the problem is the operation of floating-point numbers, the instructions between them need to be carried out with floating-point instructions. If the original operands are not floating-point numbers, they need to be converted to floating-point numbers before they can be calculated. Converting data from VD204 to VD220 addresses that are not floating-point numbers to floating-point numbers in advance.

2) Floating-point numbers occupy four byte addresses in plc, such as VD200 (the area where your calculation results are stored), which contains VB200-VB203 (VW0-VW2). These addresses can not be used again in other program segments, otherwise it is easy to cause calculation errors. (As you can see in Figure 2, VD0 and VD1) This is an incorrect use of address occupancy.

VD0 VD1

VB0 VB1 VB2 VB3 VB1 VB2 VB3 VB4

Seen from the above figure, VB1 ~ VB3 are the two parts of address duplication (the part of address reset).

3) It is right to start by converting the data of an analog quantity into double integers, instead of integers, to floating-point numbers (DI_R). The double integers of VD100 are converted into floating-point numbers through DI_R, and the results are stored in VD0. If the next address is needed, then the address area where VD4 begins.

4) When the data are ready in advance, it is not a problem to calculate according to that formula, * and then to verify the formula (whether the verification program is unreasonable). If it is correct, it can be applied to the actual control.






Siemens Home  |  Siemens Inverter  |  Siemens PLC  |  Siemens Product Center  |  Siemens Update  |  Contact Us  |  Sitemap  |  Mobile Version
  简体版     繁體版     English

Powered by DIYTrade.com  Build your FREE website !
Find Best Price For China Products !