Copy Setpoint to different tag

Ones_Zeros

Member
Join Date
Feb 2014
Location
at work
Posts
367
Hello I was wondering the best way to accomplish this.
I have a Setpoint that controls a valve output.
This Setpoint will vary through out the day.

When there is a HIHI state, I have the MOV instruction writing
a zero to the valve to close.

When the process is reset I currently have the MOV
instruction writing 100 to the value to open it 100%.

The question I had is how is the best way to
MOV the last Setpoint to the valve after the process is reset.

I assume I would have to store the current Setpoint output to a different tag so
that this stored valve could be used to write back to the Setpoint output
after the process reset.



Thanks
I appreciate the guidance
 
Last edited:
please explain what you are doing a little better.
i followed everything until you stated
"The question I had is how is the best way to
MOV the last Setpoint to the valve after the process is reset.
Instead of opening the valve at 100% when reset, I’D
like to write the last Setpoint back to the valve before the HIHI shutdown."

something isn't quite right with your statements.
is this a proportional valve?
james
 
At the point where you move zero into the setpoint due to the HiHi condition, is that setpoint still valid? Did it create the HiHi condition or is that externally influenced?

If the SP was still good, then before moving 0 to the SP, move the value of the SP to another register.

Then, once the reset happens, move the stored value back into the SP register.

Pretty much what you suggested yourself.

If it's possible that the SP could change between the HiHi condition and the reset occurring, maybe check if the SP is still zero before moving the old value back in.
 
Last edited:
I have a valve that the operator can
manipulate the Setpoint anytime through the day manually.

If there is a HIHI shutdown I have a MOV instruction that writes a 0 to close the valve and when the process is reset the MOV instruction writes a 100 back to the Setpoint to open the valve.

What I need to do instead of having the reset write a 100 to the valve output
I need the reset to write the last Setpoint that the operator had the valve at.

Let’s say the operator had the valve Setpoint at 65% when the HIHI occurred.
I’d like the reset to write 65% or what ever they had the Setpoint at back to the value output

Thanks for helping
 
Saffa
Moving the SP into a different register
is what I thought I needed to do, but I got to thinking
if I just (MOV) SP to say (Valve_ouput2)
After the MOV instruction writes 0 the the SP due to a external source
that causes the HiHi state.
Wouldn’t it just write a 0 to this other register as well (valve_output2)

I was struggling or over thinking how I would store the SP to a second tag/Register
without affecting it when a HIHI condition writes a 0 to the valve

Thanks again
 
i think you are on the right track.
adding to that i would do something like this.
move sp to a register, let's say its 65
if a hi hi warning occurs, subtract 5 from the setpoint and move into a hihi register which will be 65-5=60
reset the system and hihi error bit if there is one.
when you restart the system, if the sp (65) is more than the hihi register (60) ,
move 60 into the sp.
this will lower the hihi amount by some value.
repeat the process.

you may have to do some more logic to make it work, this is what i came up with on short notice.
hope this helps.
james
 
[Update: @JamesM said the same thing and got there first]

This is probably more complex than it needs to be.

Code:
### Recover from HIHI alarm with Reset pushbutton,
### but only if HIHI condition has cleared

     ResetPB        HIHI      IsReset
--+----] [----+-----]/[---------( )------
  |           |
  |  IsReset  |
  +----] [----+

### Set and forget:  HMI writes a 1 only to ResetPB;
### PLC is responsible for writing the 0
 
    ResetPB        ResetPB
------] [------------(U)-----

### When in normal operation, use operator-supplied setpoint as active setpoint

   IsReset
----] [------[MOV                   ]------
             [SrcA  OperatorSetpoint]
             [SrcB    ActiveSetpoint]

### Override operator setpoint in abnormal operations

  IsReset
----]/[------[MOV                 ]------
             [SrcA               0]
             [SrcB  ActiveSetpoint]
Notes

  • The key here is that the operator-supplied (desired?) setpoint is upstream of the active/actual valve setpoint,
    • and the HIHI/Reset states determine which of the two, 0 or OperatorSetpoint, ends up in the active/actual setpoint sent to the valve
  • The operator (HMI?) input value goes to tag OperatorSetpoint that is independent of the valve's active/actual setpoint; nothing else changes the value of that tag
  • The operator has a momentary pushbutton that assigns a 1 to ResetPB to clear HIHI alarm condition
  • That last XIO/NC could be [XIC/NO HIHI], as the override using 0 could be specific to the HIHI condition
  • Note that, on startup, the operator will need to press ResetPB to get the process into the IsReset=1 state
 
Last edited:
Saffa
Moving the SP into a different register
is what I thought I needed to do, but I got to thinking
if I just (MOV) SP to say (Valve_ouput2)
After the MOV instruction writes 0 the the SP due to a external source
that causes the HiHi state.
Wouldn’t it just write a 0 to this other register as well (valve_output2)

I was struggling or over thinking how I would store the SP to a second tag/Register
without affecting it when a HIHI condition writes a 0 to the valve

Thanks again

You were not overthinking it and you are correct that writing the code this way is a problem. Do not cache the valve signal on an alarm condition to return to later.

The problem is this creates more than one write source for the setpoint. Sometimes it’s written by the operator and sometimes it’s written by the program and you don’t know what the last action was and while you may get it working correctly this time, it’s easily broken by future changes.

The setpoint should exist and only change by the operator. If there is no alarm condition, move the 0 into the valve instead of the setpoint. When the alarm condition is removed, move the setpoint into the valve.

[edit:to be more general, the problem with caching is it would turn “setpoint” into unnecessary state]
 
Last edited:
The HIHi state is looking at water tank level
So if this state goes HiHi, it shutdowns the process and PLC writes 0 to valve.

- I could have the reset to just move the valve to 50% open after reset button is pressed and the water level gets below the HiHi state.

- what I needed was a way to store the operator SP to a different tag in the PLC (I’m using RSLogix 5000) so that in the event of a Shutdown I could just write this SP back to the value output after the reset occurs


Thanks again
 
that's what @JamesM suggestion and my code sample do: [ActiveSetpoint] is the tag for the actual valve position: it will be changed to zero whenever a HIHI alarm occurs, and will not return to the operator's setpoint value until the HIHI alarm is no longer active AND the process is reset (whatever "reset" means; I assumed it meant that the operator acknowledged the now-inactive alarm).


As noted, the key step is that the operator's desired valve position value that they enter is the only thing that is ever written to the tag [OperatorSetpoint]. That way it is never lost.
 
Last edited:
Do you have other level probes ?

e.g. you have a HiHi, do you have a Hi, and do you have Lo and LoLo ?

The proportional valve is controlling the water into the tank. If you had a Hi probe you could just turn the valve shut for a time, re-opening it to the same percentage as before the Hi event. On a Lo level signal, you would command the valve fully open for a time (Hi would override that).

But it seems to me that if the operators have to keep changing the SP, (presumably because they are running more processes), then some more automation would be beneficial, such as a proper level transmitter, then you can put the tank level under PID control ....

But hey - all you need is a float valve, or ballcock (like the one in a WC cistern), which would shut the inflow off automatically. They are available to industrial specifications and various sizes .... That would be the "KISS" approach - Keep It Straightforward and Simple !

Keep the inflow valve open 100% (or change it for a butterfly valve), as a backup in case the float valve fails and you hit the HiHi probe.

One of many google hits ....

https://www.directindustry.com/industrial-manufacturer/float-valve-118191.html
 
Last edited:
Why not leave the setpoint alone, and just use the high level condition in the part of the logic that writes the command to the output point?

If not high, then write the setpoint, else write 0 to the valve command.
 
Why not leave the setpoint alone, and just use the high level condition in the part of the logic that writes the command to the output point?

If not high, then write the setpoint, else write 0 to the valve command.

I could envisage the control valve shuttling back and forth quickly during times of low demand ....

Nothing inherently wrong with that, except it's expensive on control air ...

Time delays would be needed, but then in times of high demand those time delays might need to be short - catch 22 situation ...
 
I favour the float valve solution, although in the brewing industry they always tended to use analog level sensors and control valves or VFD pumps, for whatever reason.

But a simple fit and forget float valve will keep the tank at it's optimal level (provided the inflow capability is greater than the usage). Running a buffer tank too low could result in vortexing at the outlet, starving the process of much needed liquor (a brewery term for water!).

The valve you could buy might seem expensive, but if it means the operators don't have to fiddle-fudge setpoints, that would be worth a lot !!
 
I think one piece that i'm struggling with understanding is
the operator is writing to the output of the valve and if there is a HiHi state caused by water tripping a HiHi level float then the MOV instruction over writes the operator SP to (0) to close the valve to prevent additional water from flowing in.

- The operator and the MOV instruction is writing to the same output address of the valve.

- How can i store the operator setpoint each time they make a change to the valve SP and use this tag to write to the valve after the reset button is pressed after a HiHi state?

Currently here is what i have
1. AB RSlogix 5000 1769 controller
2. MOV instruction that writes (0) to address (Local:3:O.Ch0Data) valve_output. Closes valve if the HiHi Water Level float is tripped.
3. Operator also writes to (Local:3:O.Ch0Data) valve_output via HMI software. Their able to work the valve as needed.
4. In the event there is a HiHi condition and after it has cleared. A reset button is pressed. I'd like to write back to (Local:3:O.Ch0Data) the last setpoint the operator had the valve set to.

Thanks,
I appreciate your patience
 

Similar Topics

Hello Inside a FB, I´m trying to transfer a string from a DB to a IN_OUT var that was define as a UDT. The problem is that i can´t determine the...
Replies
4
Views
74
Hi everyone I'm in a bit of a conundrum, I've been trying to get this HMI on our machine and I am unable to retrieve it. Device Delta Model...
Replies
10
Views
732
Hi I have a Melsec FX1S-20MR, which has been programmed. I would like to copy the program to a new FX1S-20MR? What are the possible ways to do...
Replies
4
Views
565
Project involves updating a ~23 year old controller (C200HX CPU64). The HMI is a windows NT machine with the gui done with Delphi 5 (Pascal)...
Replies
1
Views
1,089
I am having to manipulate MB data in a compactlogix 5380. I need to copy the bit array from the TCP MB master into a matching bit array to use in...
Replies
13
Views
2,448
Back
Top Bottom