TIA Portal #16: Shift and Rotate in Tia Portal | Bottle filling using shift register
HTML-код
- Опубликовано: 25 июл 2024
- In this video you will learn the basics of shift and rotate operations in Tia Portal and how to use them in a program. In the end we have created a project using shift register to track bottles and fill them acording to the size.
=============================
⌚Timestamps:
00:00 - Intro
00:35- what is shift to right and left
01:32 - Rotate to right and left
02:00 - Shift and rotate in Tia Portal
05:45 - Shift and rotate of a signed value
07:30 - Bottle filling using shift register in Tia Portal
=============================
It would be nice if you add more complex examples like this one sir thanks
Sure. I just need some time to finish the videos for basic level then we will have advanced videos.
thanks sir making video on asked topic..
You're very welcome.
hello, good video
how to use two shif register DWord, in cascate mode?
i loved your explanation better than others video. in this video, based on byte that saved on memory byte ShiftRegsterFilling there are BigBottle as 1 and SmallBottle as 0, how can you make these ShiftRegsterFilling values to affect those tags(tag 4,5,6....11)? did you using array?
Hi.
here --> 10:32 you can find the explanation how big and small bottles are saved at register. I didn't use array (You can use it and it can be also another solution) I wanted to learn toghether basics of shift so I used it with Add function to shift the values 0 and 1 and saved them according to the bottles.
@@industrial_automation of course i know, your explanation was very well that you have combine ADD & SHIFT instruction to saved Big & Small Bottle, but i still dont get it How can register value affecting tag 4, 5, 6, 7...11 i minute 13:47 until 14:23, where those tags (4...11) come from? and function of these tags are to activate nazzel that would fill the bottle based on it's size, i just confused about how can you manipulate tag 4 - 11 with register value. loved your explanation & it's important to me, thank you sir
@@shinypotato7204 You're welcome :)
where those tags (4...11) come from? ---> Consider the adresses of these Tags. They are m6.0 to m6.7. (Memory bit 0 to 7 of byte 6)
What is the address of our shift register? It's MB6. It means memory byte 6, consisting of bit 0 ...7
Now what are these bits 0,1,2, ...7? They are status of bottles. We have saved 1 for big and 0 for small bottles inside these bits.
in other word I have used Tag " Shift register filling" in the network 7 with the address of MB6 (Output of ADD function) and then I have parse the byte to bits (MByte6 to M6.0 ..M6.7) and used for each bit a tag (4 .... 11)
When we have big bottle, the bit will be 1, so normally open contact will activate long filling and with small one and bit 0 normally close will activate short filling.
Just try to understand the byte 6 and its bits.
@@industrial_automation oh my god, thank you so much, Now i know that MByte6 can parse value to M6,.0 ... M6.7. thank you so much sir, it's totally clear explanation, I just found out about this:(
Can you tell again why in network 7 you add 1 to msb for big bottle I can't get it thanks
This network is to detect the big bottles (Using edge detection at the left side of the network). In our program big bottle is known as 1 and small one as 0. So I used this network to add a 1 to the left of our shift register, when a big bottle is detected. If you don't use this network it will be just 0 added with each bottle.
Can you please upload this program or send it to me so i could study it , i was looking for this program for 6 months , please
Dear Ammar I showed in the video everything and all the functions of the program and explained how they work. You need just to create a new project in Tia Portal and copy them.