PDA

View Full Version : logic to modify RTC in a Micrologix 1200


csrowland
February 3rd, 2009, 07:00 AM
I have a Micrologix 1200 with a "Real Time Clock" installed. I didn't realize that the clock registers are read only and I need to be able to manipulate the clock from the HMI (not a laptop). So I am stuck trying to write some code to accomplish this. My first thought is to move the RTC value to a standard N register, then manipulating that value with up down counters from the HMI. The part that I am stuck on is; lets say the N value for the minutes is 3 higher than the RTC value. When the RTC value is 59 (minutes) the value on the HMI will read 62 (minutes). Any ideas? Thanks

OkiePC
February 3rd, 2009, 07:15 AM
If you have a techconnect contract with A/B, look at Answer ID 21067.

It explains how to use the CPW instruction to accomplish what you want, and also lists the firmware levels required for various Micrologix CPUs.

Paul

EDIT: And, welcome to the forum!

csrowland
February 6th, 2009, 01:22 PM
Hey thanks,

I tried the cpw instruction and it worked great!!!!!