You are not registered yet. Please click here to register!

plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
Try our online PLC Simulator- FREE.  Click here now to try it.

New Here? Please read this important info!!!

Go Back - Interactive Q & A > - Interactive Q & A > LIVE PLC Questions And Answers

Thread Tools Display Modes
Old February 27th, 2021, 08:05 PM   #16

kalabdel is offline
Join Date: Feb 2015
Location: Ontario
Posts: 720
Originally Posted by Peter Nachtwey View Post
      if armed then
            if counts >= trigger_counts then
                  trigger := true;
                  armed := false
           trigger := false;
           if count < trigger_counts then
                 armed := true;
This method makes sure the trigger is set only once per revolution. I don't see the need for check for counts over 100 when they are reset by the z pulse so the range of counts is 0-99.

Thanks Peter, I didn't realize the term was so common; I thought he had specific meaning (of course he may anyways).

I agree to both your point in the code snippets, specially testing for equal (:=) count is very likely to miss.
  Reply With Quote
Jump to Live PLC Question and Answer Forum


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Correctly utilizing encoder with PLC zblum LIVE PLC Questions And Answers 23 August 14th, 2017 01:44 PM
Incremental Rotary Encoder reading stability issue ... nilesh_1106 LIVE PLC Questions And Answers 6 February 24th, 2017 08:37 AM
Encoder signal to Fastech Servo Amp rguimond LIVE PLC Questions And Answers 4 January 31st, 2017 02:39 PM
PLC encoder sync question VSandhu LIVE PLC Questions And Answers 2 January 10th, 2011 06:22 PM
does the gear box affecting the positioning value???? common LIVE PLC Questions And Answers 3 July 6th, 2002 05:11 PM

All times are GMT -4. The time now is 10:12 AM.