Jump to content

cantcliff

MVP 2015
  • Posts

    146
  • Joined

  • Last visited

  • Days Won

    4

Posts posted by cantcliff

  1. More of a personal preference really. There are advantages and disadvantages to both. 

     

    Time probably isn't an issue as the time to run the FB is probably far faster than you think it is.  If you want to check your scan time put SI 0 (scan time with a 1ms resolution) on the screen you're using and see what the effect is on scan time by reading each pass or not reading each pass.

  2. My first instinct is that your row reference is wrong. 

     

    Are you taking into account row[0] is your first row? 

    Are you absolutely sure that your increment value is on the correct row?

     

    Finally, What is stopping you from counting too fast and causing a logic error? That run appears to run every scan.  IF SB399 is on, Check SI 26 for a failure code, if you have 27 or 29 then you have a read, or read line failure respectively.  Reference: Pg 82 (pdf pg 89) of the Visilogic programming manual.

  3. Dealing with multiple clocks and drifts is always an issue.

     

    When bringing multiple systems together for monitoring I highly suggest an intermediary application to request data from all of them simultaneously then store the results in a database.

     

    The only other option is to have a sync setup of some sort to update the time between all of them continuously.

  4. A great example is a home project I'm working on using an SSR to run a fridge compressor for temperature control in a home brewing setup.

     

    The compressor can't work on a PWM power cycle as cycling it on and off frequently will destroy the compressor motor, and it won't allow the system to get into a cool state where it would function correctly.

     

    Essentially it requires a long On-Off cycle time to protect the hardware components, but still needs the advantages of PID control (yeast can get very particular about large temperature fluctuations, +-1 degree can drastically alter the flavor of the final beer.)

     

    PWM is useful if the equipment can function analogous to an analog signal but doesn't work well if there are distinct power cycle limitations that can ruin the hardware with the extremely short power cycles.

    • Upvote 1
  5. Great question - and the answer I expected. On that same subject, subroutines run in the order they are called in the Main Routine. Where does the "While Displayed" routine fall in that order - at the beginning of the Main Routine, the end, or somewhere in the middle?

     

    It was the answer I was hoping for, as I had already planned the logic around that but wanted to make sure before anything with live.

     

    I'd love to see the answer to your question as it may lead some insight into some problems a  co-worker is having as well.

  6. Every class I've attended on PLC programming started out with the assumption the left power rail is always powered because PLCs are a digital version of hardware relay programming where you would always have that line powered.  Even working with some of the Allen Bradley controllers I've seen the same issue you're talking about.

     

    Power always flows left to right through the rung, you use relays to control whether that power completes the circuit or not.  You're thinking more like a software programming that a function call doesn't do anything within the function until it's called which isn't always handled the same way depending on the PLC manufacturer.

     

    Keep in mind subroutines are more for making the ladder program look better and help with the maintainability of the program but they are not needed.  There is nothing you can do with a subroutine that could not be put in the main program ladder. 

  7. You won't be able to program the Unitronics controllers using I-Trilogi as it's specific to a different brand of PLCs, you need Visilogic to start.

     

    At the hardware level you're going to need some sort of optical color sensor if you want to differentiate the parts by color.

     

    Logic wise, you're probably gets a bit more complicated.  There are many ways to approach dealing with a conveyor of parts, both sorting and counting.

  8. Another suggestion mentioned in a related topic was to use one PLC dedicated to the processing, with some form of communication to a second PLC that handles the display.  Don't transfer as much information (if the display itself isn't critical).

     

    Or as Flex727 mentioned, look into UniStream.

     

    Unfortunately, HMI's are horribly intensive in terms of processing power required.  You don't realize it on computers because everything is accelerated through additional processors but PLCs and PACs don't normally have that option.

  9. Are you using the linearization code block?  If not, it may simplify things for you.  Referenced from page 120 of the Ladder Programming manual from Visilogic

     

    What you need to know for it:

     

    Bit rating of your analog in, 12 bit versus 10 bit, you MUST use the correct bit rating reference or your linearized value will come out wrong.

     

    10 bit Use:

    X - Analog input MI

    X1 - 204

    X2 - 1023

    Y1 - zero point you expect at 4ma

    Y2 - Max value you expect at 20ma

    Y - Linearized Value Memory Integer or Long

     

    12 bit Use:

    X - Analog input MI

    X1 - 819

    X2 - 4095

    Y1 - zero point you expect at 4ma

    Y2 - Max value you expect at 20ma

    Y - Linearized value Memory Integer or Long

     

    Example:

    0-150 pressure sensor on a 12bit sensor with two decimal places

     

    X - MI1

    X1 - 819

    X2 - 4095

    Y1 - 0

    Y2 - 15000  (150.00 represented as an integer)

    Y - MI2

×
×
  • Create New...