adccommunitymod (AutomationDirect) asked a question.

Quadrature Encoder With the BRX PLC question

Created Date: October 06,2017

Created By: WWorld

**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****

I am new to PLCs and have a small project I am working on. The encoder is used to measure wire as its passing, and stops/starts the next process when a predetermined number is equal to the encoder pulses. Currently the PLC I have is able to handle the quadrature pulse counts in the background, but the readings I get aren't 1,2,3,4,5,6... and so on. I end up getting 1, 12,23,45, and so on based on how fast the feed motor is going. If I slow down the machine to a pulse rate from the encoder of 4000-5000 per second I get closer to a 1,2,3,4,5.... count. But I need to be able to run this machine at faster rate. Will a BRX PLC allow me process encoder readings as they count and react to them sooner than 4000-5000 per second? Thanks


  • adccommunitymod (AutomationDirect)

    Created Date: October 06,2017

    Created by: WWorld

    I am new to PLCs and have a small project I am working on. The encoder is used to measure wire as its passing, and stops/starts the next process when a predetermined number is equal to the encoder pulses. Currently the PLC I have is able to handle the quadrature pulse counts in the background, but the readings I get aren't 1,2,3,4,5,6... and so on. I end up getting 1, 12,23,45, and so on based on how fast the feed motor is going. If I slow down the machine to a pulse rate from the encoder of 4000-5000 per second I get closer to a 1,2,3,4,5.... count. But I need to be able to run this machine at faster rate. Will a BRX PLC allow me process encoder readings as they count and react to them sooner than 4000-5000 per second?

    Thanks

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: October 06,2017

    Created by: BobO

    The quad input is capable of counting at 250Khz, but at that speed, input events (counts) are occurring at 4us...much, much faster than your PLC's scan time. If you are trying to perform an action at every count of a counter the PLC cannot keep up, and you are going to have to go a different direction. If you are trying to do something at a specific count (e.g. every 500 counts), BRX can probably do it, but you will need to use other high speed functions like match register interrupts or table driven outputs.

    Can you give us more info on what you are trying to do?

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: October 06,2017

    Created by: WWorld

    I need to be able to set a predetermined length into the machine and if the feed motor is at 5% speed or 30% speed get the same length wire cut. With the PLC I currently have I am not able to use if = command I am stuck using = or> than command and depending on the motor speed I get wire lengths that end up no where near what was predetermined.

    I know my encoder is either 125Khz or 250Khz so counting from it is not my issue. I am not able to monitor the encoder counter as its counts and react when it hits a certain number. I can only react to the PLC scans of encoder counter.

    A simple break down of the machine process:

    User Inputs desired length of wire

    User Inputs total number of pieces

    When the User presses the start button the PLC turns on a solenoid for the feed rollers

    When the wire reaches the desired length the feed rollers solenoid is turned off, 2 other solenoids turn on.

    When 2 proximity sensors are triggered the 2 solenoids turn off and if more pieces are needed the encoder count is reset to 0 and the process repeats.

    I will look into the match register interrupts this weekend and see if that will allow me to do what I need. The short BRX video I watch showed a fix number being set and my number changes based on the job. So I would need to see if I can set that number using a variable.

    Thanks

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: October 06,2017

    Created by: BobO

    Perfect. Either of the two things I suggested can do what you need. Take a look at the TDOPRESET instruction and Match Register interrupts. TDOPRESET can control an output to 1us accuracy. The interrupt is not quite that tight, but is good to 10 or 20us.

  • adccommunitymod (AutomationDirect)

    Created Date: October 10,2017

    Created by: GKiser

    WWorld there are tech training slides (PowerPoint) on our website that can give you a good overview of the TDOPRESET (Table Driven Output Preset) and Match Register interrupts.

    1. Goto http://www.hosteng.com

    2. In the left pane under Training Slides, click on Only BRX PLCs.

    The two pertaining:

    - HSIO - Table Driven Outputs (for TDOPRESET)

    - Interrupts (for Match Register interrupts)

    Expand Post