From the course: PLC Program Flow and Control Instructions

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

BSL instruction (bit shift left)

BSL instruction (bit shift left) - Ladder Logic Tutorial

From the course: PLC Program Flow and Control Instructions

Start my 1-month free trial

BSL instruction (bit shift left)

- [Tutor] The bit shift left instruction shifts the bits to the left once for every low to high transition on its inputs, the shifting starts from the least significant bit address of the word. To show the operation of the instruction, I will use our previous example of detecting the presence and absence of bottles, the file is #B3:0 , the control file is R6:0, the bit address source is the address of the sensor input 1:1, I'm going to choose six for the file length, meaning I will log and shift only six bits within the file. When the instruction is enabled, goes from false to true, the BSL instruction starts at bit zero, taking the data coming from the sensor bit and put it in B3:0. Now let's say after a while, the file contains several values. Now, when the bits from input one comes, let's say we have value of one coming in, the last bit is shifted out of the array and stored in the unknown bits…

Contents