HCBBS Forum (English)
Submit Chemical Projects / Find Solutions
Amplify Your Requirements on a Broader Chemical Platform *Engineering · Technology · Equipment · Solutions*
Submit Request

20 common problems with Siemens PLCs

2022-04-17View Original

Thread Content

Siemens PLCs account for half of the global PLC market. Now, by focusing on system integration architectures and network configurations, a new round of competition to capture and divide this market has begun, and it is intensifying steadily. As the leading brand in the PLC industry for industrial applications, it is highly necessary to gain a comprehensive understanding of it from multiple perspectives. Let’s explore the 20 common problems associated with Siemens PLCs together. 1. When using a timer with self-reset for continuous timing, why does it seem to operate irregularly when other functions or subroutines are called? Please note the description in the “S7-200 Siemens PLC System Manual” regarding the three types of timer refresh patterns. When using a timer in this manner, the setting and resetting of the timer may not be synchronized with the program scan cycle; this creates a mechanism that can lead to the aforementioned problems. Timer tasks with a relatively short interval should use the “timer interrupt” feature, as this is more reliable. 2. I wrote a program that uses a timer; it passed compilation, but why is an error message displayed when it is downloaded to the CPU? This situation is often caused by a mismatch between the invoked timer number and the timer type. Refer to the table in the help; for example, T7 can only be used as TONR, not as TON or TOF. 3. The timed interrupt (SMB34/SMB35) has a maximum timing of 255 ms; how can a longer timing be achieved? The T32/T96 interrupts can be used, with a maximum duration of 32.767 seconds. Counting the number of times the interrupt is triggered within the timer interrupt service routine can also achieve a longer interrupt delay. 4. What to do if the number of timed interrupts is insufficient? Not every timer interrupt service routine has to handle only one timing task; several tasks can be placed within a single timer interrupt service routine. For tasks with different timing intervals, the greatest common divisor of their timing lengths can be calculated to serve as the time setting for the timed interrupt. Count the interrupt events within the interrupt service routine, and use this to program different tasks for handling them. 5. When using subroutines, why can the action only be executed once, or why can certain states not be terminated? If an action cannot be repeated or a state cannot be terminated (as if it’s locked), and these issues are related to subroutines, please check whether there are conditional calls to those subroutines. The condition for calling a subroutine becomes invalid after the aforementioned actions are performed or once a certain state is reached, and it cannot be \"activated\" again; since the instructions for exiting that state or resetting it are located within the subroutine, this phenomenon inevitably occurs. 6. Why do variables defined as OUT type in subroutines with form parameters interfere with each other when the subroutine is called multiple times? That is because the form parameter defined as OUT type is also involved in calculations within the subroutine. All such parameters should be defined as the IN_OUT type. 7. Why do the calculation tasks related to the interrupt service routine occasionally produce incorrect results? The reason for this phenomenon is usually an improper mechanism for transferring data between the main (sub)program and the interrupt program. The interrupt routine may be executed at any time; if the main program (or subroutine) is currently working on the data used by the interrupt routine, the intermediate results from that work might be carried over into the interrupt routine, resulting in changes in the calculation outcomes ; Similarly, data generated in the interrupt routine also has a similar effect on the calculations in the main (sub)routine. 8. Does it seem like the interrupt service routine is not being executed? A test segment can be added to the interrupt program; for example, use SM0.0 (which is usually “1”) to set an output point (using the Set instruction) and observe whether the interrupt service routine is invoked. The interrupt program does not execute; the most common reasons are issues with initialization (connecting the interrupt event to the interrupt program), or the interrupts not being enabled. An initialization should be performed using SM0.1 (or along trigger), and then the interrupt should be enabled. 9. How to achieve “clock synchronization” when connecting TP170, TP170micro, and S7-200? The default clock format of TP170 differs from the date and time format read by the clock command of the S7-200 Siemens PLC; the clock data obtained needs to have its format changed in order to enable clock synchronization with devices such as TP170. Relevant information can be found in the online help of ProTool, the configuration software for TP170. 10. How do high-speed counters occupy input points? Depending on the defined operating mode, high-speed counters occupy the digital input points on the CPU as needed. Each counter occupies a fixed set of input points according to its operating mode. Input points that are not used in a certain mode can still be used as regular input points ; Input points occupied by counters (such as external reset) can still be accessed in the user program. 11. Why doesn’t the high-speed counter work properly? In the program, it is necessary to use the memory bit SM0.1 from the initial scan to call the HDEF instruction, and this can only be done once. If the SM0.0 is used to call it or if the HDEF instruction is executed a second time, it will cause a runtime error, and it is not possible to change the setting of the counter from the first execution of the HDEF instruction. 12. How is a high-speed counter addressed? Why cannot the current count value be read from SMDx? HC0 can be used directly ; HC1 ; HC2 ; HC3 ; HC4 ; HC5 can address different high-speed counters to read their current values, or it is also possible to enter the aforementioned addresses in the status table to directly monitor the current values of the high-speed counters. SMDx does not store the current value. The count value of a high-speed counter is a 32-bit signed integer. 13. How to reset a high-speed counter to 0? A high-speed counter with an external reset mode should be selected; when the signal at the external reset input is active, the high-speed counter is reset to 0. An internal program reset can also be used, whereby the high-speed counter is set to allow an initial value to be updated, and that initial value is set to 0. After executing the HSC command, the high-speed counter is reset to 0.14. So, after being reset, does the value of the high-speed counter return to its initial value or to the value of 0? External reset resets the current value to 0, rather than to the initial value ; Internal reset resets the current value to the initial value. If you set an updatable initial value but do not assign a new value to the initial value register during the interrupt, then after executing the HSC instruction, it will be assigned the value set at initialization. 15. Why don’t the initial value and preset value assigned to a high-speed counter take effect, or why is the outcome unexpected? The settings of a high-speed counter, such as its initial value and preset value, can be changed either during initialization or while it is in operation. The operation steps should be: 1) Set the update option for the control byte. To update which setting data, set the corresponding control bit in the control byte to “1” ; For settings that do not need to be changed, the corresponding control bits cannot be set. 2) Then, the desired values are fed into the initial value and preset value control registers. 3) Execute HSC commands. 16. What type of CPU should be used for functions that employ a PTO/PWM generator? A CPU with a 24VDC transistor output should be used; those with a relay output are absolutely not suitable. 17. What is the amplitude of the PTO or PWM output? The amplitude of the PTO or PWM output is 24V (active high, with the common negative terminal connected). To obtain an output with a different voltage amplitude, a converter must be added separately. 18. During the execution of the PTO pulse train, can you change its period value using the PLS command? No, the PTO output must be terminated before the period value can be changed. 19. How to force-stop PTO or PWM output? The enable bits SM66.7 or SM76.7 in the control byte can be cleared through programming, and by then executing the PLS command, the PTO or PWM output can be stopped immediately. 20. Why is the indicator light for the output signal on, but no proper voltage waveform is generated, or are pulses lost at times? The minimum load for PTO or PWM output shall not be less than 10% of the rated load ; That is, when the output is at a high level, the load current is not less than 140mA.

Submit a Project

**Looking for Chemical Technology, Equipment & Solutions?** No Registration Required Broader Platform Exposure | Global Chemical Service Provider Connections

Submit Request — Free Consultation

Disclaimer

This is an automated machine translation of the original thread. Some technical terms may have inaccuracies; the original text shall prevail. Click "View Original" at the top right to access the source page, which supports IP-based automatic real-time language translation. Please watch out for contact details and sales inducements to prevent fraud. All content and translations are for reference only, representing solely the poster's personal views. For enquiries, email service@hcbbs.com.