Call function block from st



  • Hello there,
    I have just started to migrate to ST - these big diagrams gets messy in the long run ;)
    Now I'm just trying to call a function block from st.
    0_1562763474368_ab6d0296-82ac-42c7-84d6-1820812827b5-image.png
    0_1562763542696_814682d7-f86b-4144-ae21-17a4e87c9552-image.png
    But i always get 'no value'.
    0_1562763596121_f0732d3f-4b40-40c4-a53b-503383540fbf-image.png

    My question is, how do I call ph_control_hourly and get the value of the variable 'out'?
    Thanks a lot


  • administrators

    Hello @søren-hedegaard-0,
    you didn't pass any input value to the ph_control_hourly(), so the block doesn't know anything about run_at_time and ph_hourly_feed.

    The call should look this:

    ph_control_hourly(run_at_time := local_run_at_time, ph_hourly_feed := local_ph_hourly_feed, out => local_out_value)

    If you look in to the help (F1) of any built-in FB, you will see a usage and you learn how the ST works:

    0_1562829190459_f0f1c9ad-8563-4baa-a5ee-d78b797fe4c4-image.png

    Best regards,
    Martin