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

  Рет қаралды 19,461

Tim Wilborne

2 жыл бұрын

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/

Пікірлер: 37
@disun4152
@disun4152 2 жыл бұрын
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 2 жыл бұрын
"Elipsis" Tim, The dot dot dot had me laughing!
@TimWilborne
@TimWilborne 2 жыл бұрын
No one knows what that is but I say the dot dot dot and they go right to it.
@jeffreybrandt786
@jeffreybrandt786 2 жыл бұрын
"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.
@pcupan
@pcupan 8 ай бұрын
Absolutely correct in waiting a while before trying to learn this
@TimWilborne
@TimWilborne 8 ай бұрын
👍
@RR31982
@RR31982 2 жыл бұрын
Thank you for the info
@TimWilborne
@TimWilborne 2 жыл бұрын
You are welcome!
@FernandoSilva-jq8dr
@FernandoSilva-jq8dr 2 жыл бұрын
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 жыл бұрын
No you would need to roll your own with a sample rate timer and an ADD instruction.
@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 Жыл бұрын
That isn't a bad suggestion, thanks
@seeigecannon
@seeigecannon 2 жыл бұрын
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.
@suriyat8773
@suriyat8773 8 ай бұрын
Thank you
@TimWilborne
@TimWilborne 8 ай бұрын
You're welcome
@incikmuzak
@incikmuzak Жыл бұрын
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 Жыл бұрын
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 KZbin comment. Stay tuned.
@DSNCB919
@DSNCB919 7 ай бұрын
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 7 ай бұрын
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 Жыл бұрын
How would you read a bit value of a DINT without using a .constant no.?
@TimWilborne
@TimWilborne Жыл бұрын
I'm not following you. I don't know what a .constant.no. is
@ipswich84
@ipswich84 Жыл бұрын
@@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 Жыл бұрын
@@ipswich84 Yes, for example if you create two dints, mydint and Index, then you can address mydint.[Index]
@emilianolpz
@emilianolpz Жыл бұрын
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 Жыл бұрын
I'm not sure I'm following you. Module defined tags have a pre-defined structure. I don't think you can edit them.
@electrician240
@electrician240 6 ай бұрын
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 6 ай бұрын
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 6 ай бұрын
@@TimWilborne thank you for the info. I love all the help you give everyone!
@TimWilborne
@TimWilborne 6 ай бұрын
You are welcome!
@kevinburt3075
@kevinburt3075 11 ай бұрын
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 11 ай бұрын
No, in order to make changes to a version 11 program, you must use RsLogix 5000 version 11.
@kevinburt3075
@kevinburt3075 11 ай бұрын
@@TimWilborne thank you can you still get the old versions ?
@TimWilborne
@TimWilborne 11 ай бұрын
You need the legacy option in your support and I believe you may have to contact them for 11.
@kevinburt3075
@kevinburt3075 11 ай бұрын
@@TimWilborne thank you for your response I will speak to the support team.
@rosemartinez4316
@rosemartinez4316 4 ай бұрын
how to convert REAL to Int?
@TimWilborne
@TimWilborne 4 ай бұрын
In Studio 5000, you simply need a MOV instruction but notice the "rounding".
Smart Sigma Kid #funny #sigma #comedy
00:25
CRAZY GREAPA
Рет қаралды 35 МЛН
ПРОВЕРИЛ АРБУЗЫ #shorts
00:34
Паша Осадчий
Рет қаралды 5 МЛН
تجربة أغرب توصيلة شحن ضد القطع تماما
0:56
صدام العزي
Рет қаралды 56 МЛН
Todos os modelos de smartphone
0:20
Spider Slack
Рет қаралды 55 МЛН
Зачем ЭТО электрику? #секрет #прибор #энерголикбез
0:56
Александр Мальков
Рет қаралды 614 М.
КРУТОЙ ТЕЛЕФОН
0:16
KINO KAIF
Рет қаралды 6 МЛН
Отдых для геймера? 😮‍💨 Hiper Engine B50
1:00
Вэйми
Рет қаралды 1,2 МЛН