Jerryvd3

Tracking Containers

6 posts in this topic

I am using sensors to track container data down a line. I use am using mov instructions but every so often the data isn't deleted as the container moves past the sensor (location of this changes each time) Below is the only logic that effects those memory bits.

Am I missing something obvious? Any help would be greatly appreciated.

logic.PNG

Share this post


Link to post
Share on other sites

I assume you mean D4113 on this instance. Without knowing the machine and rest of the program it's hard to say but my first thought is the input is getting triggered again too soon or possibly not releasing. You could make a condition to detect this and latch a bit if it happens - If the timer isn't finished and the input is triggered again latch a bit.

Share this post


Link to post
Share on other sites

If I am understanding you mean the input as in TS14 is not releasing or retriggering during the timer? I have tried this and it seems to be functioning correctly. I have seen the logic once and T0512 was on but the "@mov"s instruction did not complete. 

However the sensor (TS14) must have cycled because the only way to get data there (and continue the chain of data) is for that sensor to see the containers, and then when it doesn't start the timer.

Apologies if I am misunderstanding what you meant.

Share this post


Link to post
Share on other sites

first things first you should use PULS contacts diff up or diff down if you want to move data , you do not want to keep moving data every program cycle you want it 1 time. picture gives you a a simple idea of how you do that right click a contact and make it a 1 time cycle puls with dif up or diff down.

Second a move fuction does NOT move your data, it makes a copy of your data and does not erase the data in the original adress. So after you move the data. The data will still be there in the original location so you need to erase the memory adres after you move it. This might be why you have ghost data. So you copy your data and after that you move 0 to the previeus adress.

if you move stuff around sometimes sensors flikker on/off  . for data you should take account for that in your program, like with a off delay timer or with a set/reset or keep where you only release  status changes when movement is wanted to the next track and the item hits the next position sensor only then data status can be changed .. if there is room for that in your system. else i would use a off delay timer. and put in backup timmer that if movement is wanted but does not complete in the desired time . you stop the system and ask for assistance.

All this moving can be done automaticly by the way,  with the WSFT function if your PLC supports it . WSFT is a sliding register you give your source, first destiantion and the last destination memory adress in and with every true puls it will shift all the words to the next memory adres. For you it saves a lot of code 

good luck 

 

 

diffup.jpg

Edited by mike_cheesehead

Share this post


Link to post
Share on other sites

The WSFT instruction intrigues me. I will look more into this and give it a try. Thank you!

Share this post


Link to post
Share on other sites
On 5/23/2023 at 0:37 PM, Jerryvd3 said:

The WSFT instruction intrigues me. I will look more into this and give it a try. Thank you!

Regardless of the method you use to shift the data, you may still have the issue that is being mentioned by the other posters. Possibly a 'double shift'. As already mentioned, you could latch it in then reset it after some time to prevent chatter. If that's the case.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now