Jump to content
    • Our Community
      • Come on in!
    • News and Announcements
      • UniLogic 2021-- UniCloud IIoT Cloud Platform, EtherCAT & more!
      • VisiLogic:9.8.64 - Link to mobile app, Ladder: 2x the Space!
      • New!!! ***** U90 Ladder*****
    • UniStream HMI + PLC Programmable Controllers & UniLogic Software
      • UniStream: Hardware
      • UniLogic Software
      • UniLogic UDFBs
      • Industry 4.0, IioT, MQTT, OPC UA
    • Vision, Samba, Jazz and M90 PLC + HMIs & Software
      • Vision & Samba PLC + HMI Controllers & VisiLogic Software
      • Jazz, M91 PLCs and U90Ladder
    • Motion! Servo Drives, Motors, Actuators, & VFDs by Unitronics
      • Motion: Unitronics Servo Drives, Motors, Actuators, VFDs--by Unitronics
    • UniCloud: the end-to-end IIoT Platform for Unitronics Controllers
      • Everything UniCloud!
    • Software Utilities
      • SD Card Suite
      • Remote Operator
      • Remote Access
      • DataXport and DataXls
      • UniDownloader
      • UniOPC
      • UniDDE
    • Utilities for .net and Visual Studio
      • Unitronics PCOM Protocol
      • COM Object ActiveX .dll
      • .NET driver
    • Project Design
      • ...I have a project...what hardware do I need?
    • User Application Stories
      • Just finished a great project?
    • Tips and Tricks
      • Best Programming Practices
      • Tips and Tricks
    • Job Board
      • Projects seeking Programmers
      • Programmers seeking Projects
    • General Discussion
      • We're Listening...
      • The Lounge
    • News and Announcements Copy
  • Member Statistics

    Total Members
    Most Online
    Newest Member
  • Topics

  • Who's Online (See full list)

  • Posts

    • This is a concept newer programmers frequently have trouble with so I'm diving into it. I almost never use MF registers in PLC calculations because there aren't a lot of available functions that use them and, as you've determined, they're a royal pain to display in the format you want.  The only time I've used them is when calculations such as SIN and COS are needed because angles are involved. Implied decimals are a "sleight-of-hand" programming method going back decades in PLC programming.  It requires that you really understand powers of 10 and keep track of them when you multiply and divide. ML registers are your friend here, as they can hold many more digits than MIs.  As Flex says, you as the programmer have to keep track of what the value is in terms of its exponent. You didn't upload your program so we can really see what you're doing (please do upload it) so I'll take a guess based on your comments regarding inHg and Bar. This is much easier if you have your PLC in front of you so you can watch the numbers in action.  It typically starts at the analog input itself - let's say you have a transducer that produces a 10V signal at 29.92 inHG, which is a count of 16384 on a universal analog input.  You would set up your linear block like this: So the scaled output is the value x 10^-2.   The value is implied with two decimals, or  29.92. The formula to get bars is inHg x 0.034 or 34 x 10^-3.  You have go back and remember your algebra here - when you multiply two numbers you add the exponents to get the answer. So at full scale, your calculator would give 29.92 x 0.034 = 1.0173.   You're thinking the PLC is a calculator.  Stop thinking this way.  A typical PLC is stupid when it comes to math - you have to hold it's little hand and do everything from an integer point of view. Let's do this in integer land and multiply 2992 x 34.  You're the one in charge and what you're really doing is 2992 x 10^-2  X  34 x 10^-3.  Adding the exponents because we're multiplying tells us the answer will be some number x 10^-5. You'll see here why I used an ML in the output of the MUL block - it would overrun an MI. The result is 101728 x 10^-5, or 1.01728.  Just like the calculator!  Wow! If you want to reduce the digit count for display on the HMI or further calculations just divide by 1000:   You'll notice this type of calculation doesn't round - it just chops.  I prefer to round the value, so you need to use what's left as the remainder to make a decision.  Fortunately, Unitronics provides this value in SL 4: So we do one last operation to fix the value, comparing the remainder to 1/2  (500 in this case) and deciding whether to "round up".  Net 3 becomes: Or, 1.02 bar.  Easy to put on the HMI and use in other compare blocks.   Joe T.          
    • Thanks, Aus. In table do not present my favorit 9.8.65, no changes from 64, or changes is only in Visilogic?
    • HVAC, Much of my work is HVAC.  Looking at your graph, as an aside I just want to tell you that I don't  use PID in many HVAC situations.  What I have found is that items being controlled are often asked to do far more movement, more often, and as a result wear out far quicker.   I once had quality Belimos go in only 18 monthsish due to constant excessive juggling by the system which had been changed over to PID (at customer's request as they had heard how fantastic it was) and autotuned during routine actuator renewal.  The old ones were fine after many years of service, but replacement was due.  On replacing the newly failing units, the control was changed back to my non-PID and life went back to normal.  (As I knew it would, but I didn't rub it in their faces too much!) Such large changes in a control/valve/etc always also have detrimental flow-on effects throughout a system, in my example hot water.  Large thermal changes in piping, gas furnace cranking up harder more often but without much stability equalled higher consumption and stresses, etc. The list is endless.  So bear in mind it's not only the controlled thing that is wearing out faster, it's everything in the system.  If I ever see an actuator/valve doing large movements I almost always find it is being controlled by a PID system. The trick I use with my non-PID methods is reading temps to .01°C and clever algorithms.  Much off the shelf HVAC stuff only reads to 0.1°.  No doubt many people here will disagree with what I am saying, citing that it needs better tuning, but it is again a case of empirical data and boots on the site floor Vs theoretical benefits.  Tuning only works on conditions it encounters at the time it is being done.   By it's very nature HVAC is not a "production process". cheers, Aus
    • Ask nicely and the gurus will deliver. Attached is the xlsx that arrive courtesy of Cara and the Creators. It is a much better listing and is a "Must Have" for everyone here. I pondered printing it as a pdf, but decided to leave it as the provided Excel (with some details stripped out), so that people can manipulate listings themselves if needed.  You might have to do some security changes on the file to do so. Thanks again to Cara and the Creators.  🙃 cheers, Aus VisiLogic_to_OS.xlsx
    • U90 is also affected under Windows 10 Enterprise 20H2. KB5001330, on OS build 9042.928
  • Blog Entries

  • Create New...