Compumotor originally had its own thumbwheel, known as the TM8, which had 8 numeric thumbwheels and one sign thumbwheel. The TM8 contained a 3-to-8 line decoder which allowed 3 outputs from a controller to select one of the 8 thumbwheels to strobe. In addition, the TM8 only required 4 inputs (5 inputs if the sign thumbwheel was used)on the controller, since only one thumbwheel was strobed at one time. Note - TM8 product line is no longer offered.
The TM8 had its own unique command set which took advantage of the 3-to-8 line decoder. These thumbwheels commands are only for the TM8 thumbwheel, and will not work with other thumbwheels. The INSTW command configures the inputs of the controller to be thumbwheel inputs used with the TM8 exclusively. The OUTTW command configures the outputs of the controller to be thumbwheel outputs used with the TM8 exclusively. The TW command is used to read the thumbwheel inputs. TW sets 1-4 are used with the TM8 only (sets 5-8 are for the PLC commands).
When using any other thumbwheel,or when requiring parallel data transfers from PLC I/O to the controller, you use a second set of commands. The INPLC command configures the inputs to receive BCD formatted data. The OUTPLC command configures the outputs to be strobed for a specific amount of time, which determines where data on the inputs will be stored. The TW command is used to read the PLC (thumbwheel) inputs. TW sets 5-8 are used with the PLC inputs (sets 1-4 are used for the TM8 commands). The thumbwheel inputs can be stored in 4 sets of numbers. Thus, the same thumbwheel can be used to represent four different values. When using INPLC1 and OUTPLC1, use the TW5 command to read the data. When using INPLC2 and OUTPLC2, use the TW6 command to read the data.When using INPLC3 and OUTPLC3, use the TW7 command to read the data. When using INPLC4 and OUTPLC4, use the TW8 command to read the data.
The INPLC and OUTPLC commands were designed to be used with a specific number of inputs and outputs in mind. Since the data is read in as BCD inputs and a thumbwheel traditionally has digits 0 through 9, the number of BCD inputs required per thumbwheel is 4. However, each time one output is strobed, two digits of information are stored on the controller. Therefore, the anticipated configuration of I/O when using a thumbwheel required 8 inputs and 4 outputs (two thumbwheels read per output strobed).
The following is an example of how it works:
INPLC1,1-8,0,0
OUTPLC1,1-4,0,500
THUMBWHEEL: 12345678
VAR1=TW5
We have an 8 digit thumbwheel, with inputs 1-8 defined as the data inputs and outputs 1-4 defined as the strobing outputs. We are going to store the values of the thumbwheel into set 1, thus we will use the TW5 command, and assign it to VAR1 by using the command VAR1=TW5. The resulting value when we query VAR1 is 0.12345678 (notice that all the digits are to the right of the decimal point). When we assign a distance by commanding a D(TW5), and query D, the result is D+12345678 (notice that there is no decimal in this number when scaling is off SCALE0). When we assign a velocity by commanding a V(TW5), and query the V, the result is V+1234.5678 (notice that there is a decimal in the number, with 4 decimal places when scaling is off SCALE0).
Since D, V, and A are scalable, the location of the decimal in the value depends upon their respective scaling factors (SCLD, SCLV, & SCLA).
When output1 is strobed (OUT1 turns on) for 500ms, it will place the BCD equivalent value of Inputs 1-4 (Input 1 is the LSB and Input 4 is the MSB) into the second digit from the left most position, in our example it is 2. Simultaneously, it places the BCD equivalent value of Inputs 5-8 (Input 5 is the LSB and Input 4 is the MSB) into the left most position, in our example it is a 1. VAR1=0.12000000. Now, output1 is turned off, and output2 is strobed (OUT2). The BCD eqivalent value of Inputs 1-4, 4, is placed in the 4th position from the left and, simultaneously, the value of Inputs 5-8, 3, is placed in the 3rd position from the left. VAR1=0.12340000. Next, output2 is turned off, and output3 is strobed (OUT3). The BCD eqivalent value of Inputs 1-4, 6, is placed in the 6th position from the left and, simultaneously, the value of Inputs 5-8, 5, is placed in the 5th position from the left. VAR1=0.12345600. Lastly, output3 is turned off, and output4 is strobed (OUT4). The BCD eqivalent value of Inputs 1-4, 8, is placed in the 8th position from the left and, simultaneously, the value of Inputs 5-8, 7, is placed in the 7th position from the left. VAR1=0.12345678.
As in the figure above, as you decrease the number of outputs, the data shifts to the right. Thus, if only 1 output is used, it will place the data into the 7th and 8th
Add Comment