SlideShare a Scribd company logo
1 of 15
Sometimes, deadlocks in PC supported automation systems can be a real headache if it designed poorly.  When a deadlock occurs, system stops by making it impossible to free up without intervention. Assume that we have a conveyor carrying boxes, and scanning each boxes barcode and store it in computer database. We should have an ordinary PC – PLC handshake system 1 2 3 Boxes move this way
Network delays or PC unstability may cause delays in this handshake.  Following legend is intended to visualise PC – PLC handshake, only two signals are included. Barcode data is omitted. Initially, Box 1 is not on the station yet, and  is ready for receiving a box data  1 2 3
Let's see a normal operation. When Box 1 comes to the station, PLC gets the product presence information from sensor and transfers it to the PC by setting 'Data Save Request' flag to 'True' 1 2 3
When PC gets boxes information, it updates a database table and informs PLC by setting 'Data Saved' flag to 'True' when completed. 1 2 3
Then PLC sends the Box 1, and clears its 'Data Save Request' 1 2 3
And PC clears its 'Data Saved' flag. 1 2 3
This is a complete cycle without any problem.  In normal conditions, this cycle is repeated by many times between PC and PLC 2 3
However, PC is not stable as PLC, sometimes it can be late to give an answer to PLC. In this case, PLC will not send the box until it gets a response from PC. 2 3 4
Normally it is not a big problem, may be less than a second of waiting may occur.  2 3 4
But what may happen if PC have a temporary hang at this moment? PLC resets its 'Data Save Request' but PC could not find a chance to see it yet.  2 3 4
But what may happen if PC have a temporary hang at this moment? PLC resets its 'Data Save Request' but PC could not find a chance to see it yet.  And unfortunately, Box 3 come to the station. 3 4 5
Before hanging, PC set the 'Data Saved' flag for Box 2 and did not realised that Box 3 is on the station. PC is assuming that Box 2 never leaved the station 3 4 5 2
Now there are two possibilities according to the poorness of design: Possibility 1: Deadlock. PC and PLC mutually waits each other to reset their flag.  3 4 5 2
Now there are two possibilities according to the poorness of design: Possibility 2: Miss the Box 3 without recording its data into database  3 4 5 Bye bye Box 2 !
'State analysis' of a system is important. A poor design may cause unwanted results. In next post, we will do a state analysis for the single station with a single task. http://indanotes.blogspot.com

More Related Content

Similar to Deadlock situation and missed products

Ok 6 alu
Ok 6 aluOk 6 alu
Ok 6 alu
windi1
 
Omni gprs+gps+ble (permenant connection) smart lock air interface protocol v0...
Omni gprs+gps+ble (permenant connection) smart lock air interface protocol v0...Omni gprs+gps+ble (permenant connection) smart lock air interface protocol v0...
Omni gprs+gps+ble (permenant connection) smart lock air interface protocol v0...
zeroormax1
 
Profiling the logwriter and database writer
Profiling the logwriter and database writerProfiling the logwriter and database writer
Profiling the logwriter and database writer
Enkitec
 
Uccn1003 -may10_-_lab_04_-_intro_to_layer-1_network_devices-updated_30_june2...
Uccn1003  -may10_-_lab_04_-_intro_to_layer-1_network_devices-updated_30_june2...Uccn1003  -may10_-_lab_04_-_intro_to_layer-1_network_devices-updated_30_june2...
Uccn1003 -may10_-_lab_04_-_intro_to_layer-1_network_devices-updated_30_june2...
Shu Shin
 

Similar to Deadlock situation and missed products (17)

Pt using packettracer
Pt using packettracerPt using packettracer
Pt using packettracer
 
Ok 6 alu
Ok 6 aluOk 6 alu
Ok 6 alu
 
tcp-wireless-tutorial.ppt
tcp-wireless-tutorial.ppttcp-wireless-tutorial.ppt
tcp-wireless-tutorial.ppt
 
All of Your Network Monitoring is (probably) Wrong
All of Your Network Monitoring is (probably) WrongAll of Your Network Monitoring is (probably) Wrong
All of Your Network Monitoring is (probably) Wrong
 
Reactsf 2014-message-driven
Reactsf 2014-message-drivenReactsf 2014-message-driven
Reactsf 2014-message-driven
 
Microcontroller part 9_v1
Microcontroller part 9_v1Microcontroller part 9_v1
Microcontroller part 9_v1
 
ICMP.ppt
ICMP.pptICMP.ppt
ICMP.ppt
 
Multinetworking
MultinetworkingMultinetworking
Multinetworking
 
Omni gprs+gps+ble (permenant connection) smart lock air interface protocol v0...
Omni gprs+gps+ble (permenant connection) smart lock air interface protocol v0...Omni gprs+gps+ble (permenant connection) smart lock air interface protocol v0...
Omni gprs+gps+ble (permenant connection) smart lock air interface protocol v0...
 
High available energy management system
High available energy management systemHigh available energy management system
High available energy management system
 
Pt090 C
Pt090 CPt090 C
Pt090 C
 
Troubleshooting-computer-system-network-1.pptx
Troubleshooting-computer-system-network-1.pptxTroubleshooting-computer-system-network-1.pptx
Troubleshooting-computer-system-network-1.pptx
 
Computer Networks Module 2.pdf
Computer Networks Module 2.pdfComputer Networks Module 2.pdf
Computer Networks Module 2.pdf
 
Profiling the logwriter and database writer
Profiling the logwriter and database writerProfiling the logwriter and database writer
Profiling the logwriter and database writer
 
Tcp congestion avoidance
Tcp congestion avoidanceTcp congestion avoidance
Tcp congestion avoidance
 
Troubleshooting TCP/IP
Troubleshooting TCP/IPTroubleshooting TCP/IP
Troubleshooting TCP/IP
 
Uccn1003 -may10_-_lab_04_-_intro_to_layer-1_network_devices-updated_30_june2...
Uccn1003  -may10_-_lab_04_-_intro_to_layer-1_network_devices-updated_30_june2...Uccn1003  -may10_-_lab_04_-_intro_to_layer-1_network_devices-updated_30_june2...
Uccn1003 -may10_-_lab_04_-_intro_to_layer-1_network_devices-updated_30_june2...
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Recently uploaded (20)

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 

Deadlock situation and missed products

  • 1. Sometimes, deadlocks in PC supported automation systems can be a real headache if it designed poorly. When a deadlock occurs, system stops by making it impossible to free up without intervention. Assume that we have a conveyor carrying boxes, and scanning each boxes barcode and store it in computer database. We should have an ordinary PC – PLC handshake system 1 2 3 Boxes move this way
  • 2. Network delays or PC unstability may cause delays in this handshake. Following legend is intended to visualise PC – PLC handshake, only two signals are included. Barcode data is omitted. Initially, Box 1 is not on the station yet, and is ready for receiving a box data 1 2 3
  • 3. Let's see a normal operation. When Box 1 comes to the station, PLC gets the product presence information from sensor and transfers it to the PC by setting 'Data Save Request' flag to 'True' 1 2 3
  • 4. When PC gets boxes information, it updates a database table and informs PLC by setting 'Data Saved' flag to 'True' when completed. 1 2 3
  • 5. Then PLC sends the Box 1, and clears its 'Data Save Request' 1 2 3
  • 6. And PC clears its 'Data Saved' flag. 1 2 3
  • 7. This is a complete cycle without any problem. In normal conditions, this cycle is repeated by many times between PC and PLC 2 3
  • 8. However, PC is not stable as PLC, sometimes it can be late to give an answer to PLC. In this case, PLC will not send the box until it gets a response from PC. 2 3 4
  • 9. Normally it is not a big problem, may be less than a second of waiting may occur. 2 3 4
  • 10. But what may happen if PC have a temporary hang at this moment? PLC resets its 'Data Save Request' but PC could not find a chance to see it yet. 2 3 4
  • 11. But what may happen if PC have a temporary hang at this moment? PLC resets its 'Data Save Request' but PC could not find a chance to see it yet. And unfortunately, Box 3 come to the station. 3 4 5
  • 12. Before hanging, PC set the 'Data Saved' flag for Box 2 and did not realised that Box 3 is on the station. PC is assuming that Box 2 never leaved the station 3 4 5 2
  • 13. Now there are two possibilities according to the poorness of design: Possibility 1: Deadlock. PC and PLC mutually waits each other to reset their flag. 3 4 5 2
  • 14. Now there are two possibilities according to the poorness of design: Possibility 2: Miss the Box 3 without recording its data into database 3 4 5 Bye bye Box 2 !
  • 15. 'State analysis' of a system is important. A poor design may cause unwanted results. In next post, we will do a state analysis for the single station with a single task. http://indanotes.blogspot.com