• Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Call function block from st

    Scheduled Pinned Locked Moved Mervis
    2 Posts 2 Posters 1.2k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      soren
      last edited by

      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

      Martin KudláčekM 1 Reply Last reply
      Reply Quote 0
      • Martin KudláčekM
        Martin Kudláček @soren
        last edited by

        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

        1 Reply Last reply
        Reply Quote 0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • First post
          Last post