Jump to content

Carlos Quaglio

Members
  • Posts

    4
  • Joined

  • Last visited

Posts posted by Carlos Quaglio

  1. 15 minutes ago, Joe Tauser said:

    Flex and I are both known to snap at people for asking for "example code".  There's a fine line between "point me in the right direction" and "do it for me so I can implement it and call it my own to my boss".  It's an old programmer's attitude that's acquired, like the taste for Scotch.

    Anyway, what you need to become familiar with is the concept of implied decimal places.  You can do amazing things with integers but you need to track your powers of 10 and know in your calculations that a number is 10 or 100 times bigger to "imply" 0.0 or 0.00 precision.

    When you're doing your calculations with integers, keep in mind that the maximum value for an MI is 2^15 or 32767.  For this reason I do most of my cranking in ML's and then extract the final answer to an MI.  Also, remember that when you multiply or divide your power of 10 adds or subtracts.

    The best way to learn this for yourself is to experiment with the numbers on your calculator with whole numbers only.  Then just write PLC code to match.

    We're much more friendly and tend to help when someone bangs on something and then posts their code.

    Joe T. 

    Joe thanks for the explanation.
    My intention was not to ask someone to do the routine for me.
    I believe that with your explanation I will be able to simulate something that meets my need.
    Thank you.
  2. 1 hour ago, Flex727 said:

    You need someone to show you how to multiply by 100? Keep in mind that this forum is staffed by volunteers, not Unitronics employees for the most part. We have day jobs and help out here when available - we cannot write your program for you. I recommend that you make your best attempt and then post your results here with specific questions if you can't get it to work. Someone here will then help guide you.

    Sorry @ Flex 727, if my question made you so furious ...
    It is according to your explanation I did not understand what value should I multiply by 100 ... only that ...
  3.  

    Good afternoon!
    
    We are running an application to control an oven with recipe, ramp and landing, using a V430-J-RA22.
    The customer has a table where he puts the values of initial temperature, final temperature and time to leave the initial temperature and reach the final temperature.
    
    To reach the value of how much the temperature setpoint should be increased, we use the following equation:
    
    Final Temp - Start Temp / Time
    Ex: 250-120/90 = 1.44 ° C per minute -> that is, the setpoint must be increased by this value every minute
    
    In this way, we take this value and store it in a memory to insert in the PID control.
    However, this only accepts whole numbers (MI), but for decimal places after the comma we would have to use one (MF).
    
    Is there anything we can do or is this a limitation of the software?
×
×
  • Create New...