Showing results 1 to 4 of 4

Thread: Multiple binary inputstest to analogue value

  1. #1
    Join Date

    Default Multiple binary inputs to analogue value

    Can anyone give some thoughts on the best way to take multiple single binary inputs and convert them to an analogue value?

    We have a tap changer which gives us discrete binary output for each tap position (eg 1 to 10). I'm looking to display this onscreen as a numberical value. What is the most efficent way to program this? I could create a combined element and use formula there is to display seperate images with a number in it for each input, but I'm thinking there may be a better way to do this (perhaps use a formula to convert to an analogue value whcih can then be displayed easily on screen). IS there a way I can combine multiple binaries together to create a single value (and can then use reaction matrix 'bits'?

    Last edited by HMIdeveloper123 : 2nd April 2018 at 15:12 Reason: typo in title

  2. #2
    Join Date
    Salzburg, AT

    Default Re: Multiple binary inputstest to analogue value

    I would make a solution using zenon Logic.
    You may create a Logic project (to run on network servers) and use the values of these binary inputs to calculate the value of additional, integer variable - of stratonNG driver.

    1. create a Logic project, configure the binary input variables 'externally visible', in Logic create fieldbus driver 'Logic to SCADA connection'; cycle > 100ms
    2. create variable in stratonNG, e.g. "tap_position"
    3. ST-language code to calculate value:
    tap_position.0 := variable_binary_input1;
    tap_position.1 := variable_binary_input2;

  3. #3
    Join Date

    Default Re: Multiple binary inputstest to analogue value


    Thanks for the reply.. I will certainly give that a try, although I was hoping there would be way to do this without using Zenon Logic... in the editor only. Is there at least a way within Logic where I can create a 'template' logic and have it apply to all variables with a specifc naming convertion (eg ending _TAP01, TAP02 etc)?


  4. #4
    Join Date

    Default Re: Multiple binary inputstest to analogue value

    You could do this using a sub-program.
    In zenon Logic, right-click in your project-list > Insert new program > Choose a name, the programming language can be ST, and think to check Execution-style = Sub-program

    As inputs, your binary values. As an output, the values converted to an analog one.

    Then in the sub-program, as Ursula said:

       tap_pos.0 := bi_1;
       tap_pos.1 := bi_2;

    Finally in your main program you just have to use your sub-program multiple times.

       tap_position_TAP01 := My_SP( variable_binary_input1, variable_binary_input2, variable_binary_input3, ...);
       tap_position_TAP02 := My_SP( variable_binary_input10, variable_binary_input11, variable_binary_input12, ...);


    Attached Thumbnails Attached Thumbnails IOs_SP.PNG  

Similar Threads

  1. Multiple monitors
    By prasadkh in forum zenon Supervisor
    Replies: 18
    Last Post: 21st June 2018, 08:00
  2. Analogue Output Command Processing
    By LeeCapula in forum zenon Energy Edition
    Replies: 2
    Last Post: 28th March 2018, 15:33
  3. Multiple variables
    By DavidMarek in forum straton / zenon Logic
    Replies: 6
    Last Post: 11th April 2016, 08:02
  4. binary Reaction matrix GI status bit
    By fgenc in forum zenon Supervisor
    Replies: 5
    Last Post: 11th October 2014, 23:38
  5. How can I produce event for Binary Output in all executions?
    By shahramkh59 in forum zenon Supervisor
    Replies: 2
    Last Post: 26th November 2009, 10:20

Tags for this Thread

Posting Rules

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