Eric,That's the approach I would use. I would also add a one-shot to the drop table pulse. Something like this...
-Eric
The problem with trying to get one pulse per paper is the conveyors are not mechanically linked. I am sure on stops and starts the belt conv. will lose or gain a pulse or so before the paper drops from the gripper. I could deal with that if we moved the paper sensor down to the belt conveyor but then we are back to the troublesome counting of flat paper edges as compared to a very accurate gripper count.The problem that I see with the setup would be getting the two signals on at the same time, every time. What is the signal duration of both the paper present sensor and the pulse counter? If the "paper present" sensor duration is shorter then time between pulses then you might always have a count issue. If I remember correctly the shift happens on the first scan following a false to true transition. I am not at my PC with logix right now but I will check later.
You might get it to work with the latch and unlatch that you stated above.
If it was me, I would look at trying to get it where you have one pulse per paper. There would be some timing that would need to be done but it would give you the ability to track better.
I understand about B9:0/0 being the first bit. But I did try Eric Nelsons idea about using a one shot to latch the bit address and unlatching it on the bit shift and it worked perfectly even though he used B9:0/0 as the bit address also. So there is a little uncertainty about that rule. I have 2 PLC books I use and they both show BSL using the input(I:0/1) directly as the bit address so they were no help.As far as using a bit in the BSL instruction, it is a good idea, just not a bit that is used in the BSL array. You could have your input trigger b3:0/0 and this would be your bit address. When you set up the BSL and you say that the array will start at B9:0 and it is 64 long, don't use B9:0/0- B9:3/15 unless there is a reason to change a position in the array after it has been set. If you have an input turn on B9:0/0 then you are over riding what the BSL is doing. Your first attempt would have worked better if you would have used a bit that isn't in the array.
The Bit address is what is being loaded into the first position in the array, in your case B9:0/0. Are you thinking that the bit address is stating the first address to be used? If so, that is not correct. When you say that your file "array" is B9:0, this is at the word level and it will always start at B9:0/0 , the first bit in the word.
I would concur that B9:0/0 should NOT be used. I was just lazy when editing your program...Eric,
Earlier in this thread this was posted about not using a bit for the bit address that was also in the BSL array.
"I think your problem is that the B9:0/0 that you are using in your bit address for "Paper Present" is also used in the BSL array. Try using B9:4/0 or something that is not in the array."
But I see your recommendation does just that. What is the rule for this?
If you do this, be sure to put limits on the value in N7:1. You don't want someone to keep pushing one adjustment button and going outside your shift register...That made me think of trying to make the output bit adjustable either though 2 PB ( more and less) or one of those small HMI. I put an indirect address on the bit that fires the output in rung 3. Do you think this will work?
given inputs:
1 push button up
1 push button down
2 sensor for confirming the correct position of the elevator,.
for ground position.
1 push button up
1 push button down
for second floor position.
2 sensor for confirming the position of the elevator in second floor position.
2 sensor for elevator door.
output:
motor reverse
motor forward