Latch Instructions
Now that we understand how inputs and outputs are processed by the plc, let's look at a variation of our regular outputs. Regular output coils are of course an essential part of our programs but we must remember that they are only TRUE when ALL INSTRUCTIONS before them on the rung are also TRUE. What happens if they are not? Then of course, the output will become false.(turn off)
Think back to the lunch bell example we did a few chapters ago. What would've happened if we couldn't find a "push on/push off" switch? Then we would've had to keep pressing the button for as long as we wanted the bell to sound. (A momentary switch) The latching instructions let us use momentary switches and program the plc so that when we push one the output turns on and when we push another the output turns off.
Maybe now you're saying to yourself "What the heck is he talking about?". (It's also what I'm thinking!) So let's do a real world example.
Picture the remote control for your TV. It has a button for ON and another for OFF. (mine does, anyway) When I push the ON button the TV turns on. When I push the OFF button the TV turns off. I don't have to keep pushing the ON button to keep the TV on. This would be the function of a latching instruction.
The latch instruction is often called a SET or OTL (output latch). The unlatch instruction is often called a RES (reset), OUT (output unlatch) or RST (reset). The diagram below shows how to use them in a program.

Here we are using 2 momentary push button switches. One is physically connected to input 0000 while the other is physically connected to input 0001. When the operator pushes switch 0000 the instruction "set 0500" will become true and output 0500 physically turns on. Even after the operator stops pushing the switch, the output (0500) will remain on. It is latched on. The only way to turn off output 0500 is turn on input 0001. This will cause the instruction "res 0500" to become true thereby unlatching or resetting output 0500.
Click here
and view the animation to really learn!Here's something to think about. What would happen if input 0000 and 0001 both turn on at the exact same time.
Will output 0500 be latched or unlatched?
To answer this question we have to think about the scanning sequence. The ladder is always scanned from top to bottom, left to right. The first thing in the scan is to physically look at the inputs. 0000 and 0001 are both physically on. Next the plc executes the program. Starting from the top left, input 0000 is true therefore it should set 0500. Next it goes to the next rung and since input 0001 is true it should reset 0500. The last thing it said was to reset 0500. Therefore on the last part of the scan when it updates the outputs it will keep 0500 off. (i.e. reset 0500).
Makes better sense now, doesn't it?
مزلاج التعليمات
والآن ونحن نفهم كيف تتم معالجة المدخلات والمخرجات من قبل المجلس التشريعي ، دعونا ننظر في الاختلاف من إصداراتنا العادية. لفائف الانتاج العادية هي بالطبع جزءا أساسيا من برامجنا ولكن علينا ان نتذكر ان تكون حقيقية إلا عندما تكون جميع التعليمات قبل لهم على درجة وصحيح أيضا. ماذا يحدث إذا لم تكن؟ ثم بطبيعة الحال ، سوف يصبح الناتج كاذبة. (إيقاف)
فكر في العودة إلى وجبة غداء سبيل المثال بيل فعلنا فصول قليلة. ما حدث لظل إذا لم نتمكن من العثور على "المضي قدما / دفع قبالة" التبديل؟ ثم هل كان لدينا لإبقاء الضغط على زر لطالما أردنا الجرس للصوت. (أ التبديل لحظية) الإرشادات الإغلاق دعونا استخدام مفاتيح لحظة وبرنامج المجلس التشريعي بحيث أننا عندما دفع احد الإخراج تشغيل وعندما ندفع آخر الإخراج إيقاف.
الآن ربما كنت تقول لنفسك "ما هيك هو يتحدث عنه؟". (وهي أيضا ما أنا أفكر!) لذا دعونا نفعل مثال العالم الحقيقي.
صورة جهاز التحكم عن بعد للتلفزيون الخاص. أنه يحتوي على زر لعلى وآخر للخارج. (الألغام لا ، على أي حال) عندما دفع على زر تشغيل التلفزيون. عندما دفع قبالة زر التلفزيون إيقاف. ليس لدي للحفاظ على زر دفع للحفاظ على التلفزيون. وستكون هذه وظيفة تعليمة الإغلاق.
المزلاج التعليم وغالبا ما تسمى مجموعة أو تكاليف دعم البرنامج (مزلاج الإخراج). ويطلق على التعليم في كثير من الأحيان تفتح الدقة (إعادة) ، من أصل (تفتح الإخراج) أو RST (إعادة). الرسم البياني ادناه يبين كيفية استخدامها في البرنامج.
الإغلاق الرسم التخطيطي
هنا نحن نستخدم 2 زر ضغط لحظة التبديل. يرتبط جسديا واحد لإدخال 0000 في حين أن الآخر هو متصلة فعليا إلى إدخال 0001. عندما يدفع المشغل التبديل 0000 التعليمات "تعيين 0500" سيصبح الانتاج الحقيقي ويتحول فعليا على 0500. حتى بعد توقف المشغل دفع التبديل ، وسيكون الناتج (0500) لا تزال في. هو مغلق عليه. الطريقة الوحيدة لإيقاف انتاج 0500 هو بدوره على مدخلات 0001. هذا سوف يسبب التعليمات "الدقة 0500" ، لتصبح بذلك الفتح الحقيقي أو إعادة إنتاج 0500.
انقر هنا عرض للرسوم المتحركة! وعرض الرسوم المتحركة لتعلم حقا!
هنا شيء للتفكير. ماذا سيحدث لو وإدخال 0000 0001 كلا تشغيل في نفس الوقت بالضبط.
هل يكون مغلق أو الإخراج 0500 unlatched؟
للإجابة على هذا السؤال يتعين علينا أن نفكر في تسلسل المسح. سلم يتم تفحص دائما من أعلى إلى أسفل ، اليسار إلى اليمين. أول شيء في الفحص هو أن ننظر فعليا في المدخلات. 0000 0001 وكلاهما جسديا في. المجلس التشريعي الفلسطيني المقبل تنفيذ البرنامج. بدءا من أعلى اليسار ، ومدخلات 0000 صحيح ولذلك يجب تعيين 0500. القادم يذهب إلى التالي درجة ومنذ 0001 مساهمة صحيحا فإنه يجب إعادة تعيين 0500. وكان آخر ما قال انها لإعادة 0500. ولذلك على الجزء الأخير من تفحص عندما التحديثات النواتج انها ستبقي 0500 قبالة. (أي إعادة تعيين 0500).
أفضل يجعل الشعور الآن ، أليس كذلك؟



ليست هناك تعليقات:
إرسال تعليق