Writing a Start Command to a DC1 Block?

I received an email with this question about which I'm hoping y'all can share some wisdom:

I am trying to start a fan when a compressor is started, but leave it in the operators control. I used an input parameter to trigger a positive edge trigger to a Calc block. My expression is as follows:

IF IN1 = I THEN;
'^/DC1/MODE.TARGET' := AUTO;
'^/DC1/SP_D.CV' := START;
ENDIF

All it does is turn my motor off if it is running, does not start it if it not running. I know this will work, but is there a better approach? And want is the proper SP parameter to manipulate from an expression to start the motor?

24 Replies

  • Hi Jim:

     

    A couple of things I noticed here:

     

    1) Order of function block execution may be important;

    2) The structured text executes all at once; if the DC block starts in CAS mode, it won't have had time to go to AUTO;

    3) Is this a custom Named Set for the Setpoints?  Is it possible that the word "START" is associated with the value "0".

     

    Otherwise, I'm at a bit of a loss to explain why the code should cause the motor to stop.  It sounds like there is some other logic "lurking" in the background!

     

    My practice generally is to enable CAS mode, and then use a small embedded SFC to do this kind of thing.  When the compressor starts, the SFC would check to see that the motor is currently stopped.  If so, the SFC would pulse the DC block to CAS; when confirmed, it would write the Start SP to the CAS_IN parameter, and when the start is confirmed, it would pulse the DC block back to AUTO.  Obviously, the SFC would have to check that the Actual Mode is not LO (so a start is permitted).  It also has to include some bailout logic in case the motor fails to start.  Ideally, it would write out some messages to let the operator know what is taking place, and it would use LOGEVENT to record that the start command was triggered by the compressor start.  I like using a mode other than AUTO because it gives the Operator some visual indication that something else is taking control of his device.

     

    Hope this is of some use!

     

    Steve Elves


    From: Jim Cahill [bounce-Jim_Cahill@community.emerson.com]
    Sent: Tuesday, September 09, 2014 7:14 AM
    To: DeltaV@community.emerson.com
    Subject: [EE365 DeltaV Track] Writing a Start Command to a DC1 Block?

    I received an email with this question about which I'm hoping y'all can share some wisdom:

    I am trying to start a fan when a compressor is started, but leave it in the operators control. I used an input parameter to trigger a positive edge trigger to a Calc block. My expression is as follows:

    IF IN1 = I THEN;
    '^/DC1/MODE.TARGET' := AUTO;
    '^/DC1/SP_D.CV' := START;
    ENDIF

    All it does is turn my motor off if it is running, does not start it if it not running. I know this will work, but is there a better approach? And want is the proper SP parameter to manipulate from an expression to start the motor?

  • Jim, try this.

     

    The ACT3 Expression is:

    '//FAN MOTOR/DC1/MODE.TARGET' := CAS;
    '//FAN MOTOR/RSP.CV' := '//FAN MOTOR/START.CV';

    The ACT4 Expression is:

    '//FAN MOTOR/DC1/MODE.TARGET' := CAS;
    '//FAN MOTOR/RSP.CV' := '//FAN MOTOR/STOP.CV';

     

    This will allow the fan DC1 PV to follow the compressor's DC1 PV, but still allow the operator to change the mode to AUTO to take control and stop the pump if needed.

    The ACT is found in the Logical function blocks and the Motor 1 you see is an internal read parameter using an external reference to the other motor's PV.

     

    I am new to this also, but this works. I just tested it. 

     

  • In reply to Lucky:

    Also, this may help you, too.

    Add another CALC block with:

    If '^/DC1/MODE.ACTUAL' = AUTO AND

       '^/RSP.CV' != '^/DC1/SP_D.CV'

      THEN '^/RSP.CV'  :=  '^/DC1/SP_D.CV';

    ENDIF;

    CALC block  logic will set RSP parameter
    equal to DC1/SP_D parameter if DC1 block
    mode is set to AUTO and DC1/RSP parameter
    is not equal to DC1/SP_D.  This logic will
    ensure RSP parameter is equal to SP_D
    parameter when device mode is changed from
    AUTO to CAS by operator or external module.

     And we use CAS when something is taking control, and AUTO when the operator is manipulating it.

     

  • Some comments;
     
    1 - It’s better to avoid writing on DC SP_D parameter from code. The reason is that DC function block itself does write on SP_D in several circumstances. So a concurrent overwrite may occur, leading to unexpected behavior of control module.
    Examples:

    1-     If DC is in CAS mode , CAS_IN_D value is copied to SP_D. This ensures no setpoint change if mode is changed back to AUTO

    2-     SP Track is activated on DC DEVICE_OPTS parameter and mode is LO (due to TRACK_IN_D activated or interlock/shutdown active)

    Of course, if logic writing into SP_D takes all of this into account it could work. PCSD C_DC_CONTROL composite has a implementation of proper writes to DC SP_D parameter (Code it’s too large and has several other things to put it here).
     
    2 – Setting mode on DC to CAS to start it by writing on CAS_IN_D does not means that operator cannot control as he only need to set AUTO mode again and then operate. Of course logic must not force mode to CAS so it must be PULSE based or, better in my opinion, SFC based. With a very small SFC into a composite embedded on module its quite easy and reliable to change mode to CAS, set desired setpoint on CAS_IN_D and when confirmed switch back to AUTO.
     
    3 – A more complex and costly, but maybe more flexible, approach is to decouple DC function block mode and Module mode. On this approach DC should be always in CAS, but module mode can be CAS/AUTO by providing a module level parameter of type mode. Logic to handle module mode parameter is required along with logic to write in DC CAS_IN_D parameter. Graphic customization is required as well because, commonly, faceplate/dynamo mode related items are linked to DC block mode parameter (find & replace feature may help with this).
     
    Hope this helps
     
    Gustavo Solano | +34916596701
     
    De: Jim Cahill [mailto:bounce-Jim_Cahill@community.emerson.com]
    Enviado el: martes, 09 de sept
    iembre de 2014 16:15
    Para: DeltaV@community.emerson.com
    Asunto: [EE365 DeltaV Track] Writing a Start Command to a DC1 Block?
     

    I received an email with this question about which I'm hoping y'all can share some wisdom:

    I am trying to start a fan when a compressor is started, but leave it in the operators control. I used an input parameter to trigger a positive edge trigger to a Calc block. My expression is as follows:

    IF IN1 = I THEN;
    '^/DC1/MODE.TARGET' := AUTO;
    '^/DC1/SP_D.CV' := START;
    ENDIF

    All it does is turn my motor off if it is running, does not start it if it not running. I know this will work, but is there a better approach? And want is the proper SP parameter to manipulate from an expression to start the motor?

  • In reply to Lucky:

    The logic the individual had would work if the "START" was changed to use a named set, 1 or add START := 1; above the IF logic.

    START in the configuration shown is an internal variable and the default is 0 unless set somewhere in the logic.

    One word of caution is depending on device options set and the status of the DC block, the logic still may not work.

    For example: if the Motor was tripped and the SP Track option is NOT selected, the logic wouldn't work because the SP needs to be driven to STOP first and then back to START to actually START.

    Regards,

    Matt

  • In reply to Matt Stoner:

    Thank you to everyone who has weighed in on this! I look forward to seeing you if you'll be joining us at the Emerson Exchange conference in Orlando in a few weeks.

    I've shared the thread with the requester and suggested he join the community and this track so he can respond with what's worked best for him.

  • Thanks to all, for your input and advice.

    Very good feedback and some things for a newbie to consider in configuration.

    There are obviously many approaches to accomplish the same task. It is interesting to see the different approaches.

    With mine being the quick and dirty, the quick and dirty fix was to write a 1 to SP_D instead of the Name Set “Start”.

    Now that I have seen it, I will take all the advice into consideration for a long term approach.

  • In reply to DKWade:

    There are two things to take away.  

    1. Using TEXT versus an Internal Variable.  Matt nailed it with the internal variable.  The original expression looked like it was writing the word START, but the syntax actually created a variable called START.  This variable was actually a floating point value of 0.0.  That is why it did not work.  Matt gets a ribbon.  

    2. Be sure you check the MODE.ACTUAL to avoid failed writes.  Although the write to SP_D would likely be successful, it would fail the first time if mode was not already AUTO as the MODE parameter must execute before ACTUAL follows the TARGET.  This is more a best practice, like error handling in VBA code.  An SFC gives you built in structure for pre-checks, and confirmation of actions.

    Nice little example...

    Andre Dicaire

  • In reply to Andre Dicaire:

    Will I receive said ribbon at a special ceremony at Exchange this year?

    Maybe Tue night at Jam session but I'm not singing! :)

  • In reply to Matt Stoner:

    How about a Pabst Blue Ribbon?

    Andre Dicaire

  • In reply to Andre Dicaire:

    Even a simple little function like this, there are things to consider like MODE.ACTUAL that would not be so obvious as to why it would not go start when transitioning from CAS to AUTO and sending the start command in the same scan. I knew that but over looked it. I did not however, consider that I was creating a new variable that is assigned a floating point value. I like the SFC approach more all the time. This is good stuff. Tequila shots all around.

  • In reply to Matt Stoner:

    Congratulations! You have received the Duncan Award this week! (Youssef will probably win next week... ) ;-)

  • In reply to Tyler Anderson:

    Dear Experts,

    My query is related to the topic in discussion

    Have PCSD class MVS_21_IL_52

    Have a written a following logic in a TRACK_SP CALC block please see the attached snapshot.

    IF '^/PV_D.CV' != '_MTR2_PV:RUNNING' THEN

     'OUT1.CV' := 0;

     'OUT2.CV' := 0;

     'OUT1.ST' := 128;

     'OUT2.ST' := 128;

    ELSE

     'OUT1' := 'IN1';

     'OUT2' := 'IN2';

    END_IF;

    This logic woks fine when both the DC block and AO block are in CAS mode.

    Requirement is it should not allow to set the AO SP (VSD setpoint)  in AUTO mode if the motor is not running and the motor also in AUTO mode..

    COuld you please help in this regards?

     

    Thanks,

    Manik