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

Поделиться
HTML-код
  • Опубликовано: 3 янв 2025
  • НаукаНаука

Комментарии • 45

  • @disun4152
    @disun4152 2 года назад +6

    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.

    • @ardentdfender4116
      @ardentdfender4116 Месяц назад

      This is very good info and I’ve heard it before as it relates to efficient use of memory and efficient programming. Thanks!

  • @ardentdfender4116
    @ardentdfender4116 Месяц назад +1

    Excellent explanation! Other than Bool and Real which are easier to understand, it took me a long time, including now to fully understand the explanation of the other Rockwell Data Types. And you explained it quite excellent by showing and not just telling. There is only one thing you could have done better was in explaining the data types, give 1-2 real world example in a process where you would select for that exact Data Type such that the person listening with some process understanding could mentally grasp where that Data Type could be used. You’re a great teacher Tim!!! Also didn’t know DINT was default Data Type for Controllogix. For as long as I’ve looked at some the tabs for new tags, that has just never seemed obvious to me. But now I know.

    • @TimWilborne
      @TimWilborne  Месяц назад +1

      Very good point, similar to your array question, you are right. I should have put a few practical examples on to it. I'll put it on the list along side with the array.

  • @79brumley
    @79brumley 2 года назад +3

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

    • @TimWilborne
      @TimWilborne  2 года назад +3

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

  • @pcupan
    @pcupan Год назад +1

    Absolutely correct in waiting a while before trying to learn this

  • @ChadLeister
    @ChadLeister 4 месяца назад +1

    This is a great video do you have one for ccw

    • @TimWilborne
      @TimWilborne  4 месяца назад +1

      I think the principles would be the same in CCW.

  • @jeffreybrandt786
    @jeffreybrandt786 2 года назад +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.

  • @electrician240
    @electrician240 Год назад +2

    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  Год назад +2

      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 Год назад +1

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

    • @TimWilborne
      @TimWilborne  Год назад +1

      You are welcome!

  • @suriyat8773
    @suriyat8773 Год назад +1

    Thank you

  • @kevinburt3075
    @kevinburt3075 Год назад +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  Год назад +2

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

    • @kevinburt3075
      @kevinburt3075 Год назад +1

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

    • @TimWilborne
      @TimWilborne  Год назад +2

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

    • @kevinburt3075
      @kevinburt3075 Год назад +1

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

  • @RR31982
    @RR31982 2 года назад

    Thank you for the info

  • @DSNCB919
    @DSNCB919 Год назад +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  Год назад +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.

  • @ipswich84
    @ipswich84 Год назад +1

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

    • @TimWilborne
      @TimWilborne  Год назад +1

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

    • @ipswich84
      @ipswich84 Год назад +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  Год назад +2

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

  • @emilianolpz
    @emilianolpz 2 года назад +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  2 года назад +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.

  • @seeigecannon
    @seeigecannon 2 года назад +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  2 года назад

      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.

  • @incikmuzak
    @incikmuzak 2 года назад +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  2 года назад +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 RUclips comment. Stay tuned.

  • @FernandoSilva-jq8dr
    @FernandoSilva-jq8dr 2 года назад +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  2 года назад +2

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

  • @duckyman325
    @duckyman325 3 месяца назад +1

    my professor put this in week 2 just like you said. feel totally lost

    • @TimWilborne
      @TimWilborne  3 месяца назад +2

      See if this video helps you out
      ruclips.net/user/liveZiPO2J3ZBG8?feature=share

  • @electricaluserstech.1989
    @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......??

    • @TimWilborne
      @TimWilborne  Год назад +2

      That isn't a bad suggestion, thanks

    • @ardentdfender4116
      @ardentdfender4116 Месяц назад

      Bool is like ON or OFF for anything, which is like pushing the button to turn the bit ON or OFF. Real is like an Analog Field Value from an Instrument or Transmitter with the decimal value for accuracy, so that’s a Real data type. For SINT, INT, DINT Integer type data they are used to hold raw value data like timers, counters, things like throughput gallonage on a filter for example, pump maintenance service hours and things like that. But always better when Tim makes a video in explanation.

  • @rosemartinez4316
    @rosemartinez4316 10 месяцев назад +1

    how to convert REAL to Int?

    • @TimWilborne
      @TimWilborne  10 месяцев назад +2

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