How to skip bit location in BSR

Rehu09

Member
Join Date
Nov 2017
Location
USA
Posts
64
Hello all
I was trying to write a program for one application.
In this application at two location of conveyor the dispensers are going to open when the bit in bitshift register is 1 at location 15 and location 14
So we have length of bit is 18.
As I’m testing right now I have used timers in place of conveyor, like index1 timer
Index 1 when the pans is at location 15 no pan at location 14 dispensers shld t work
Index 2 the pan will move to 14 another pan comes in 14 now the two dispensers have to be opened.
Index 3 pan 1 moves to 13, pan 2 to 14, new pan to 15 dispensers shld not work
Index 4 pan 1 to 12, pan 2 to 13 and so on two dispensers shld on

How shld I skip two index every time. I tried using counters and equal block when accum value is equal to 2 then to open dispensers. It worked for first cycle but later one dispenser worked even for index 2 but it shouldn’t

I’m sorry for my English.

Please help me
 
Don't worry about your English -- your English is probably better than my trying to speak whatever your native language is.

You are so deep in your logic that you're telling us your symptoms, but not your intentions. So let's take a step back.

I'm assuming that each bit in the array represents a pan.
I'm also assuming that you have tow dispensers, at locations 14 & 15 of the array.

It sounds like what you want to do is to run both dispensers when there are EMPTY pans at both 14 & 15.

Typically this would mean filling every other shift -- fill 14 & 15, then go through 2 shifts and double fill again.

If so, the easiest thing to do would be to count the number of indexes / bit shifts, and then do the dispense on every even (or odd) count. Of course, you would only dispense (from either 14 or 15) if there is a pan present (bit set).

HTH
 
Is this a homework question? No matter...

Well, you could use a DINT as your BSR "register" and as each new pan comes into the conveyor, divide it by two and set the MSB (.31) to 1. Since you are using a DINT, dividing by two it will act as a BSL with the last bit going into the "bit bucket".

Now just test the bits as they march through your "register".

If this is a homework question, then scratch your head a bit (no pun intended) and you will see how to set it up as a BSR.
 

Similar Topics

Does anyone know of a rugged PC based HMI that is pre-fabbed for installation inside heavy equipment? I have seen them in earthmovers/mining...
Replies
5
Views
2,304
So I've been trained to skip every second windows, as MS seem to use their B-Team developers. Eg. Skip win ME, straight to XP. Skip vista, use 7...
Replies
24
Views
8,747
I’m repairing a PPH SAFELINE METAL DETECTOR and appear a FAULT 8 MESSAGE. I KNOW HOW TO REPAIR IT BUT: APPEARS THE FAULT MESSAGE BUT I CAN'T...
Replies
3
Views
4,564
Good day all. I have kind of an odd question. Is there a way to have a processor skip an input whilst reading all the remaining input signals...
Replies
10
Views
3,369
Good day all. I was taught at the PLC boot camp how to skip a rung durning a scan (or permanently skip it) but I can't remember how it's done...
Replies
12
Views
6,355
Back
Top Bottom