SLC500 Array Fun!

JGrissom

Member
Join Date
Dec 2013
Location
colorado
Posts
18
Okay this is what I'm trying to do, I have several bits say B9:0 that are selections by operators. I want only one on at a time, I've tried masked moves XOR instructions etc...anyone have a down and dirty way to do this? SLC5/05 processor...:)
 
Hi,
One wonders how the operator makes the selection.

IF selector (1) true, then move decimal value"1", destination (word)B9:0
IF selector (2) true, then move decimal value"2", destination (word)B9:0
IF selector (3) true, then move decimal value"4", destination (word)B9:0
IF selector (4) true, then move decimal value "8", destination (word)B9:0
IF selector (5) true, then move decimal value"16", destination (word)B9:0
IF selector (6) true, then move decimal value"32", destination (word)B9:0
IF selector (7) true, then move decimal value"64", destination (word)B9:0

Etc......
Notice how the decimal values align with the different binary bits?
You can use one shot bits if you feel the need. Just make sure the operators can't make more than one selection at a time (use hardware) for this scheme to work.

Just an idea to work with.
BD
 
Using Bikerdude's method, only 1 bit will be set in word B9:0 at any one time. (However if more than one selector is ON (true), then the last one will win). If you want to limit the time between possible changes, you could add a self-resetting timer, say 2 or 3 seconds, then only allow the bit to be changed every time the timer DN bit comes on.

IF selector (1) true AND T4:0/DN true, then move decimal value"1", destination (word)B9:0

You could actually lock out all but one selector using program logic. It would mean looking at all selectors for each comparison:

If Selector 1 true AND Selector 2 false AND Selector 3 false AND Selector 4 false AND Selector 5 AND Selector 6 false AND Selector 7 false, then move decimal value "1", destination (word) B9:0
 
Last edited:

Similar Topics

I cannot add SLC500 analog input tag (I: 8.3) to EZSeries Touch Panel Editor (V 5.3). I used all the listed tag datatype but it all says "Invalid...
Replies
10
Views
259
can the slc500 5/05 send a email and text over Ethernet ?
Replies
3
Views
187
Hello, did anybody know, if there exist an converting cable like the1492-CM1746-M01 (for an 1746-IB16 to an 5069-IB16), for an 1746-HSCE to an...
Replies
3
Views
391
Customer is buying several spare 504 CPU's to have one handy when there's an issue with the ones in operation. Having them on the shelf for years...
Replies
15
Views
2,839
You have to go offline to create the 'Trend' but do you have to download the program to go back Online with the Trend ?
Replies
0
Views
346
Back
Top Bottom