Studio 5000 Data Types. BOOL, INT, DINT, and REAL?

Sdílet
Vložit
  • čas přidán 29. 03. 2022
  • Studio 5000 has various data types and this exercise will help you understand what they are for. You will create a BOOL, INT, DINT, and REAL numbers then understand what the limitations and advantages of each one are.
    Helping you become a better technician and passing out high fives
    Get the full details of this lesson at courses.twcontrols.com/
    Items used in this video:
    PLC Trainer twcontrols.com/plc-trainers
    The above links make these videos possible. Please use them!
    Support these videos while you advance your skills courses.twcontrols.com/
  • Věda a technologie

Komentáře • 37

  • @disun4152
    @disun4152 Před 2 lety +5

    Thank you Tim for another video. Controllogix is based on 32-bit memory application. Whatever have you defined in BOOL, INT or DINT, the PLC always assigns the same size of the memory (82 Characters for a tag name and some other definitions I cannot remember). You will not save any memory by defining a single BOOl, Integer unless you use the User-Defined Datatype (UDT) in the order like you can put 32 tags of bool in the UDT, that will only use one basic 4-byte unit . I know today because of big availability of CPU memory, some programmers do not care about the memory efficiency. But I am still thinking it is a good habit to organize the usage of memory of the PLCs. You will also see a lot pre-defined UDT either by Allen Bradley or by third-party manufactures. They are of good-organized memory assigned. I am not an Allen-Bradley expert but this is what I have learned so far. In rare case, when my company wanted to put more stuff in the PLC which is at margin of the memory, I had to clean up some memory like that, although it is a time-taking process.

  • @79brumley
    @79brumley Před 2 lety +3

    "Elipsis" Tim, The dot dot dot had me laughing!

    • @TimWilborne
      @TimWilborne  Před 2 lety +3

      No one knows what that is but I say the dot dot dot and they go right to it.

  • @pcupan
    @pcupan Před 9 měsíci +1

    Absolutely correct in waiting a while before trying to learn this

  • @jeffreybrandt786
    @jeffreybrandt786 Před 2 lety +1

    "Display Format" would be helpful, especially when you ARE interested in what the number "looks like" in binary, BCD or HEX. Otherwise a great and quick lesson.

  • @suriyat8773
    @suriyat8773 Před 8 měsíci +1

    Thank you

  • @RR31982
    @RR31982 Před 2 lety

    Thank you for the info

  • @FernandoSilva-jq8dr
    @FernandoSilva-jq8dr Před 2 lety +1

    Hi Tim, congratulations for the videos! I have a doubt: Is there a totalizer block in the CCW software? need to total the flow with a 4 to 20mA signal. Thank you very much

    • @TimWilborne
      @TimWilborne  Před 2 lety +2

      No you would need to roll your own with a sample rate timer and an ADD instruction.

  • @seeigecannon
    @seeigecannon Před 2 lety +1

    Question for you: Do you know why AB (and maybe other) PLCs don't support unsigned numbers? I came from a text programming background and using signed numbers to address arrays feels dirty to me. I did see that Studio 5000 as of a few versions ago supports unsigned numbers, but the L71 I am using still comes up with an error when I try using one.
    Keep up the good work. Looking forward to more content.

    • @TimWilborne
      @TimWilborne  Před 2 lety

      I suspect it's because using an unsigned integer feels dirty to me. The sign is an important feature to so many aspects of programming. There are far more times that you need the sign then you don't so they probably chose to only have one option to prevent confusion about which one should be selected.

  • @ipswich84
    @ipswich84 Před rokem +1

    How would you read a bit value of a DINT without using a .constant no.?

    • @TimWilborne
      @TimWilborne  Před rokem +1

      I'm not following you. I don't know what a .constant.no. is

    • @ipswich84
      @ipswich84 Před rokem +1

      @@TimWilborne hi Tim, as a DINT has the use of 0-31 bits, and after the name of the DINT variable you can use a bit, example: .number (0-31) therefore a constant number. Is it possible to use .[variable] like you can for an array?

    • @TimWilborne
      @TimWilborne  Před rokem +2

      @@ipswich84 Yes, for example if you create two dints, mydint and Index, then you can address mydint.[Index]

  • @incikmuzak
    @incikmuzak Před rokem +1

    Hi Tim, i watched your video on the modbus rtu client, and my modbus worked! Thanks a lot!
    My only issue now is that, plc is reading in signed int format, how can i convert it to float real?
    Thanks in advance.

    • @TimWilborne
      @TimWilborne  Před rokem +1

      Yes they can be a challenge. It's on the list of videos to make. Typically you'll have to move it to integers to go over modbus then back out to a real number. Then you have to deal with swapping words and swapping bites which is more than I can explain in a CZcams comment. Stay tuned.

  • @DSNCB919
    @DSNCB919 Před 8 měsíci +1

    Still trting to figure out of i can write specific bools to points on a DINT. For instance, if i have 8 seperate bools im triggering off a GSV but want to write these bools as 1 dint to another system i would want gsv 1-8 to be in the same dint at points 0-8?

    • @TimWilborne
      @TimWilborne  Před 8 měsíci +1

      I'm not sure I'm fully following your question...but let's say you were using a GSV and the destination called for a DINT, but you were only concerned with 0-7 and you wanted to use 8-31 for something else, you would make your GSV destination a temporary DINT, then use a MVM masked move to move only bits 0-7 to your final destination.

  • @electrician240
    @electrician240 Před 6 měsíci +1

    One thing I've been trying to figure out is when to use which data type. Besides using it for actual numbers , when would i use a word or double word or real?

    • @TimWilborne
      @TimWilborne  Před 6 měsíci +1

      Great question. When memory was tighter, I think it mattered more. But for the most part, if you type the tag into the instruction, the right click and select New, it will fill in the correct tag type...two exceptions come to mind. If you want a decimal, make it a REAL and if a particular programming example tells you to do otherwise...most notably most networking is SINT.

    • @electrician240
      @electrician240 Před 6 měsíci +1

      @@TimWilborne thank you for the info. I love all the help you give everyone!

    • @TimWilborne
      @TimWilborne  Před 6 měsíci +1

      You are welcome!

  • @electricaluserstech.1989

    Good information....If possible Could you please make a video of the data types examples, BOOL means push button and proximity switch then what about INT, DINT, SINT, REAL......??

  • @kevinburt3075
    @kevinburt3075 Před 11 měsíci +1

    Tim if you have a project in V11 can you download the file and make changes and upload the file using a later version of studio 5000 or do you need to use V11 thanks in advance of your answer.

    • @TimWilborne
      @TimWilborne  Před 11 měsíci +2

      No, in order to make changes to a version 11 program, you must use RsLogix 5000 version 11.

    • @kevinburt3075
      @kevinburt3075 Před 11 měsíci +1

      @@TimWilborne thank you can you still get the old versions ?

    • @TimWilborne
      @TimWilborne  Před 11 měsíci +2

      You need the legacy option in your support and I believe you may have to contact them for 11.

    • @kevinburt3075
      @kevinburt3075 Před 11 měsíci +1

      @@TimWilborne thank you for your response I will speak to the support team.

  • @emilianolpz
    @emilianolpz Před rokem +1

    Can you do a video of Module-defined data tags and how to add a tag to that module. I'm currently stuck and I know it's Doable cause I see where it's been done but I don't know how to do it

    • @TimWilborne
      @TimWilborne  Před rokem +1

      I'm not sure I'm following you. Module defined tags have a pre-defined structure. I don't think you can edit them.

  • @rosemartinez4316
    @rosemartinez4316 Před 5 měsíci +1

    how to convert REAL to Int?

    • @TimWilborne
      @TimWilborne  Před 5 měsíci +1

      In Studio 5000, you simply need a MOV instruction but notice the "rounding".