PLC2 data storage help -quick

lalion

Member
Join Date
Jul 2003
Location
Ballarat, VIC, AUST
Posts
36
Need assistance with instructions in a plc2/15 program.

Ive been given the job of converting a plc2/15 to slc. Even been given laptop (old 3200) with program and comments, Ive figured out most of it except what data it is displaying in the program rung words (ie. in a 'get' or '=' instruction).

Details: a rung has a Sequencer Out instruction, set for 19 steps. rung below then looks at the sequencecounter address [g], if equal to 19 [=] then places a 1 into sequencecounter, ie reseting. The thing im confused about is that when i look up the word holding the 19 value, say 375, it tells me that 19 is hex-decimal, thus decimal = 25. how is this working???

AB site doesnt seem to have the 2/15 programming manual (1772-6.8.2) so i cant even check this.

Any quick help would be greatly appreciated.

-leon.
 
All number storage in the PLC-2 is BCD, i.e. timer/counter presets and accumulators, and values in arithmetic/compare instructions.
All addressing, however, is in octal - just to keep you on your toes.

BCD bit pattern for 19 is 0000 0000 0001 1001
 
then places a 1 into sequencecounter, ie reseting


Ooooh, lucky you. Whoever wrote the program "reset" the sequencer by putting a 1 into its position register. The problem with this is that the sequencer in the PLC-2 requires a pulse so setting to 1 with a [G]--(PUT) won't do it.

I just finished re-writting a PLC-2/30 program for SLC-500. The original program was designed in order to serve the sequencers other rather than in order to serve the process. To use a popular Hebrew expression, did we "ever eat hay".

Good luck,

(8{)} ( .)

(Yosi)
 
(8{)} ( .) said:
The problem with this is that the sequencer in the PLC-2 requires a pulse so setting to 1 with a [G]--(PUT) won't do it. QUOTE]

well its been working for them for about 2 decades, so it works somehow. im just trying to convert it, not too worried about about restructuring the program at the moment, just gota get it converted and working again. Ive just done the rungs, 190 in all (fingers crossed -no typos).

Is there any quick way to set up all my sequencer files now? 7 sequencers, think around 250 words in total. Ive managed produce report file of data table, gives the word/file values in hex.
 
lalion said:
so am i right in thinking that math operations simply treat it as decimal, ie when counting.. takes value out storage, increments as decimal then places back in bcd storage.
Yes
Note too that only 12 bits are used for numbers (0 - 999)
BUT, GET & PUT operate on all 16 bits
AND, [=] & [<] operate on 12 bits
 
lalion said:
Is there any quick way to set up all my sequencer files now? 7 sequencers, think around 250 words in total. Ive managed produce report file of data table, gives the word/file values in hex.
The PLC-2 sequencer files could be either 1, 2, or 4 words wide whereas the SLC sequencer can only be 1 word wide. I hope you don't have to deal with that issue.

re: resetting to 1
If the sequencer rung is true, bit 017 of its control accumulator will be on (1). PUTting a value of 1 to the accumulator will clear bit 017. On the next scan with the rung true, bit 017 will be set and the instruction will experience a transition.
This sort of trickery won't work the same on an SLC since it uses a R6 element for control and the control bits are in a separate word, not in the accumulator like in the PLC-2.
 
Last edited:
I think your best bet would be to export your PLC-5 program and copy your PLC-2 report data into the proper location in the PC5 file and then import the whole application.

You may be able to do a cut and paste (after some doctoring). This is an interesting question: Can you paste data fiels into RSLogix 5 if the data is tab separated? If not, what's the separator?

Good luck,

(8{)} ( .)

(yosi)
 
What I've done when populating sequencers: Use Excel to chart the sequencer. Put in a formula column that converts each row of bits to an integer. Use RSLinx and an excel macro to write the words into the new processor. It takes time to set up, but if you're dealing with 250 sixteen bit words, it may be worth the effort. Converting the bits to an integer will at least give you a quick method of proofreading if you have to do it by hand. You may even be able to export the raw data from the PLC2 into a csv or something that can be opened by excel.

Good luck!
 
I'm just curious, why are you converting a PLC2 to a SLC500 program? The PLC2 uses the 1771 IO hardware and racks, so you could just swap out for a PLC5 processor without any other hardware changes. AB has comitted to support the 1771 IO for another 40 years. Is it just the expense of hte processor? Unless its a small system just the labor to rewire could quickly dwarf the processor cost.
 
thanks for all the advice guys.

basically using slc because thats what the customer demanded, and silly me didn't fully know the conversion issues. But now im stuck with it.

the sequencer file is 1 word, so thats a relief.
Gerry, are you sure that the Get function gets all 16 bits, in the program sequencer is set for 19steps, and the reset rung looks for value 19 in sequencer counter, if it was getting all 16 bits wouldnt it get bit 17 make the value much higher.

and back on the reset issue, wouldn't this mean that the sequencer will essentially start at 2. At the moment in my program i move a 1 into the control accumulator (R9:4.pos).


thanks
 
lalion said:
are you sure that the Get function gets all 16 bits,
Absolutely.
lalion said:
in the program sequencer is set for 19steps, and the reset rung looks for value 19 in sequencer counter, if it was getting all 16 bits wouldnt it get bit 17 make the value much higher.
No. As stated above, the 2 uses BCD math and only the low twelve bits are involved in math operations.
lalion said:
and back on the reset issue, wouldn't this mean that the sequencer will essentially start at 2. At the moment in my program i move a 1 into the control accumulator (R9:4.pos).
Not sure about this one.
 
Thanks for the confirmarion Doug.
I have the same answers for all 3 questions.

I will hazard a guess on the 3rd:
I think that on a true transition the Sequencer outputs the data from its current position and then increments.
 
Gerry said:
Thanks for the confirmarion Doug.
I have the same answers for all 3 questions.

I will hazard a guess on the 3rd:
I think that on a true transition the Sequencer outputs the data from its current position and then increments.

You're welcome. Still a little life left in the knowledge of the old ways, eh?
 

Similar Topics

OK, so I have seen the threads pop up and I had been doing some research into getting over this hurdle for a bit after I ran into some of these...
Replies
3
Views
883
Hello, I was wondering if anyone would be able to help me out; I have a PLC2 file that I can't access (I don't have the software). Would anyone...
Replies
3
Views
798
I want to start this by saying all the following is for curiosity sake only, no real world / production ramifications come along. Inspiration...
Replies
24
Views
6,258
Hello, I am using a Digi One IAP and CompactLogix PLC to read some Modbus registers from a Kohler Generator. Things are working, except when I...
Replies
1
Views
1,243
Does anyone know what “DT Errors” mean when verifying a program after downloading in Ladder Logistixs software?
Replies
6
Views
2,534
Back
Top Bottom