My "CTREGWR writing to 0-Ch1Fn1Accumulator" got over written (.reset) even though I had the .reset release on the rung before CTREGWR.
The PLC is operating asynchronously from the CTRIO. Where in the scan something happens isn't terribly relevant since all interaction with the CTRIO occurs at the bottom of the scan. Again...please consider putting the setup in a program block and use stages to sequence through the steps. That will ensure that stuff happens in the right order and works every time.
One status not correct is $CTRIO_000.Out0Type = OFF. says ON if CTRIO output x is configured for pulse output. It's not getting turned on. Will try again tomorrow.
The .Out#Type fields are set by the module based on the configuration and serve no purpose other than to tell the status displays in DmD and CtrioWB whether to treat the output state as either the actual state of a discrete output or the active/inactive state of a pulse output. It really isn't there for user purposes and isn't telling you anything you didn't already know...since you are the one that configured to be either pulse or discrete when you set up the module. Incidentally it has nothing to do with whether a discrete is 'pulsed' on, it is referring to whether the output is configured as 'pulse' or 'discrete'.
This might be better than setting accumulator if it works, please advise.
My reset value will change so can I "CTREGWR write to 8-Ch1Fn1 Reset Value" then set & release reset? Is that value raw?
Either way works, you just have to be cognizant of order. If resetting, the set accumulator function must occur after the reset, or, the set reset value must occur before. It might be cleanest to use the set reset value, then load the table, then bump reset. Again...use stage.
Both set accumulator and set reset use raw values. Pretty much everything internally is raw.