Money4Nothing
Member
I have an application where I need to retain some data in an HMI tag. I'll explain my proposed solution, please advise if you think this will work and perhaps maybe a better way to implement it.
I have a Control Logix PLC control system (1756-L55), with lots of I/O, but of main concern are some Incremental Encoders. Part of this system are some HMIs using RSView ME (and RSView Enterprise). I am keeping track of an absolute position of a rack and pinion system using some incremental encoders (it would be nice to have absolute encoders, but the system is already constructed and its too late to change). I'm using POINT I/O 1734-IK encoder modules on ControlNet.
Here's the kicker: the PLCs cannot remained powered up at all times. They must be powered down for long stretches of time (due to other factors beyond my control). Of course when they power up, they reload their program from non-volatile memory with original tag values restored. There is no way I can remember what the last count of my encoder was in a controller tag. GRRRRRRRRRR .
So my solution is to use an HMI tag. I have an HMI tag whose source is the controller tag with the encoder's "Current Count" value. When the PLC shuts down, the HMI tag should retain its value (I am hoping). So I write a macro in the HMI, which executes when the minor fault code from the PLC is issued which indicates a project load from non-volatile memory. The macro sets the value of the 1734-IK "Preset Value" tag to the value of the HMI tag which hopefully has the last known encoder count. Then the macro further issues commands to inhibit the 1734-IK and reset its current count value to the preset value that I just loaded. Then viola, the Current Count is the same as just before the PLC was powered down.
Clear as mud?
Concerns:
I've never tried to set a controller tag to the value of an HMI tag with a macro before. I don't even know if that's possible. I'm also concerened that since the HMI tag is sourced by the module's "Current Count" tag, (whose value will be 0 on project load), that it will be reset to zero before my macro has a chance to write to the "Preset Value" tag. I'm also not 100% sure if an HMI tag sourced from a controller will retain its value if it loses connection to the tag server (i.e. the plc is turned off).
If you understand my dilemma at all and have any ideas or suggestions, please post away. I will be implementing this idea soon, and I'm fearful of a failure with no backup plan. I'd like to be advised that "yes it will work " or "no it won't, you're an idiot " so I can come up with another solution. *gulp* Thanks in advance.
$
I have a Control Logix PLC control system (1756-L55), with lots of I/O, but of main concern are some Incremental Encoders. Part of this system are some HMIs using RSView ME (and RSView Enterprise). I am keeping track of an absolute position of a rack and pinion system using some incremental encoders (it would be nice to have absolute encoders, but the system is already constructed and its too late to change). I'm using POINT I/O 1734-IK encoder modules on ControlNet.
Here's the kicker: the PLCs cannot remained powered up at all times. They must be powered down for long stretches of time (due to other factors beyond my control). Of course when they power up, they reload their program from non-volatile memory with original tag values restored. There is no way I can remember what the last count of my encoder was in a controller tag. GRRRRRRRRRR .
So my solution is to use an HMI tag. I have an HMI tag whose source is the controller tag with the encoder's "Current Count" value. When the PLC shuts down, the HMI tag should retain its value (I am hoping). So I write a macro in the HMI, which executes when the minor fault code from the PLC is issued which indicates a project load from non-volatile memory. The macro sets the value of the 1734-IK "Preset Value" tag to the value of the HMI tag which hopefully has the last known encoder count. Then the macro further issues commands to inhibit the 1734-IK and reset its current count value to the preset value that I just loaded. Then viola, the Current Count is the same as just before the PLC was powered down.
Clear as mud?
Concerns:
I've never tried to set a controller tag to the value of an HMI tag with a macro before. I don't even know if that's possible. I'm also concerened that since the HMI tag is sourced by the module's "Current Count" tag, (whose value will be 0 on project load), that it will be reset to zero before my macro has a chance to write to the "Preset Value" tag. I'm also not 100% sure if an HMI tag sourced from a controller will retain its value if it loses connection to the tag server (i.e. the plc is turned off).
If you understand my dilemma at all and have any ideas or suggestions, please post away. I will be implementing this idea soon, and I'm fearful of a failure with no backup plan. I'd like to be advised that "yes it will work " or "no it won't, you're an idiot " so I can come up with another solution. *gulp* Thanks in advance.
$