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.
My question is, why does XFR/OUT go to zero only when IN_2 is selected? This seems like a bug opportunity for improvement.
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:
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:
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:
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?