PLC/SLC Translation Tool - Timers
Ken Roach said:
...In ControlLogix and CompactLogix, the only timebase available is 1 millisecond.
This is the reason all TIMER instructions are flagged with conversion "errors" when you convert a PLC/SLC program, so you'll check to see if the program is using the .ACC or .PRE values and can change them to match.
Ken,
Sorry, I have my magnifying glass out...
You're probably working from memory, but it's not exactly the TIMER instructions that are flagged with a Program Conversion Error (PCE), but more any direct references to the PRE and ACC DINTs themselves. Eg. A MOV to a TIMER PRE.
The conversion of the SLC Timers' timebase is usually handled ok.
Eg. T4:1 TON - Timebase 1.0s PRE 123s
After conversion...
T4[1] TON - Timebase 0.001s PRE 123000
So the Timer instructions should function as before and should not need a PCE.
If a Constant value was being MOVed to a Timer PRE in an SLC and the Timer's timebase was 1.0s, then the Constant value would have been set for a 1.0s timebase.
Eg. MOV 200 T4:1.PRE
This is setting the PRE to 200s, but because it is a Constant value, the Translation Tool retains the value during conversion. It's not clever enough to know that it is now MOVing that Constant to a DINT that is now using a value 1000 times greater than before, and so multiplying 200 x 1000 and setting the converted MOV instruction's Constant value to 200,000. This is beyond the capabilities of the Tool.
So the conversion flags the rung with the MOV instruction, that references the PRE, with a PCE instruction, invalidating that rung, and forcing you to have to review it. You would then edit the MOV...
MOV 200,000 T4[1].PRE
...remove the PCE, and revalidate the rung.
Now you could just remove the PCE without editing and the MOV will then validate ok. However, you are now MOVing 200 to the TIMER PRE, and not 200,000. This will give you a 200 milliseconds PREset, instead of the required 200 seconds.
So all direct references to Timer PRE and ACC are PCE flagged for review.
The same goes for Counters.
G.