Siemens S7 300 Shift Register

Dean1278

Member
Join Date
Sep 2011
Location
Port Elizabeth
Posts
17
Hi Guys,

I am installing a vision system on a conveyor to inspect fill volumes and cap defects on an Eye drop bottling line. The idea is to reject when trigger is recieved from vision system. However ,the reject station is after the vision system and there will be three bottles between the reject station and vision system when it arrives there. I need to track the bottle/consectutive bottles and reject accordingly using a shift register. I have a fair amount of Siemens S7 PLC knowledge but have never worked with a shift register.Any tips on how to proceed?o_O
 
Here's a hint, using shift instruction.
Shouldn't be a problem to convert it to LAD.

A EdgeRejectBottle
S M 100.0

A EdgeNewBottle
JCN L001
L MB100 // Shift left once every new bottle, good or bad
SLW 1
T MB100
L001: CLR

A M 100.3 // Throw away bottle
= KickOut

Kalle
 
Hi Kalle,

Thanks this makes sense, however this would change with two bottles in succession as the bits will not always be the same for rejection then?
 
I may have misinterpreted the scenario.
Isn't it like this:
B = Bottle b = bad bottle
E = Eye
X = Recector

E--X : Stations on conveyor
BbBb : Bottles on conveyor
0101 : MB100.0 ..3, Quality 0 = OK, 1 = NotOK

You must do a shift for every bottle, good and bad. Only bad bottles are marked with '1'.

Kalle
 
Hi Kalle,

Yes the scenario is as per your description. I have a sensor installed directly at the reject station aswell. Should this be used to confirm bottle presence together with bottle status in case of irregular spacing/movement.
 
Hi Peter,

Thanks for the info. I will be using the output from the camera system( Busy/Processing 100ms) with each image captyure to shift the bits left.
 
The common method is to install an encoder or proxy picking up on a star wheel etc. just something to give you a timing base for the movement.

For a short distance you may get away with creating a software pulse but this can error if the conveyor changes speed (stopping/starting).
 
Hi Kalle/Peter

I tried your sugestion but it doesn't seem to work if I view the Word( bin) in the variable table. I have a sensor at the camera and 4 stations futher a sensor and reject blower.I need to set the status of the bottle when triggred at the first station and transfer that until it is at the reject station. I have the following:

A I 124.6 // Reject sensor station 4
S M 120.0.

A I 124.5 // Camera trigger sensor station 1
JCN L001
L MW 120
SLW 1
T MW 120

L001: CLR

A M120.3
= Q 125.0
 
Hi Kalle/Peter

I tried your sugestion but it doesn't seem to work if I view the Word( bin) in the variable table. I have a sensor at the camera and 4 stations futher a sensor and reject blower.I need to set the status of the bottle when triggred at the first station and transfer that until it is at the reject station. I have the following:

A I 124.6 // Reject sensor station 4
S M 120.0.

A I 124.5 // Camera trigger sensor station 1
JCN L001
L MW 120
SLW 1
T MW 120

L001: CLR

A M120.3
= Q 125.0

I've got 2 comments:

1: Use an edge before the jump:

A I 124.5
FP HELPMARK // Positive edge, but it might be wiser to use FN, try both
JCN.... // AS IS


2: You can use MB120 instead of MW120 (freeing a not used MB121)


Kalle
 
Hi Kalle,

I have tried a Negative edge already. What seems to happen is the first bit is set on a failed inspection but the shift doesn't occur when the next bottle comes in. If the second bottle is bad it remains 2#_0000_0001 and will reset/change to off when a good bottle comes in. The bit ( bad) is not shifting.
 
Hi Kalle,

I have tried a Negative edge already. What seems to happen is the first bit is set on a failed inspection but the shift doesn't occur when the next bottle comes in. If the second bottle is bad it remains 2#_0000_0001 and will reset/change to off when a good bottle comes in. The bit ( bad) is not shifting.

Sorry, if the I 124.5 doesn't come as expected, I cannot help you with that.

There's another possibility:
Do you know / read the conveyor speed?

Kalle

Edit: Hey, I misread. Try to reset the M120.0 after the shifting is done after the T MW120, like this : SET / R M 120.0
 
Last edited:
Here, I will save you some time. If you are using an S7-314c you can use OB40 and use the built-in interrupts. This was a high speed carton line with a reject far down the line, approx 20 cartons.
 

Similar Topics

Good morning everybody. Sirs, I have a problem when converting a shift logic from a AB ML processor to a Siemens S7-300. The program is based...
Replies
11
Views
4,330
Hello, I'm looking for a way to shift the values of an entire DB up or down by X bytes (In my particular case it's 18 Bytes shifted up)...
Replies
3
Views
3,149
Hello all. I have an ESA HMI that is connected to a Simatic S7-300 (CPU312). I have uploaded the program from the PLC which is written with Step7...
Replies
6
Views
1,427
Hello. There is a problem with Siemens S7 300. We got a replacement PLC but it does not run the program from the MMC. The new PLC is dated 2011...
Replies
3
Views
674
Hi to all, Our company does not usually use Siemens PLCs, but have a press with one in it. We are trying to change the IP address in our Simatic...
Replies
2
Views
1,061
Back
Top Bottom