You are not registered yet. Please click here to register!

plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!

Go Back - Interactive Q & A > - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Thread Tools Display Modes
Old June 19th, 2018, 10:18 PM   #1
United States

Rehu09 is offline
Join Date: Nov 2017
Location: USA
Posts: 64
How to skip bit location in BSR

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
  Reply With Quote
Old June 20th, 2018, 07:46 AM   #2
United Kingdom

Aardwizz is offline
Aardwizz's Avatar
Join Date: Dec 2017
Location: Swindon
Posts: 211
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).

  Reply With Quote
Old June 20th, 2018, 07:48 AM   #3
Lifetime Supporting Member
United States

rootboy is offline
rootboy's Avatar
Join Date: Jan 2004
Location: Tennessee
Posts: 1,317
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.
Just because you can doesn't mean that you should...
  Reply With Quote
Jump to Live PLC Question and Answer Forum


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Error message IdealDan LIVE PLC Questions And Answers 7 December 11th, 2017 08:40 AM
Select Bit in Shift Register (DirectSOFT)... Eric Nelson LIVE PLC Questions And Answers 4 March 7th, 2012 10:14 PM
fishenguy fishenguy LIVE PLC Questions And Answers 54 November 13th, 2007 09:33 PM
Tidbits, finding the bit number or index Peter Nachtwey LIVE PLC Questions And Answers 10 February 9th, 2006 04:17 AM
10 Bit Encoder Decoder/ GE90-30 Control Freak LIVE PLC Questions And Answers 6 July 12th, 2005 12:28 PM

All times are GMT -5. The time now is 06:03 PM.