Showing results 1 to 5 of 5

Thread: IEC 870-103 driver & command processing

  1. #1
    Join Date
    17.03.2016
    Posts
    56

    Default IEC 870-103 driver & command processing

    Hi,

    I'm trying to set up communications with Siemens relays via 870-103 but am having come issues with commands. If I use 'write set value' I can issue both off (1) and on (2) commands which work correctly

    Info per the help file:

    "To send General command to the PLC (ASDU <20> in control direction), you have to configure a variable of the driver object type COMMAND with the corresponding Function Type and Information Number. A set value sent to this variable (DCO: 1-off, 2-on) will be sent to the PLC as a General Command. If a command could not be sent successfully, the PN Bit of the variable will be set to 1."

    I'm trying to get command processing working, however it only seems to allow you to send a 0 or 1 so only my 'true' button works. Help file does not state any 'qualifier of command' settings that may be required in the CP module.

    Ideally I also want to get incoming command via process gateway (from DNP3) to work downstream to the relay via Zenon, but assume if it works in command processing then the 'auto/remote' type will also map through correctly.

    Thanks,

    Dave

  2. #
    Join Date
    01.07.2008
    Location
    Salzburg, AT
    Posts
    870
    Best Answer

    Default Re: IEC 870-103 driver & command processing

    VBA macros linked by Variable - 'Value calculation' - 'Value adjustment non-linear' are not changing the value in the hardware.
    These macros are only to do a "virtual" mapping between value in the Hardware and the display of variable in zenon or use in other zenon modules. It cannot cause a "circular reference".


    Macro examples:

    Public Function AdjustHardwareValue_DPImapping(obVar As Variable, vValue As Variant) As Double
    'DO NOT access obVar input!
    ' neither other variables or other objects in the project data model

    If vValue = 0 Then
    AdjustHardwareValue_DPImapping = 2 'intermediate
    ElseIf vValue = 1 Then
    AdjustHardwareValue_DPImapping = 0 'OFF
    ElseIf vValue = 2 Then
    AdjustHardwareValue_DPImapping = 1 'ON
    Else
    AdjustHardwareValue_DPImapping = 3 'error
    End If

    End Function

    Public Function AdjustZenOnValue_DPCmapping(obVar As Variable, vValue As Variant) As Double
    'DO NOT access obVar input!
    ' neither other variables or other objects in the project data model

    If vValue = 0 Then
    AdjustZenOnValue_DPCmapping = 1 'OFF
    ElseIf vValue = 1 Then
    AdjustZenOnValue_DPCmapping = 2 'ON
    ElseIf vValue = 2 Then
    AdjustZenOnValue_DPCmapping = 0 'intermediate (note: not allowed in command direction)
    Else
    AdjustZenOnValue_DPCmapping = 3 'error (note: not allowed in command direction)
    End If

    End Function


    disclaimer: I have typed these macros just right now in the post - without testing.
    Last edited by ursulak : 4th March 2020 at 13:20 Reason: disclaimer

  3. #2
    Join Date
    01.07.2008
    Location
    Salzburg, AT
    Posts
    870

    Default Re: IEC 870-103 driver & command processing

    As I understand your relay expects in commands the value 1 for OFF and the value 2 for ON.
    In Command Processing module the action 'switching command' works with values 0 for OFF and 1 for ON.

    Use another action type or make double-point mapping for those variables using non-linear value adjustment.

  4. #3
    Join Date
    17.03.2016
    Posts
    56

    Default Re: IEC 870-103 driver & command processing

    Quote Originally Posted by ursulak View Post



    Use another action type or make double-point mapping for those variables using non-linear value adjustment.
    Ursula,

    Thanks for this.. I have been able to make command processing work using the set value command type (I tried before but I was missing that I had to set switching direction to DIR).

    Next issue is with the 'Auto/remote' command so I can take a DNP3 command (trip/close) from process gateway and pass it to the set value in command processing... It is not possible to change the action type for these.

    If I pass the auto/remote control to a temporary variable I could use linear adjustment to add 1, then map the variable using Allocations to the actual control variable. Is this how you suggest?

    I dont want to do linear adjustment to the actual control varaible itself as I can forsee a bit of a 'circular reference'... i.e. if I tell it to increase value by 1 when it changes then it will increase, then the value has changed again so add another 1...

    Thanks,

    Dave



  5. #4
    Join Date
    01.07.2008
    Location
    Salzburg, AT
    Posts
    870
    Best Answer

    Default Re: IEC 870-103 driver & command processing

    VBA macros linked by Variable - 'Value calculation' - 'Value adjustment non-linear' are not changing the value in the hardware.
    These macros are only to do a "virtual" mapping between value in the Hardware and the display of variable in zenon or use in other zenon modules. It cannot cause a "circular reference".


    Macro examples:

    Public Function AdjustHardwareValue_DPImapping(obVar As Variable, vValue As Variant) As Double
    'DO NOT access obVar input!
    ' neither other variables or other objects in the project data model

    If vValue = 0 Then
    AdjustHardwareValue_DPImapping = 2 'intermediate
    ElseIf vValue = 1 Then
    AdjustHardwareValue_DPImapping = 0 'OFF
    ElseIf vValue = 2 Then
    AdjustHardwareValue_DPImapping = 1 'ON
    Else
    AdjustHardwareValue_DPImapping = 3 'error
    End If

    End Function

    Public Function AdjustZenOnValue_DPCmapping(obVar As Variable, vValue As Variant) As Double
    'DO NOT access obVar input!
    ' neither other variables or other objects in the project data model

    If vValue = 0 Then
    AdjustZenOnValue_DPCmapping = 1 'OFF
    ElseIf vValue = 1 Then
    AdjustZenOnValue_DPCmapping = 2 'ON
    ElseIf vValue = 2 Then
    AdjustZenOnValue_DPCmapping = 0 'intermediate (note: not allowed in command direction)
    Else
    AdjustZenOnValue_DPCmapping = 3 'error (note: not allowed in command direction)
    End If

    End Function


    disclaimer: I have typed these macros just right now in the post - without testing.
    Last edited by ursulak : 4th March 2020 at 13:20 Reason: disclaimer

  6. #5
    Join Date
    17.03.2016
    Posts
    56

    Default Re: IEC 870-103 driver & command processing

    Ursula,

    I have got working (after a fashion) now...

    I used the AdjustZenOnValue VBA for process gateway control combined with a 'set value' for the local (from HMI) command processing. (still didnt work using 'switching command' 0/1 even with the macro in place). The 'set values' that I used were 0/1 (so macro adjusts to 1/2).

    Only thing is the CEL displays different output depending if its a local or process gateway control. Effect is the same WRT the downstream 870-103 device though.

    So if I want to send an 'On'... Command processing uses 'Set Value: 2' and IED goes On (2). If I use process gateway the CEL shows 'Modify Spontaneous value: (1)' and IED goes On (2). I just disabled the logging from external VBA to avoid confusion.

    Thanks for the steer in the right direction!

    Dave
    Last edited by HMIdeveloper123 : 10th February 2020 at 13:37

Similar Threads

  1. Command Processing with USINT data type from a DNP3.0TG driver
    By randyvalino in forum zenon Energy Edition
    Replies: 1
    Last Post: 12th June 2019, 14:30
  2. Analogue Output Command Processing
    By LeeCapula in forum zenon Energy Edition
    Replies: 2
    Last Post: 28th March 2018, 15:33
  3. Replies: 3
    Last Post: 14th February 2018, 09:48
  4. Aditional command butons in command processing screen
    By Joulzer in forum zenon Energy Edition
    Replies: 8
    Last Post: 6th February 2017, 09:52
  5. Command Processing
    By dcs.engineer in forum zenon Energy Edition
    Replies: 4
    Last Post: 4th August 2016, 17:34

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •