Tracey (Customer) asked a question.

Do More Designer, Trying to read a 0-10 volt signal and compare to a value in order to interrupt an output

I have a BRX BX-DM1E-M-D PLC with Multiple DMIO unit collecting field IO. I have many discrete outputs and everything is working fantastic. I am new to the software and have been out of the ladder programming game for 20yrs. I am trying to add some logic that will read a 0-10v signal from a string pot that will compare that voltage to an assigned value on a 8 position switch. In other words. lets say that position 4 will be defined somewhere as 3.14 v because I know this voltage corresponds to a particular length I am trying to achieve. The other positions will have different voltages assigned a that will indicate different lengths on the switch. I would like to compare the input from the string pot to the voltage value selected by the switch. When that selected value is equal to the input of the string pot then I want to interrupt the output that drives the forward motion solenoid on our machine. I would like it to be as simple as possible because I will have to be able to explain this to many maintenance guys here that are not so ladder savvy. I know somewhere I have to define the positions a voltage but I don't know where. Then how do i compare and stop this output at the assigned voltage and allow for encoder drift so the output doesn't flicker back on.


  • Durallymax (Customer)

    The snip below may get you started, need to scale input then setup values that correspond to switch positions and copy that into a data real for comparison later. As for the drift, there's a number of ways to accommodate that, but if this machine just needs to shut off when the target is reached and be reset by something else, its as simple as sealing the interrupt until the reset condition is made. If it needs to be more dynamic, you could do some math to establish a range. My Do-More knowledge is lacking, they may have a better way to accommodate that, browse Garry's videos for some ideas.

     

    BRX_Analog 

    Expand Post
    • Tracey (Customer)

      I like this so far. So I take it you are using a switch that sends a variable voltage at a given position to the analog module as a selector instead of a switch that will have open/closed contacts based on its position? Or am I reading this wrong?

      • Tracey (Customer)

        Does this look similar to what you are doing above? If so do I do a select switch psoition for each 1 thru 8 and do a cop data that reflects the desired length and put them in the same preset (R1) location so that single compare triggers the same interrupt?

        Logic check

        Expand Post
      • Durallymax (Customer)

        No that was written with the idea of a selector with 8 discrete positions. In that example position 4 copies the value of 3.14 into the preset for comparison. You'd have one of those blocks for every position and type your desired scaled voltage values into each.

        There's likely more eloquent ways to do it, but that should be easy for diagnostics.

         

        Expand Post
  • Tracey (Customer)

    I appreciate both responses. They have helped greatly.