I have a questions on counters and accumulators and how do the accumulators work as a preset?
I have a program that uses the accumulators as the preset for positioning motors.
C5:1
preset: 32000
acc. N210 (Motor POS) per recipe.
.....
A preset is something that the counter counts to and then the done bit (.DN) is set. The counter will keep counting, but the .DN bit will stay on until the counter is reset. I don't see any code to reset the counter. And I don't see a recipe loaded from an HMI or another part of the PLC data table in this code.
Yup, given the OP's logic leading up to the CTU/CTDs, the ONSs are required.
P.S. I think @parky is right (as usual): the .PREsets of 32000 are values that their respective .ACCumulators will never reach, so the .DNs are not being used; the CTU/CTD instruction pairs are simply alternatives to [ADD count 1 count]/[SUB count 1 count]; the latter would require the ONSs, of course.
P.P.S. @Mwils/OP: try printing .RSS in landscape orientation; it may clean things up a bit.
P.P.P.S @Mwils/OP: is this successful code for a working machine, or is this code that does not yet do what you want, or is it summat else?
T4:15 is a TOF and is driven by the VFD fwd output bit.
T4:16 is a TOF and is driven by the VFD rev output bit