Bit Shift Left (BSL) instruction problem - See attached code

jonb452

Member
Join Date
Feb 2008
Location
Orlando
Posts
9
I am experimenting with the BSL instruction in LogixPro and have run into a

problem. The goal of my program is as follows: track bad products on a

packaging line and reject them with a solenoid valve output when they reach

a certain position in a bit shift. The output solenoid (O:2/0) is to stay

on for 1 second, regardless of the activity of the product sensor (I:1/0).

My problem is that when the 'bad product' bit reaches the reject position

(N7:1/14), the timer output continously runs and resets because the sensor

input is staying on for some reason, even though the sensor is not

activated! The program is ok once I:1/0 is activated and a 0 is placed in

N7:1/14. Any ideas?

Any help/advice you can give is appreciated, thanks!

2jcyhow.jpg
 
I'm going to make some assumptions here based on how your logic is set up. I1/0 is an indicaton that the product has moved one position. I1/1 is the good/bad status of your product with 1 being bad.

I've never used the BSL before but you should be able to use the product status input directly as the bit address in the BSL. No need to worry about using B3:0/0.

An OSR requires it's own unused bit address. It looks like you want to trigger the timer on N7:1/14 and a leading edge oneshot of I:1/0. You can't do that the way you have it written.

A timer will not continue running is the conditions leading up to it go false. In your case the timer input conditions will be set for one scan, even if you fix the oneshot. Either you need to latch the timer in using the timer timing bit or you need to use an off delay timer (TOF).

Don't use the timer enabled bot to fire the output. use the timer timing bit (TT) or the eneable in series with not done.

In your case you don't need to specifically worry about resetting the tmer. If you handle the timer input conditions right that should happen on it's own.

Keith
 
Keith,

Thanks for your response. Your assumptions are correct, I:1/0 is a machine shift, i:1/1 = 1 is a bad product.

I guess the root of my problem is that I want to start T4:0 when N7:1/14 is 1, but I do not want to start the timer again until the machine has shifted once more (ie. i:1/0 has been activated again). I thought I could do this with a OSR but now I realize that cannot be. Any suggestions on how to activate the timer once, then wait until there has been another shift to activate it again (assuming N7:1/14 is 1 again)? Thanks.
 
I think you have the right idea. Your execution just needs a little tweek.

First of all, the OSR. It will take the logic sum to the left of it and put out a one scan true when the preceeding logic goes true. It needs it's own address to do this. So try something like:



I:1/0 B3:0/1 N7:1/14
|---] [-----[OSR]-----] [-----...
| T4:0.TT |
|---] [--------------------|



leading up to the timer.

The use T4:0.TT to control the output.

Also, get rid of the timer reset instruction. You won't need it.

Keith
 
Hello Keith,

Your solution did work correctly in one situation. If there is a bad product followed by a good one (1 in position N7:1/14 and 0 in N7:1/13), the timer is only executed once and the output fires accordingly. However, if there are two or more consecutive bad products, the timer only runs for the first bad product. I suppose this is because the N7:1/14 bit does not go false, then true again. It stays true for multiple consecutive bad products.
 
You may want to repost your modified program. I see my formatting got messed up and I want to make sure you understood what I posted.


The timer should get retriggered by the oneshot of I:1/0, the product increment bit. So even if N7:1/14 stays on the latch will drop out when the timer expires. On the next oneshot of the increment bit the state of N7:1/14 should be evaluated again.

Just to confirm, I:1/0 goes on then off then on again for each product regardless of product state?

Keith
 
You might want to use some logic, when the solenoid is done, ok to shift once. Because the BSL might be shifting before the solenoid is done, due to the fact that the solenoid can't respond as fast as the logic. Just a thought. Glen.
 
JonB,

You need to use I:1/1 for your BSL "Bit Address". Leave I:1/0 (Product Movement to shft the register pointer, but I:1/1 is the bit that gets introduced into the new N7:0/0 location. Try this version. It works for me as long as the packaging line conveyor does not move faster than 1 position/second. If it does, not all the bad parts can get rejected. For a faster conveyor, your reject station must be replaced with one that can reject faster than 1/second. Usually that means an air-operated cylinder that blasts the package off. The ZIPped file is the LogixPro program.
Packaging_Line_BSL.JPG
 
This Revision 2 version sets the product Line speed at a fixed rate greater than 1 position/second (when you get tired of turning I:1/0 on/off). This allows the logic to be checked for errors.

Packaging_Line_BSL_R2.JPG
 
Keith,

See below for my modified program. I:1/0 does go on then off for all products, regardless of their status. I had not added the I:1/0 to the TON rung. Now it works as I wanted (I think, need to try it on the machine!) Thanks for your help.

Lancie1, Thanks for the advice about the I:1/1 in the BSL command. I hand't realized you could use any bit without latching it in the program. This is much cleaner.

Since my program is only a test, I used 1 sec for the reject solenoid. In practice, it only takes 200ms or so to reject (I am using a air blast) and my machine shifts at less than 1 per second.

svqcg4.jpg
 
I hadn't realized you could use any bit without latching it in the program.
Jon, You cannot use just any old bit. Perhaps a review of the BSL instruction would help. Look in the LogixPro Help File, under "Rockwell RSLogix Instruction Help", then pick the "BSL". The Bit Address in BSL is the bit that gets inserted into the very first memory location of the File. Normally it is THE DATA (1 or 0), that you want to shift in memory proportional to the distance that an actual physical product moves in the real world, whatever it may be. THE DATA can represent any two bits of information: Good/Bad, Large/Small, Tall/Short, Heavy/Light, Pass/Fail, and so on. If you have more than one pair of data for each product, then you can use more than one BSL.

You do not really need the OSR one-shot on Rung 001. The I:1/0 takes care of making your Rung 001 go on/off upon every movement of the product.
 
Last edited:
Originally posted by Lancie1:

Jon, You cannot use just any old bit.

I think you misinterpretted the point of his statement. The examples in the RSLogix help files show the instruction using a B-file bit as the Bit Address. I haven't looked at LogixPro but I suspect they use the same example. None of the examples I have seen use an input image table address as the Bit Address in the BSL. I think jonb452 took that to mean he was required to use a B-file bit as the bit address, which is not correct.

Keith
 
Keith,

It wouldn't be the first time here that I have mis-understood. I am sorry for any errors. They are not intentional. However, the examples in RSLogix do not always show the best use of the instructions.
 
JonB,

To watch your data move while running Your Packaging Line LogixPro program:

1. In RUN mode, RIGHT-click on the BSL box (or any instrtuction that uses a data table),

2. Select "Go to Data Table",

3. then select "N7" as the table and "Binary" for the Radix. Now drag the table to a spot where you can watch it while the program runs.
 

Similar Topics

I am having trouble figuring out how to track a product using a BSL instruction. The way that I have it set up is: I have an infeed eye that...
Replies
10
Views
2,732
Hi everyone im a student from mexico and i have a problem using the ladder function BSR AND BSF (BIT Switch left and right), I use connected...
Replies
3
Views
2,955
hi, having abit of trouble getting the bit shift left to work in logix 5000 all is good except it wont accept my array when i verify It...
Replies
3
Views
4,544
hi I m trying to learn BSL and BSR. I want to clear my basics about Bit functions. Can anyone help me to understand that why do we use BSL and BSR...
Replies
4
Views
1,738
May I know where to keep more infor about this mitsubishi FX1N SFTL instruction as i want to use this SFTL in my PLC program. The mitsubishi...
Replies
1
Views
2,574
Back
Top Bottom