It should have 7 lamps per segment, but only 4 inputs per those 7 segments, make 1 digit from 0 to 9. Your 4 inputs to each digit should be labeled the power of 2 for that position - 0,1,2,3 (because 2^0 =1, 2^1 = 2, 2^2 = 4, and 2^3 = 8). To light up any digit, say "9", turn on bits that add up to a BCD 9 (inputs 3 and 0).My display is 3 digits old school 24 vdc lamps configured with 4 lamps per segment.
Your decoder truth table should look like this for each of the 3 digits. You need 4 PLC outputs for each digit (not counting a common wire for each digit).
No, I did not have to assume here, but only believe what he said:Are you assuming that his BCD to 7-segment decoder is outside the PLC?
If these were internal display LEDs, he would not be able to fire them with PLC outputs (no access to each segment). Except I think he meant 3 digits and 7 lamps per segment BUT 4 Segment Inputs per digit. He mistook the number of input terminals (4) on the digit for the number of segments.My display is 3 digits old school 24 vdc lamps configured with 4 lamps per segment. . . I can fire the segments with a relay out put if needed.
Okay, I get the picture now. Each number of your display has 7 segments, but each segment is made up of four 24 VDC lamps.I am not firing a 7 segment display driver with BCD, I would like to fire them (each digit) with a 1794-ow8
I would probably save each new set of 3 digits as a String (use AIC to convert Integer to String). Then use 3 versions of the RSLogix instruction AEX, with Indexes of 1 (0's digit), 2(10's digit), or 3(100's digit), and a Number setting = 1. Pull out these 3 new extracted 1-digit strings for each digit, convert to a back to an integer number using the "ACI" instruction, then run each integer number through the 7-Segment Decoder routine, then send the chosen Output Word to the PLC output module for that number position. That's all!Still pondering how to extract the 10's and 100's digit. Thanks
AEX [String Extract]
Rockwell Software
Use the AEX instruction to create a new string by taking a portion of an existing string and linking it to a new string. Depending on the type of processor you are using you may use indexed or indirect addressing to represent addresses.
Entering Parameters
Source is the existing string. The source value is not affected by this instruction.
Index is the starting position (from 1 to 82) of the string you want to extract. (An index of 1 indicates the left-most character of the string.) This can be a word address or a decimal value.
Number is the number of characters (from 1 to 82) you want to extract, starting at the indexed position. If the index plus the number is greater than the total characters in the source string, the destination string will be the characters from the index to the end of the source string. This can be a word address or a decimal value.
Destination is the string element (ST) where you want the extracted string stored.
Operation
1 The AEX rung is enabled.
2 A specific number of characters in the source string (from Number parameter) starting from the Index character is extracted and stored in the Destination.