first visualisation

Spring
2020-05-20
2020-05-20
  • Spring - 2020-05-20

    Hi. I just start learning about PLCs and Codesys , so have some simple questions.

    What happens if you use a physical input (fx. a switch from the control box on plc) as input variable to a button ? (Is it the physical or virtual input that takes priority ?)

    How could a physical and a virtual (visualisation) input be made to control the same
    output ?
    Thanks

     

    Last edit: Spring 2020-05-20
  • JAPIB

    JAPIB - 2020-05-20

    Hi,
    With a button in the visualization you can't force a physical input.
    So it will works in simulation mode, but in real situation physical input will takes priority !
    If you want to control an output (or whatever variable) with a physical input and with a button, you have to use 2 variables.

    For example, a very simple one !! :
    VAR
    MyButton:BOOL; ( to use with the button in a visualization page)
    MyInput AT %IX0.0:BOOL; (Physical input)
    MyOutput AT %QX1.1:BOOL; (Physical output)
    END_VAR

    (Program in ST langage)
    MyOutput:= MyButton OR MyInput;
    //By this way you can control the output with both button and physical input

    BR

     
    • Spring - 2020-05-20

      Thanks. :)

       

Log in to post a comment.