• Not Answered

XFR/OUT Goes to Zero After Download When IN_2 is Selected, IN_1 Not Affected

We use a transfer function block (XFR) to select between two pH probes.  The SELECTOR parameter is wired to an input parameter that is written to from an operator graphic.  Production decides which probe to use from the graphic.  While working on the module that contains the XFR block, I noticed that XFR/OUT would go to zero after a download and then walk its way back to the actual value according to the XFR/BAL_TIME parameter (10 s in our case).  I was not expecting this, since XFR is the first block in the execution order, so it caused a few tense moments while I got the process straightened out.  I thought this was an initialization issue, so I added a 30 second delay to the logic after a download is performed which is enough time to let the XFR/BAL_TIME finish (in retrospect, I should probably reference that value directly in case it gets changed in the future) and there is no longer a process upset.

Fast forward to today and I downloaded the module again, but the XFR/OUT value didn't go to zero this time.  During today's download, XFR/SELECTOR was 0 (IN_1), and I thought it had been set to 1 (IN_2) when the value went to zero.  I momentarily disabled the associated logic and began testing.  The following pizture of the PHV trend has my annotations describing my test.

PHV with Annotations

My question is, why does XFR/OUT go to zero only when IN_2 is selected?  This seems like a bug opportunity for improvement.

5 Replies

  • On a control module properties, there are three types of download behavior. The default is usually "Preserve Critical Values". Some parameters are classified as critical and preserved on a partial download of the module. In the case of the XFR block, this is listed only as OUT.

    This should keep the output preserved between partial downloads, but immediately after downloading it may start changing to the new value again. The selection on the block is not preserved by default, so if you didn't have a parameter wired into the selector, this could have been what you were seeing. But, since you have a parameter wired into the selector parameter and noted you are uploading, this is likely not coming into play. (I'm sure you know most of this, but just noting here in case someone else may run into similiar things).

    That being said, without observing more of your configuration, I am only speculating. Since the output is dropping back and rebounding beyond the other value, it seems like maybe it's gettting a 0 in there instead of just going to the other input. Is Input B's module in a different controller and/or calculated differently? Is there other logic that may look at a bad status and try to react? Maybe one of these is also interacting itself. All cases being the same, this doesn't seem likely that one would work and not the other, but one thought to see if it's input related or block related would be swap the two wires into the block and see if it follows the field input or the input on the block.
  • In reply to Matt Forbis:

    The default is usually "Preserve Critical Values".

    That is exactly what it was.  So, the module is a Sequential Function Chart (SFC), and I have embedded a Custom Function Block to handle function block type activities (like using an XFR, and ON-Delay blocks, etc.).  Since the module type is SFC and not Function Block Diagram (FBD), the section for "Parameter download behavior" in the Properties -> General tab is not visible.  I created a test FBD module with the same XFR logic and tried the following settings:

    1. Preserve critical block values: This did NOT exhibit the single scan zero value when IN_2 was selected.
    2. Use configured values:  This DID exhibit the single scan zero value when IN_2 was selected, just like my real module.

    If it is possible, I don't know how to configure the embedded FBD to "Preserve critical block values", because the block itself does not have a "Properties" option.  It is interesting that the default behavior is "Preserve critical values", but that is not considered/used for SFC modules, and since you can embed FBD the default behavior is not inherited.

  • In reply to jgrunschel:

    I believe this was added for SFC in v15 FP2 and v15 FP3 for EMs.

    We got around this for many years by making a FBD module/EM and then put the SFCs within the module so we could get that option and program the SFCs to "recover" based on parameters we set in the logic to return to where the logic was when downloaded. Now we don't have to do this except in cases we want the Command Driven State engine to work a little more efficiently.
  • In reply to Matt Stoner:

    I was wondering if you could embed them the other way.  I have never embedded an SFC in an FBD.  It looks like the SFC has to be a separate module, is that correct?  The steps would be:

    • Click Insert Custom Block...
    • Select Module Block
    • Select Existing (in my case, the current pH SFC, with the embedded FBD moved to the now parent FBD.)

    Or is there a way to do it like what I am used to, and then the View -> Show as SFC ribbon buttons would work?

  • In reply to jgrunschel:

    No they can be embedded or actually linked (that is what we did for a new Command Driven Engine).

    - Click Insert Custom Block
    - Name and Select Embedded Composite
    - Pick Sequential Function Chart and number of In/Out parameters

    The SFCs will appear as Embedded blocks and when Drill down will be an SFC. It won't appear like you are use to with show SFC but you will have the download option. The SFC's will start at the Initial Step and you will have to have logic to start, stop, restart if you have multiple and don't need/want them running.