Sequenced Light Array.Original Author: Lancie1

jaywillnot

Lifetime Supporting Member
Join Date
Apr 2015
Location
Alabama
Posts
69
“Sequenced Light Array Routine”
RSLogix 500
Constructed by:Lancie1
In this routine, we are using some NO contacts, some NC contacts, timers, counters and some advanced instructions such as: Move instructions (MOV), Masked Move instructions (MVM), Sequencer Load instructions (SQL), Sequencer Output Instructions (SQO) and Subtract Instruction (SUB). The B3 data file will also be used.
The inputs are: I:0/1 Emergency Stop
I:0:1 On/Off Toggle Switch
Note: We only need these two physical inputs to start and stop the routine…after that, the routine is completely automated by the OUTPUTS

This program is to help us understand how binary, decimal, and hexadecimal bits shift, transfer and count.
Some Definitions: WORD (A collection of 16 individual bits, ie 0123456789…..15)
BIT (A single digit within a 16 bit Word), where 1 is the least significant bit and 15 is the most significant bit.


Rung 000 If E-Stop is not pressed and the toggle switch has been flipped to close its contacts, then it will latch the internal relay T4:0 which keeps the timer output contacts closed. On this same rung T4:0/DN and C5:0/DN (XIC) so that T4:0 never resets. (Make this timer a low number, so the lights sequence faster and vise versa).

Rung 001 If the toggle switch is, in fact, made or true, and T4:0 is not done, THEN Counter C5:0, which has a preset of 98 pulses or counts is activated.

Rung 002 On this rung the toggle switch has an (XIC) instruction. If the input goes false-to-true, then Counter C5:0 will reset by the internal (RES) relay

Rung 003 T4:0/TT and internal data file B3:99/0 (XIO) along with a One Shot (OSR) with address B3:99/1 activates a number of instructions. These five instructions are as follows:
Masked Move (MVM)- Its source is status file S:4 (Internal Time Base), its mask or filter is the integer 65535 decimal or FFFFh Hexadecimal. Its destination is (Word-16 bits) B3:98
The next instruction is the Equal To (EQU) instruction. This instruction says that if source B3:98 is equal to the word B3:0 then energize the internal output bit B3:99/0 on the same branch as the (EQU) instruction.
The next instruction nested under the (EQU) instruction is the Not Equal To (NEQ) instruction. It states that if Source B3:0 is not equal to Word B3:98 then also manipulate B3:99/0 internal output.
The last instruction on the branch is the Sequencer Load instruction (SQL). This instruction takes the file number #B3:0, Source B3:98, Control Word R6:0 along with a user preset Length of 98 (Counter preset).

Rung 004 If Counter C5:0/DN (XIC) and T4:1/DN (XIO) are true statements then the internal output relay T4:1 will energize and begin its timer sequence—again a low preset if faster sequence times are desired. [Highlight]“Timer T4:1 controls how long each pattern is displayed”[/Highlight]

Rung 005 If C5:0/DN (XIC) and T4:1/DN (XIC) are true statements then the sequencer output instruction (SQO) is energized. Its File number is #B3:0, Mask (filter) is 65535, Destination is Integer file N7:1, Control Word R6:3 and its Length is also 98.
[Highlight]“The sequencer output is 16 bits of N7:1, Bits can be disabled (kept at 0) by the Mask”[/Highlight]

Rung 006 If C5:0/DN (XIC) and T4:1/DN (XIO) are true statements then energize Masked Move (MVM). The source is Integer Word N7:1, Mask (filter) is 65535, and Destination is Word O:2.
[Highlight]“First outputs are 16 bits of Word O:2, Bits can be disabled (kept at 0) by the Mask”[/Highlight]

Rung 007 If C5:0/DN (XIC) and T4:1/DN (XIO) are true statements, then energize the Subtract instruction (SUB). This instruction subtracts the Source B N7:1 from Source A 65535 and puts the sum in Destination Integer File N7:2. Nested under the (SUB) instruction is another Masked Move Instruction (MVM). It takes the Source N7:2 from the previous SUB instruction and masks or filters 65535 and moves that sum to Word O:4 (16 bits).
[highlight]“Subtract N7:1 from 65535, then send to outputs O:4/0 to O:4 to create the Pseudo-Random light array display”[/Highlight]
I hope this retyped routine on MS word does Lancie1 some justice, because he has sure helped me a great deal....as have all of you.
Jay
 

Similar Topics

http://www.youtube.com/watch?v=Q3x5MI9xNCQ&feature=related ...and from 04:20 this one really gets arti-tectual...
Replies
0
Views
1,718
Looking for a solution, we are building a fixture to test an injection molded part with 4 metal inserts. the fixure is built, just having problems...
Replies
5
Views
1,842
Hello everyone. I am working on designing a call light/alarm system I have roughly 20 stations that will each have their own call switch. Then...
Replies
20
Views
512
Hi Guys, I have a 1769-L24-QBFCB1 that has the OK light flashing on the embedded counter module. The manual states it is a resettable fault, but...
Replies
0
Views
118
Hi to all. On our Siemens PLC power supply, the battery light is showing amber. If we do not immediately change the batteries, will we lose the...
Replies
3
Views
140
Back
Top Bottom