rrparker07
Lifetime Supporting Member
Hello all! I'm sure there is a simple solution to this problem but I can't figure it out.
THE GOAL: Using a Micrologix 1400, One sensor, and a Mac valve, I need to pulse an air blast when there is a product in position instead of leaving the air on constantly. The problem I am having is the sensor is about 13 products away from the blast point.
WHAT I HAVE TRIED: (I can't post code right now so I hope you can understand this.) Using a one shot with the sensor is the trigger. That trigger, along with N:7 at 0, then sets of the first delay timer and moves a 1 into N:7. So on and so forth for the next 13 rungs. The last rung moves a 0 to N:7 to start all over. The timer done bits trigger the blow off. What I have works perfectly as long as the delay is not longer than the gap from product to product. I have never done bit arrays or fifos. I need someone to tell me if it can be done programatically (is that a word?) or i need to come up with a way to get the sensor at the point of attack.
BTW: I did look at the bit shift instruction, but because my one sensor would have to perform the shift, I would essentially be moving all ones and that wouldn't really help. (i didn't think so anyway) The speed is fairly constant so I thought about trying to use some time calculation to pick up the missing products. If I only missed one it would be fine, but the more you miss in a row, the more room for error.
Anyhow, thanks in advance for any ideas.
Roy
THE GOAL: Using a Micrologix 1400, One sensor, and a Mac valve, I need to pulse an air blast when there is a product in position instead of leaving the air on constantly. The problem I am having is the sensor is about 13 products away from the blast point.
WHAT I HAVE TRIED: (I can't post code right now so I hope you can understand this.) Using a one shot with the sensor is the trigger. That trigger, along with N:7 at 0, then sets of the first delay timer and moves a 1 into N:7. So on and so forth for the next 13 rungs. The last rung moves a 0 to N:7 to start all over. The timer done bits trigger the blow off. What I have works perfectly as long as the delay is not longer than the gap from product to product. I have never done bit arrays or fifos. I need someone to tell me if it can be done programatically (is that a word?) or i need to come up with a way to get the sensor at the point of attack.
BTW: I did look at the bit shift instruction, but because my one sensor would have to perform the shift, I would essentially be moving all ones and that wouldn't really help. (i didn't think so anyway) The speed is fairly constant so I thought about trying to use some time calculation to pick up the missing products. If I only missed one it would be fine, but the more you miss in a row, the more room for error.
Anyhow, thanks in advance for any ideas.
Roy