Bit Shift Left help needed


Thread Starter


I want to use the bit shift left instruction to create an array of bits,that I can use to cycle a group of soleniod valves on and off. I
have created an array 3 words in length,and on loading the first bit in the array(b3:8/0) each time the BSL instruction goes true/false the
bit moves forward in the array.How do you reset the array so that all bits in the array are 0??? Do you use a move instruction and write
zero to the 3 words??? Any help would be greatly appreciated!!!!

I like the FLL [Fill File]
instruction to do this.

Source 0
Dest #(first word of your array)
Length 3

*Description (from Help file)

This output instruction fills the words of a file with a source value. The source remains unchanged. All elements of the source value
(typically a program constant) are sent to the destination file each time the rung logic is true. Elements are filled in ascending order
until the number of elements (length that your enter) is reached.

Yosef Feigenbaum

Before you do this with a shift register you
might want to try doing this with indirect

The code would look something like this.

1) A the start of each time period clear the bit array (Create a new Binary file based on your
required length - Let's say B9).

2) Increment a pointer (Integer value - Let's Say N7:0). Don't forget to roll the value over.

3) Program an output instruction with the following address:

You can condition the pulses to increment the pointer based on your needs.