(step 1 of 2)
Write your email address in the white field and then click the "Confirm" button.
(step 2 of 2)
Write your password in the white field and then click the "Confirm" button.
Or click the "Request password" button to request forgotten password.
Email address has not been found!
Click the "Previous step" button to to enter your email address again.
Or click the "Register user" button to register your email address.
Pasword does't match!
Click the "Previous step" button to enter the password again.
Or click the "Request password" button to request forgotten password.
(step 1 of 2)
Write your email address in the white field and then click the "Confirm" button.
(step 2 of 2)
Your password has been sent to your email.
Please also check your spam folder.
Email address has not been found!
Click the "Previous step" button to enter your email address again.
Or click the "Register user" button to register your email address.
(step 1 of 5)
Write your email address in the white field and then click the "Confirm" button.
(step 2 of 5)
Registration code has been sent to your email.
Please also check your spam folder.
Copy the registration code from your email in the white field and then click the "Confirm" button.
Or click the "Previous step" button to request the registration code again.
Email address already exists!
Click the "Previous step" button to enter the email address again.
Or click the "Log in user" button to log in with your email address and password.
Or click the "Request password" button to request forgotten password.
(step 3 of 5)
Set your user name in the white field and then click the "Confirm" button.
Registration code does't match!
Click the "Previous step" button to enter the registration code again.
(step 4 of 5)
Set your password in the white field and then click the "Confirm" button.
User name already exists!
Click the "Previous step" button to set another user name.
(step 5 of 5)
User has been successfully registered.
Click the "Log in user" button to log in.
Please log in to be able to open user settings.
Click the "Log in user" button to log in with your email address.
Or click the "Register user" button to register your email address.
Your subscription has been successfully canceled.
Your subscription has been successfully established.
Write your comment in the white field and then click the "Add comment" button.
Article#: 00083
Date: 2023-03-19
Author: Radim
Diagnostic tools are essential for PLC maintenance and troubleshooting.
During development we need diagnostic tools to test the program.
And with the help of diagnostic tools we can also ensure that the system is operating at its optimal level.
Not all development environments offer the same set of powerful and useful diagnostic tools.
So we have to choose a development environment that offers us all the important diagnostic possibilities.
And when the diagnostic tools are available, we also have to remember to program in such a way that the diagnostics can be used.
Nowadays, CPU power and memory size seem to be limitless.
Even so, we can easily exhaust these resources with an improperly written program.
That is why we need to regularly check the used and free system resources like memory, CPU usage and time utilization of assigned task classes.
We need to have an overview of the status of the configured hardware, whether all modules are connected and communicating correctly.
We need to know how much traffic is on the network or system bus.
We must be able to map the information about the system to the program variables in order to be able to react to exceptional situations in the program.
We must be able to connect our development environment to the real system, monitor and force the values of the PLC inputs, outputs and all program variables.
We need a tool that shows a trend of selected variables with their sample rate in a chart.
It is useful if we can connect the development environment to the real system and see in the program what parts of the program are just carried out.
And we have to be able to track the running program with the help of breakpoints and step functions.
Diagnostic tools are to a programmer what x-rays are to a surgeon.
Diagnostic tools have to be available and the programmer has to use them for his work.
© Radim-Automation, 2020–2025. All rights reserved.
Sharing of this article is permitted with proper attribution (link to the original page).
Related previous articles:
Related next articles:
Comment#: 00001
Date: 2023-03-20
User: Radim
"The debugger is used the same way for all text-based programming languages. In the programming language Sequential Function Chart (SFC), user-defined breakpoints are only possible to steps. Setting breakpoints is not possible in the programming languages Ladder Diagram (LD), Function Block Diagram (FBD), Continuous Function Chart (CFC) and reACTION Technology Diagram."
- B&R Automation Help 4.12.2.65. GUID = 9e5bf6ef-b512-4b52-97cf-df6602791c61.
Comment#: 00002
Date: 2023-03-30
User: Radim
In order to analyze and successfully fix an error, it is necessary to know what values are actually stored in some suspicious variables.
Don't think that you only have to monitor some predefined variables and never have to worry about the value of the other variables.
Just as we cannot imagine in advance which errors will appear later and will need to be fixed, it is also not possible to know in advance which variables must be monitored in the event of an error. It is therefore necessary to be able to monitor all variables in the program!
Do not use any variable declaration (e.g. "static") that makes the variable values unmonitorable!
Comment#: 00003
Date: 2023-03-30
User: Radim
As you write a program, be careful of variables that are just pointers, and display the address of the pointer instead of the value of the variable in the diagnostic monitor window.
In such a case it makes sense for diagnostic purposes to declare an extra variable into which we copy the value from the pointer's adress (pointer dereferencing). This way we can monitor the value at any time with the online diagnostic monitor window.
Comment#: 00004
Date: 2023-03-31
User: Radim
For easy diagnostics, it's a good idea to use flags in the program that tell us what command or status is currently set when observing the flags in the diagnostic monitor window.
Comment#: 00005
Date: 2023-04-04
User: Radim
It is necessary to program in such a way that we can set a breakpoint in the program. For example, in some libraries this is not possible.
It is not possible to set a breakpoint in a static library written in C language in the B&R system and therefore it is not possible to debug it.
It is also not possible to set a breakpoint in the binary library.
Comment#: 00006
Date: 2023-04-10
User: Radim
Special care should be taken before setting a breakpoint in a program on a real machine. Especially if the program is responsible for controlling and stopping drives and processes.
Hitting a breakpoint stops the entire application running on the target system. However, the states of the outputs of I/O modules remain unchanged!
Running drives and started processes are not stopped and keep running when the application stops at a breakpoint. And no one has control over them anymore!
In a properly designed system, an independent safety function must stop running drives and processes at the latest before a collision occurs.
Comment#: 00007
Date: 2023-04-11
User: Radim
When testing with the debugger and breakpoints, we have to be careful that the timing behavior and processing between multiple task classes does not match the reality when the program is running without being stopped by a breakpoint.
In the B&R Automation Studio, I noticed that when the program stops at a breakpoint, all tasks are stopped and when you press the Step Into or Step Over button, the corresponding task class only jumps to the next command line, but tasks of the other task classes execute the entire cycle.
Therefore, be careful what you observe when using a breakpoint, as it may not be the same as the behavior without using a breakpoint.
Comment#: 00008
Date: 2023-07-06
User: Radim
Program the code so that when you switch to the online state of the program, you can see the current values of the variables in the code. This makes it easier to analyze program behavior and find possible errors. It is also important that you can write and force the values of variables!
Comment#: 00009
Date: 2023-07-11
User: Radim
"New risks are also emerging in automated production, because who will restart a plant or even just a machine if the staff responsible for it at the time of shutdown are no longer working in the same plant. The transfer of knowledge, for example about the last software versions or settings, becomes indispensable. If you do not have the processes and the right solution in place, you risk everything. At this point, trends such as deploying increasing amounts of robots can only help to a limited extent, because even robots are dependent on updates and a certain level of maintenance."
- Curated by Statista, supported by octoplant by AUVESY-MDT. No Fatalism in Manufacturing. Exciting Insights from Leading Studies. (Page 5)
- https://info.auvesy-mdt.com/hubfs/Statista%20ePaper%20EN%20-%20AUVESY-MDT.pdf
Comment#: 00010
Date: 2023-07-21
User: Radim
"The essential function of the PLC is to receive data from sensors or other field devices; make a decision on what to do with that information based on its programming instructions, for example, to open or close a valve based on fluid levels or direct a robot to pick up an object based on its presence in the work cell; and send the correct signal to the actuator (such as a valve or robot gripper) to perform the task."
- David Greenfield. AutomationWorld (2023). Peer-to-Peer FAQ: Controllers.
- https://www.automationworld.com/control/article/22724233/industrial-controller-technologies
Comment#: 00011
Date: 2023-08-10
User: Radim
"The information that should be available on a graphical user interface (GUI) of a machine depends heavily on the type of machine and its application. However, here are some basic pieces of information that are often displayed on a GUI:
1. Status Information: The GUI should display important status information about the machine, such as whether it's powered on or operational, whether it has issues or error messages, and whether all systems are functioning properly.
2. Operational Parameters: Display the current operational parameters of the machine, such as speed, temperature, pressure, voltage, etc. This allows the user to monitor the machine's current state and make adjustments if needed.
3. Process Overview: If the machine is involved in an ongoing process (e.g., manufacturing, processing, analysis), relevant process data and steps should be displayed on the GUI. This helps the operator monitor the progress of the process and identify potential deviations.
4. Warnings and Error Messages: Display warnings or error messages if problems or critical situations arise. This enables the operator to react quickly and take appropriate actions.
5. User Interaction: Provide interfaces for user interaction, such as adjusting settings, changing parameters, or issuing commands. This includes buttons, dropdown menus, text fields, and other elements.
6. Historical Data: A history or log of past events and activities can be helpful for identifying trends, diagnosing errors, or making performance improvements.
7. Documentation and Help Material: Provide user manuals, help tutorials, or links to further information so that users can learn about operation, maintenance, and potential issue resolutions.
8. Visualizations: Depending on the application, charts, graphs, or visual representations of relevant data can be useful for recognizing relationships and trends more easily.
9. User Profiles and Settings: Allow users to create individual profiles and configure specific settings to match their workflow.
10. Safety Information: If the machine could potentially be hazardous, the GUI should display safety instructions, emergency stop buttons, or other safety mechanisms.
11. Contact Information and Support: Provide contact information for technical support or customer service in case users need assistance or support.
It's important to carefully design the GUI based on user needs and the type of machine to ensure a user-friendly and efficient experience."
- https://chat.openai.com (What information should be available in the machine's graphical user interface?)
Comment#: 00012
Date: 2023-08-11
User: Radim
"How to eliminate fifty percent of your business worries.
Everyone who wishes to present a problem to me must first prepare and submit a memorandum answering these four questions:
1. What is the problem?
2. What is the cause of the problem?
3. What are all the possible solutions of the problem?
4. What solution do you suggest?
My associates rarely come to me now with their problems. Why? Because they've discovered that in order to answer those four questions, they have to get all the facts and think their problems through. And they've done that, they find in three-fourths of the the cases they don't have to consult me at all because the proper solution has popped out like a piece o fbread popping up from an electric toaster. Even in those cases where consultation is snecessary the discussion takes about one-third of the time formely required because it proceeds along an orderly, logical path to a reason conclusion."
- Dale Carnegie. Crescent News (1944). How to Stop Worrying and Start Living.
- https://www.youtube.com/watch?v=fKzlc_N2yxw (01:07:50 - 01:09:53)
Comment#: 00013
Date: 2023-08-11
User: Radim
"Basic techniques in analysing worry:
Rule 1 - get the fact. Half the worry in the wold is caused by people trying to make decisions before they have sufficient knowledge on which to base a decision.
Rule 2 - after carefully weighing all the facts come to a decision.
Rule 3 - once a decision is carefully reached, act, get busy carrying out your decision and dismiss all enxiety about the outcome.
Rule 4 - when you or any of your associates are tempted to worry about a problem, write out and anser the following questions:
a) What is the problem?
b) What is the cause of the problem?
c) What are all possible solutions?
d) What is the best solution?"
- Dale Carnegie. Crescent News (1944). How to Stop Worrying and Start Living.
- https://www.youtube.com/watch?v=fKzlc_N2yxw (01:12:50 - 01:13:50)
Comment#: 00014
Date: 2023-08-18
User: Radim
"Don't dig deep into anything because it costs us money. Just pretend that we are experts and hope that the others gets the chestnuts out of the fire."
- unnamed user (own experiences leading to this ironic statement)
Comment#: 00015
Date: 2023-09-11
User: Radim
Does it make sense to think about digitalization if we don't see any use case?
"If you don't see any practical use case or clear benefit for digitalization in your specific situation, it may not make sense to pursue it blindly. Digitalization should always align with your organization's goals and needs. Here are some considerations:
1. Assess Business Objectives: Start by identifying your organization's objectives and challenges. Digitalization should align with your strategic goals, whether it's improving efficiency, reaching new markets, enhancing customer experiences, or reducing costs.
2. Customer Demands: Consider whether your customers or clients expect or would benefit from digital solutions. If there's no demand for digital services, investing in them may not provide a return on investment.
3. Competitive Landscape: Analyze your competition. If your competitors are effectively utilizing digital technologies to gain a competitive advantage, it might be necessary to explore digitalization to stay relevant.
4. Cost-Benefit Analysis: Conduct a thorough cost-benefit analysis to determine if the potential benefits of digitalization outweigh the costs. If the investment doesn't offer a reasonable return, it might not be justified.
5. Resource Availability: Evaluate whether you have the necessary resources, including financial resources, technical expertise, and staff training, to implement and sustain digital solutions effectively.
6. Future Growth: Consider the scalability of your organization. Even if you don't currently see a clear use case for digitalization, it's essential to think about your organization's future growth and whether digital technologies could play a role in that growth.
7. Technology Trends: Stay informed about industry trends and emerging technologies. While there may not be an immediate use case, technological advancements could create new opportunities down the line.
8. Customer Feedback: Engage with your customers or stakeholders to gather feedback on their needs and preferences. They may provide insights that could uncover potential use cases for digitalization.
9. Pilot Projects: Instead of a full-scale digital transformation, consider starting with smaller pilot projects to test the waters and assess the feasibility and impact of digital solutions in a controlled environment.
10. Consult Experts: Seek advice from digital transformation consultants or experts in your industry. They can provide insights into potential use cases and help you determine if digitalization is appropriate for your organization.
In some cases, it may indeed be the case that digitalization doesn't make sense for your organization at a given time. However, it's essential to regularly revisit this assessment as technology and business landscapes evolve. What might not be relevant today could become essential in the future. Ultimately, the decision to pursue digitalization should be guided by a thorough understanding of your organization's unique needs and circumstances."
- https://chat.openai.com (Does it make sense to think about digitalization if we don't see any use case?)
Comment#: 00016
Date: 2023-09-27
User: Radim
"By continuously improving the design of code, we make it easier and easier to work with.
This is in sharp contrast to what typically happens: little refactoring and a great deal of attention paid to expediently add new features.
If you get into the hygienic habit of refactoring continuously, you'll find that it is easier to extend and maintain code."
- Joshua Kerievsky. Addison-Wesley (2004). Refactoring to Patterns.
Comment#: 00017
Date: 2023-10-02
User: Radim
How to get the right intuition?
"Developing and honing your intuition can be a valuable skill, but it's important to remember that intuition is inherently subjective and can't always be "right" in an objective sense. However, you can work on improving the accuracy and reliability of your intuition by following these tips:
1. Increase Your Knowledge and Experience: The more you know about a particular subject or domain, the better your intuition is likely to be within that area. Gain expertise and experience through study, practice, and exposure.
2. Trust Your Gut: Pay attention to your gut feelings or initial impressions. Sometimes, your subconscious mind processes information faster than your conscious mind, leading to intuitive insights. Don't dismiss these feelings outright; give them consideration.
3. Practice Mindfulness: Mindfulness meditation can help you become more aware of your thoughts and feelings. This self-awareness can improve your ability to recognize and trust your intuition.
4. Keep a Journal: Maintain a journal where you record your intuitive hunches and the outcomes. Over time, this can help you assess the accuracy of your intuition and learn from your experiences.
5. Seek Feedback: Discuss your intuitive insights with trusted friends, mentors, or colleagues. They can provide valuable perspectives and help you refine your intuition by offering feedback on your decisions.
6. Validate with Data: When possible, seek out data or information that can confirm or refute your intuitive impressions. This can help you develop a more evidence-based form of intuition.
7. Relax and Clear Your Mind: High-stress levels or a cluttered mind can cloud your intuition. Engage in relaxation techniques like deep breathing, meditation, or progressive muscle relaxation to clear your mind and enhance your intuitive abilities.
8. Ask Open-Ended Questions: When facing a problem or decision, ask yourself open-ended questions and let your mind wander. This can stimulate creative and intuitive thinking.
9. Learn from Mistakes: Embrace your intuition's imperfections. When your intuition leads you astray, use those experiences as learning opportunities. Analyze what went wrong and adjust your intuition accordingly.
10. Practice Patience: Sometimes, intuition needs time to develop. Don't rush your decision-making process if you're unsure. Give yourself the space to allow your intuition to emerge.
11. Combine with Analysis: Balance your intuition with analytical thinking. For important decisions, use your intuition as an initial guide but then follow up with critical analysis and data-driven assessment.
12. Cultivate Emotional Intelligence: Understand and manage your emotions effectively. Emotional intelligence can enhance your ability to perceive and interpret your own and others' emotional signals, which can inform your intuition.
Remember that intuition can vary from person to person, and it's not always infallible. It's a skill that you can refine over time, but it's also important to recognize its limitations and use it as a complementary tool alongside rational thinking and evidence-based decision-making when appropriate."
- https://chat.openai.com (How to get the right intuition?)
Comment#: 00019
Date: 2023-11-20
User: Radim
I work in an engineering office and am often called to cases where the machine is 90-95% functional and was therefore "successfully" handed over to the customer some time ago.
In about 5-10% of cases, however, the machine does not work well. After a few weeks, the customer is annoyed and demands 100% functionality of the machine...
Since the original developer is often not available, we, the external developers, are asked to fix these "small" bugs.
This is often not an easy task, as the problems are not clearly reproducible and occur more or less sporadically. In this case, a good set of diagnostic tools is a prerequisite for analyzing and fixing the problems.
By the way, if the development team had followed the advice given in this blog, the problems would not exist at all ;-)