Use a BDC Thumbwheel with SCL500

jthornton

Member
Join Date
Jul 2002
Location
Poplar Bluff, MO
Posts
295
I want to connect a thumbwheel switch to a SLC500 /01. I am converting from AutomationDirect to AB. In AD I would connect the thumbwheel to 4 inputs and use an instruction to read the bits and convert it to a number. How do I do that with AB SLC500? I need to have the user select a number from 3, 4, 5, or 6. Is a thumbwheel the way to go?

Thanks so much for the help in switching over to AB from AD.

John
 
You can buy ready made rotary binary switches. They have 4 connections. 1 for the supply votage and 3 for the inputs. As you turn the switch the outputs are turned on and off in binary style.
eg pos 0 = no outputs, pos 1 = 1,0,0, pos 2 = 0,1,0 etc up to pos 7 =1,1,1. There is usualy a decode function in the plc instructions, if not, you can build your own.
 
There are a few things you need to do:

I'm assuming you're talking about a ten-position, BCD coded, single-digit thumbwheel for the values 0 through 9.

First, assuming you want to be able to use the rest of the points on the input module for other things besides the thumbwheel, you need to mask off the inputs that aren't associated with the thumbwheel. Let's say you wired the thumbwheel to the first four inputs on the card. You need to AND the input word with the hex value 000F putting the result in an integer register. Next, you need to add logic to limit the valid choices to values between 3 and 6.

If you wired the thumbwheel inputs to points other than the first four on the module, you'll need to perform a bit shift or a DIV function in addition to the AND. Let's say you used points 3 through 6 on the input module (counting 0 as a point). You'll need to shift the bit pattern three places right. You can do it with a bit shift instruction or by dividing by 8 (2^3).

If you wired the thumbwheel inputs to random points on the module, go back and wire them to consecutive points. It's possible to decode the value from non-consecutive inputs, but why put yourself through the aggravation?

In your case, since you don't care about values greater than 7, you could get away with wiring only the first three of the thumbwheel inputs to the input module. If you do it that way, you gain an extra input for other stuff, but be sure to change the value in the AND instruction from hex 000F to hex 0007. Note that this paragraph is true for your specific situation. If you later decided to make the value 1 and 2 valid choices, you'd get a 1 at both the '1' and the '9' position of the thumbwheel.

You should also consider using a timer to delay using a changed thumbwheel value until it has remained constant for some period of time. If the operator wants to go from the value 4 to the value 5, but moves the thubwheel to 3 by mistake, you may not want your process to try to follow his error.

Since you're only using a single digit and the values 3, 4, 5, and 6, you don't need to use the FRD instruction. The values 0 through 9 are the same whether you interpret the bit pattern as integer or BCD.
 
John,

Since you are wondering if using a thumbwheel is the way to go, here's an alternative that involves less hardware and less code.

3d30575b0a78948b.gif


As already expressed, there is the possibly that the PLC will read the setting in the middle of a change. For example...

3 ----> 4 ----> 5 ----> 6

If setting Was 3, but now you want setting = 6, the PLC might grab 4 or 5 during the change. You could use a timer as suggested to watch for a stable value, or you could add a Pushbutton (X3).

When the operator changes the value, he can then press the Pushbutton to tell the PLC that the data is Valid. Until he pushes the button, he can change the setting as many times and at any point without affecting the process.

When he finally presses the pushbutton, the PLC grabs the value and holds it in V-Mem until the appropriate time to insert it into the process. As the programmer, you should know when it is appropriate for the new value to be applied to the process.
 

Similar Topics

This is a pretty general question since I'm just beginning on these fronts, but does anyone know of a good "Where to Start" type of tutorial? I...
Replies
1
Views
1,919
1. The first thumbwheel stuck, only able to switch between 0 and 9. It can go from 000-099 or 900-999. 2. If I set it to 009, I can ping to...
Replies
3
Views
2,030
So I'm fairly new to PLC programing. in my PLC class my task right now is to write some logic that uses a thumbwheel to set the timer thats...
Replies
29
Views
4,315
Hello all, Though no stranger to computers and programming, I am a newbie to PLCs. I have a simple task but am not sure how to connect the dots...
Replies
7
Views
2,330
hi, guys. I am using the Siemens setp 7. I have a thumbwheel input in the panel, which has four bit input all boolean ones? How can I get the...
Replies
17
Views
4,565
Back
Top Bottom