You'll need to create an array, and shift bit, byte, word, or dword in array (what ever your shiftreg needs to transfer) with blockmove- command. Or simply You just create block, where you count every 10th bit of an encoder pulse, and create one shft reg pulse with every 10th pulse. 👍
@@Rajat-h6s I don't quite understand what you mean? The accuracy is determined by the encoder, not the program you use to process the information provided by the encoder. The encoder can give, for example, 1024 pulses per revolution. The distance the conveyor moves in one revolution of the encoder, is divided by amount of encoder pulses per rev. Then You can define in the program what kind of pulse intervals your shiftregister moves in the program. Example: If Your encoder is 1024 pulses/rev, and gear ratio is 1:1 (encoder:belt), You will get around 1024 pulses per, let's say 100mm of conveyor belt movement. You need to divide 1024:100mm and You will get result how many pulses You have per millimeter (10,24pulses/mm). Then you can make shiftregister, which is counting every 10th pulse, and you will get every mm counted. Or You create shiftreg, which is counting every 102th pulses, and you will get 10mm accuracy for the belt. Then again, If you need accuracy, You need couple of shift registers. First one is for product itself: that shiftreg is controlling order of the products on the belt. That shift register is written to "1" only, when product is detected (by a photocell etc.). And that "1" state is moving in shiftreg, let's say in every product length (You'll need to define how many pulses you'll get from encoder/product length by dividing product length with amount of pulses you'll get when product moves on it's own length, and that is one shift register pulse on "Coarse shift register"). Second shift register (Fine shiftreg) is for accuracy: On certain point where You need precision for doing something for the product, You need to trigger another shift register to start counting (for example to push the product in a precise point). There you'll need to determine length of the product vs. encoder signal, or belt position vs. encoder signal and those should be then compared to pushing point vs. encoder signal to have an accurate pushing point, IF product is detected at the pushing point by another photocell.
Can you export to zip or s7p. I don't have Tia Portal V16. But I do have WinSPS-S7. If that is not possible. could you post a pdf file of your code. Can you share contact information?
Shifting bits is not a familiar concept for me. Could you not instead start a counter (when the box blocks the laser) that is counting up on each encoder pulse. The number of counts is the distance from the laser to the box pusher. Because every encoder pulse is like 1cm of conveyor travel and measuring distance is all you really want. Or is shifting bits on a 64bit word somehow better? To me it is more intuitive if the statement is "IF DISTANCE >= 14 THEN PUSH BOX"
Hey Taavi. I was wondering on this concept (Timers over Shift registers) once as well and in my opinion it's much easier while you have 1 product going on the line. In this example when he is stopping conveyor it would work, but If we look at the sorting station and take the rule of conveyors working all the time you gonna have few products which you have to control with seperate timers. Then you have to predict how many possible products u gonna have on conveyor and when new product takes which timer. When u cant really tell how many of them gonna be there shift register is beating timers comepletly.
On this kind of concept, You'll need to create individual counter for every product, which is on the belt. But that concept works also. If You use only one counter, You can't let more than one product at time on the conveyor. That's why bit shifting is good tool for tracking and locating.
Hello friend. Good job 👍 Can you share file from Factory IO (file with extension .factoryio) withe this scene? In drive google is only file from TIA Portal. Thanks :)
Hello Andy!
I'm really, really thankful to see this video and also download the code you use.
Congrats for this excellent video.
Thank You very much!
Very nice video. I have a question. If you have a very long conveyer belt and a lword in shiftregister is not enough. What will you do.?
You'll need to create an array, and shift bit, byte, word, or dword in array (what ever your shiftreg needs to transfer) with blockmove- command. Or simply You just create block, where you count every 10th bit of an encoder pulse, and create one shft reg pulse with every 10th pulse. 👍
@@jsmekatronic2975 but what if we need more accuracy
@@Rajat-h6s
I don't quite understand what you mean? The accuracy is determined by the encoder, not the program you use to process the information provided by the encoder.
The encoder can give, for example, 1024 pulses per revolution. The distance the conveyor moves in one revolution of the encoder, is divided by amount of encoder pulses per rev.
Then You can define in the program what kind of pulse intervals your shiftregister moves in the program.
Example: If Your encoder is 1024 pulses/rev, and gear ratio is 1:1 (encoder:belt), You will get around 1024 pulses per, let's say 100mm of conveyor belt movement. You need to divide 1024:100mm and You will get result how many pulses You have per millimeter (10,24pulses/mm). Then you can make shiftregister, which is counting every 10th pulse, and you will get every mm counted. Or You create shiftreg, which is counting every 102th pulses, and you will get 10mm accuracy for the belt.
Then again, If you need accuracy, You need couple of shift registers. First one is for product itself: that shiftreg is controlling order of the products on the belt. That shift register is written to "1" only, when product is detected (by a photocell etc.). And that "1" state is moving in shiftreg, let's say in every product length (You'll need to define how many pulses you'll get from encoder/product length by dividing product length with amount of pulses you'll get when product moves on it's own length, and that is one shift register pulse on "Coarse shift register").
Second shift register (Fine shiftreg) is for accuracy: On certain point where You need precision for doing something for the product, You need to trigger another shift register to start counting (for example to push the product in a precise point). There you'll need to determine length of the product vs. encoder signal, or belt position vs. encoder signal and those should be then compared to pushing point vs. encoder signal to have an accurate pushing point, IF product is detected at the pushing point by another photocell.
thank to this tutorial sir andy
Why did your program all with OBs?
Why did not you use FC or FB?
Can you export to zip or s7p. I don't have Tia Portal V16. But I do have WinSPS-S7. If that is not possible. could you post a pdf file of your code. Can you share contact information?
Nice sir ..next tut sir box sorting according height advance..
How did you calculate bit 15 and bit 30 for pusher and pick and place
sir can u show how to download and apply to the TIA Portal an Factory IO. Also, compile and start simulation process.
I downloaded your project, but there's no output modules although you specify digital outputs... how come?
drive.google.com/drive/folders/1KVtJhTfltbQH7SUUGnvlxy_9hC79hEG6?usp=sharing
Thank you so much
i cant find the LWORD option in SHL block
may I how to you installed factory io template for tia V16
Is this EasyPLC?
I can`t get the plc code of tia portal.plz help
drive.google.com/drive/folders/1KVtJhTfltbQH7SUUGnvlxy_9hC79hEG6?usp=sharing
Even when using one phase pulse edge is too much for my plc to keep up
Please help😔
Thanks!
Great work sir!
What is the enconder's resolution? thanks!
Shifting bits is not a familiar concept for me. Could you not instead start a counter (when the box blocks the laser) that is counting up on each encoder pulse. The number of counts is the distance from the laser to the box pusher. Because every encoder pulse is like 1cm of conveyor travel and measuring distance is all you really want. Or is shifting bits on a 64bit word somehow better? To me it is more intuitive if the statement is "IF DISTANCE >= 14 THEN PUSH BOX"
Hey Taavi. I was wondering on this concept (Timers over Shift registers) once as well and in my opinion it's much easier while you have 1 product going on the line. In this example when he is stopping conveyor it would work, but If we look at the sorting station and take the rule of conveyors working all the time you gonna have few products which you have to control with seperate timers. Then you have to predict how many possible products u gonna have on conveyor and when new product takes which timer. When u cant really tell how many of them gonna be there shift register is beating timers comepletly.
On this kind of concept, You'll need to create individual counter for every product, which is on the belt. But that concept works also. If You use only one counter, You can't let more than one product at time on the conveyor. That's why bit shifting is good tool for tracking and locating.
Hello friend. Good job 👍 Can you share file from Factory IO (file with extension .factoryio) withe this scene? In drive google is only file from TIA Portal. Thanks :)
sir kindly help me to connect the tia potal with factory io
pls share your scene file
Can you share scene factory io
drive.google.com/drive/folders/1KVtJhTfltbQH7SUUGnvlxy_9hC79hEG6?usp=sharing
@@andyhernandez5108 No factory io :(
hi sir, can you give me this factory io, please !!! Have a good day sir
Share your scene please...
drive.google.com/drive/folders/1KVtJhTfltbQH7SUUGnvlxy_9hC79hEG6?usp=sharing