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.

New Here? Please read this important info!!!

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

Thread Tools Display Modes
Old June 10th, 2021, 12:34 PM   #16
United States

unsaint33 is offline
Join Date: Sep 2019
Location: MInnesota
Posts: 66
Originally Posted by Steve Bailey View Post
There are four inputs and three outputs for the SHIFTL_WORD instruction.

The top input is boolean logic flow and is the enabling logic. When true, the shift is performed. Unless you want the shift to be performed every scan, make sure this input is a one-shot.

The input labeled "IN" is the address of the starting point of the range of bits to be shifted. If you leave the value inside the function at its default setting of 1, the range of the shift is 16 bits starting at the address specified at "IN". A value of 2 inside the box sets a range of 32 bits, etc.

The input labeled "N" wants numeric data. It is the number of places to shift each time the enabling logic is true. Most of the time this value is 1.

The input B1 is boolean. When true, you shift a "1" into the bit array. When false, you shift in a "0".

The "Q" output is the starting address of the shifted bits. In the OP's case it should be the same address as the "IN" input.

The B2 output is optional and boolean. It is true if the bit shifted out is true. It won't be of any use in the OP's case since he's only interested in the value two positions downstream.

If the OP uses a SHIFTL_WORD instruction with a length of 1 and address %M0017, then %M0019 will represent the presense or absense of a part at the stamping nest. Note that the starting address needs to be on a byte boundary, %M0001, %M0009, %M0017, %M0025 etc.
Thanks for the explanation. Cleared up a lot of confusion for me.
  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
Continuing with the Bit Shift Theme-Using a MOV to move a BSL bit into another ? Cydog LIVE PLC Questions And Answers 8 June 8th, 2020 09:28 PM
Logix5000 - Unconditional Output behaviour when Faulted lambles LIVE PLC Questions And Answers 12 May 16th, 2017 08:43 PM
Siemens Addressing Fun james-0000 LIVE PLC Questions And Answers 4 August 9th, 2008 12:58 AM
S7 Indirect bit addressing curlyandshemp LIVE PLC Questions And Answers 1 October 4th, 2006 02:40 AM
Latch a Bit then Bit Shift Left jthornton LIVE PLC Questions And Answers 2 August 22nd, 2003 07:35 AM

All times are GMT -4. The time now is 02:11 AM.