PLC AutomationDirect 06 with RTC
Every hour I need to store the amount of kilowatts the entire plant has used. The problem I’m having is how to match the current hour and provide my pointer with the correct address?
For the sake of the argument let’s assume this:
V2340 this is the start of my Pointer
V2367 this is the end of my Pointer
Let’s say I turned off the PLC on Friday and turned it back on, sometime on Monday morning. The plant starts manufacturing and its 10:00am, and we have accumulated already the KWH value to store it in our variable for -Hour 9:00am-
Question:
How the pointer would know where to store the next KWH value, which should be in V2350 (HOUR KWH #9)
Right now I have an SP0 “First Scan” loading V2340 octal into my pointer P4000 but the problem here is address not matching the current hour.
If the instruction LDA would accept a variable instead of a constant, that way at first scan I would just simply add the current hour to 2340 and store it in v4000. The problem is how to convert this to an octal addressing.
Wouldn’t it be nice if AD’s PLC would stick with decimal numbering system only?
I’m using the real time clock and I have hours in V7770. Do you guys have an idea how to do this?
Every hour I need to store the amount of kilowatts the entire plant has used. The problem I’m having is how to match the current hour and provide my pointer with the correct address?
For the sake of the argument let’s assume this:
V2340 this is the start of my Pointer
V2367 this is the end of my Pointer
Let’s say I turned off the PLC on Friday and turned it back on, sometime on Monday morning. The plant starts manufacturing and its 10:00am, and we have accumulated already the KWH value to store it in our variable for -Hour 9:00am-
Question:
How the pointer would know where to store the next KWH value, which should be in V2350 (HOUR KWH #9)
Right now I have an SP0 “First Scan” loading V2340 octal into my pointer P4000 but the problem here is address not matching the current hour.
If the instruction LDA would accept a variable instead of a constant, that way at first scan I would just simply add the current hour to 2340 and store it in v4000. The problem is how to convert this to an octal addressing.
Wouldn’t it be nice if AD’s PLC would stick with decimal numbering system only?
I’m using the real time clock and I have hours in V7770. Do you guys have an idea how to do this?